tody-agent/codymaster/skills/cm-google-form/SKILL.md
cm-google-form
Google App Script form-to-sheet integration with auto-retry, toast notifications, and Zalo/contact fallback. Reusable across any static website.
- Source repository stars
- 48
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Connect HTML forms → Google Sheets via Google Apps Script. Auto-retry, toast UI, contact fallback on errors. Zero dependencies, works on any static site.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/tody-agent/codymaster --skill "skills/cm-google-form"Inspect the Agent Skill "cm-google-form" from https://github.com/tody-agent/codymaster/blob/14cd03c9b12b3087494371e5ccef81005182dcaa/skills/cm-google-form/SKILL.md at commit 14cd03c9b12b3087494371e5ccef81005182dcaa. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
📋 5-Phase Workflow
🔴 Rule: NEVER skip Phase 1. Always read existing forms first.
🔴 Rule: NEVER skip Phase 1. Always read existing forms first. - 02
Phase 1: DISCOVER (Scan & Analyze)
Goal: Understand what forms exist and what fields they have.
Search for forms in the project:For each form found, extract:Ask user (Socratic Gate): - 03
Phase 2: PLAN (Design & Map)
Goal: Map form fields → Sheet columns → Apps Script params.
[ ] Apps Script code per sheet[ ] Frontend JS with retry + toast[ ] Toast CSS component - 04
Phase 3: BUILD (Generate Code)
See templates/apps-script.js for the full template.
Always use doPost(e) — NOT doGetAlways wrap in try/catchAlways return JSON with {status: "success"} or {status: "error", message: "..."} - 05
Phase 4: INTEGRATE (Wire Everything)
1. Add Toast CSS → Append to main CSS file (e.g., design-system.css) 2. Add Form JS → Add to shared JS file or create js/form-handler.js 3. Update HTML forms: - Add data-form-type="..." attribute - Add onsubmit="window.submitToGoogleSheet(event)" - Add - Ensure all inputs have n…
Add Toast CSS → Append to main CSS file (e.g., design-system.css)Add Form JS → Add to shared JS file or create js/form-handler.jsUpdate HTML forms:
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 48 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- tody-agent/codymaster
- Skill path
- skills/cm-google-form/SKILL.md
- Commit
- 14cd03c9b12b3087494371e5ccef81005182dcaa
- License
- Not declared
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Google Forms → Sheet Integration Skill
Connect HTML forms → Google Sheets via Google Apps Script. Auto-retry, toast UI, contact fallback on errors. Zero dependencies, works on any static site.
🎯 When to Use
| Trigger | Action |
|---|---|
| User says "create form", "connect Google Sheet" | Activate this skill |
| User says "form broken", "submit not working" | Debug using Phase 4-5 |
| User says "add new form to page" | Start from Phase 2 |
| User says "form for another website" | Start from Phase 1 |
📋 5-Phase Workflow
Phase 1: DISCOVER → Scan forms, identify fields, determine sheet structure
Phase 2: PLAN → Design sheet columns, map form fields, create deployment plan
Phase 3: BUILD → Generate Apps Script + Frontend JS + Toast CSS
Phase 4: INTEGRATE → Wire forms to JS, add CSS, deploy Apps Script
Phase 5: VERIFY → Test submit, test retry, test error fallback
🔴 Rule: NEVER skip Phase 1. Always read existing forms first.
Phase 1: DISCOVER (Scan & Analyze)
Goal: Understand what forms exist and what fields they have.
Actions:
-
Search for forms in the project:
grep -r "data-form-type\|onsubmit\|<form" --include="*.html" . -
For each form found, extract:
| Info | How to Find |
|---|---|
| Form type | data-form-type attribute |
| Fields | <input name="...">, <select name="..."> |
| Submit handler | onsubmit attribute |
| Page URL | File path |
- Ask user (Socratic Gate):
- How many separate Google Sheets? (1 shared sheet or separate?)
- What columns does each sheet need?
- Is there a fallback contact channel? (WhatsApp, Messenger, Hotline?)
- Fallback contact URL (e.g.,
https://wa.me/15551234567)
Output: Form Inventory Table
| # | Form Type | Pages | Fields | Target Sheet |
|---|-----------|-------|--------|-------------|
| 1 | massage | 7 | name, phone, branch, problem, time, package | Sheet Massage |
| 2 | course | 1 | name, phone, goal | Course Sheet |
Phase 2: PLAN (Design & Map)
Goal: Map form fields → Sheet columns → Apps Script params.
Sheet Column Design
For each sheet, define columns in order:
| Column | Source | Always Include |
|---|---|---|
| Timestamp | new Date() — auto | ✅ Yes |
| (form fields) | e.parameter.xxx | From inventory |
| Page Source | e.parameter.url | ✅ Yes |
Naming Convention
| Element | Convention |
|---|---|
| Sheet tab name | Data |
| Form attribute | data-form-type="<type>" |
| Hidden URL field | <input type="hidden" name="url" value=""> |
| JS global function | window.submitToGoogleSheet |
Deliverables Checklist
- Apps Script code per sheet
- Frontend JS with retry + toast
- Toast CSS component
- HTML form markup template
- Deploy instructions
- Verification test plan
Phase 3: BUILD (Generate Code)
3A. Google Apps Script Template
See
templates/apps-script.jsfor the full template.
Key rules:
- Always use
doPost(e)— NOTdoGet - Always wrap in
try/catch - Always return JSON with
{status: "success"}or{status: "error", message: "..."} - Column order MUST match
sheet.appendRow([...])order - Tab name MUST match
SHEET_NAMEconstant
3B. Frontend JavaScript
See
templates/form-submit.jsfor the full template.
Key features:
| Feature | Detail |
|---|---|
| Auto-retry | 3 attempts, exponential backoff (1s → 2s → 4s) |
| Toast UI | Success (green), Error (red), Retrying (amber) |
| Phone validation | Vietnamese format: /^0\d{8,10}$/ |
| Button states | "Submitting..." → "Retrying (X/3)..." → reset |
| CORS handling | Handles opaque responses from Apps Script |
| Fallback | Zalo button in error toast |
| Auto-dismiss | Success: 6s, Error: 15s, Retrying: 10s |
3C. Toast CSS
See
templates/toast.cssfor the full template.
3 variants: --success, --error, --retrying
3D. HTML Form Markup
See
templates/form-markup.htmlfor examples.
Required attributes:
<form data-form-type="TYPE" onsubmit="window.submitToGoogleSheet(event)">
<input type="hidden" name="url" value="">
<!-- form fields with name="..." -->
<button type="submit">Submit Text</button>
</form>
Phase 4: INTEGRATE (Wire Everything)
Step-by-step:
- Add Toast CSS → Append to main CSS file (e.g.,
design-system.css) - Add Form JS → Add to shared JS file or create
js/form-handler.js - Update HTML forms:
- Add
data-form-type="..."attribute - Add
onsubmit="window.submitToGoogleSheet(event)" - Add
<input type="hidden" name="url" value=""> - Ensure all inputs have
name="..."matching Apps Script params
- Add
- Configure URLs:
- Replace placeholder URLs in JS with deployed Apps Script URLs
- Configure fallback contact:
- Replace Zalo URL in JS toast with project's contact URL
Customization Points
| Setting | Location | Default |
|---|---|---|
| Apps Script URLs | JS URLS object | placeholder |
| Fallback contact | Toast Zalo link | https://zalo.me/... |
| Max retries | fetchWithRetry arg | 3 |
| Phone regex | Validation block | /^0\d{8,10}$/ |
| Toast auto-dismiss | showFormToast timeouts | 6s/15s/10s |
| Success message | .then() block | Customizable |
| Error message | .catch() block | Customizable |
Phase 5: VERIFY (Test & Report)
Test Checklist
| # | Test Case | Expected | Status |
|---|---|---|---|
| 1 | Submit valid form | Toast success (green) + Zalo opens | |
| 2 | Submit invalid phone | Toast error "Invalid phone number" | |
| 3 | Network offline | 3 retries → Toast error with Zalo button | |
| 4 | Check Google Sheet | New row appears with correct data | |
| 5 | Button states | Disabled during submit, resets after | |
| 6 | Toast close button | Toast disappears on click | |
| 7 | Mobile responsive | Toast visible above sticky CTA | |
| 8 | Multiple forms same page | Each form submits independently |
How to Test Retry
- Open DevTools → Network tab
- Block domain
script.google.com - Submit form → Should see 3 retry attempts
- Unblock → Submit again → Should succeed
Report Template
## Form Integration Test Report
**Date:** YYYY-MM-DD
**Pages tested:** X/Y
| Page | Form Type | Submit | Retry | Fallback | Sheet |
|------|-----------|--------|-------|----------|-------|
| index.html | massage | ✅ | ✅ | ✅ | ✅ |
| khoa-hoc.html | course | ✅ | ✅ | ✅ | ✅ |
**Issues found:** None / [list issues]
**Resolution:** [fixes applied]
❌ Anti-Patterns
| ❌ Don't | ✅ Do |
|---|---|
Use alert() for feedback | Use toast notifications |
| No retry on failure | Auto-retry 3x with backoff |
| Silently fail | Show error + contact fallback |
| Hardcode form URLs | Use config object (URLS) |
| Skip phone validation | Validate before submit |
Forget name attribute | Every input MUST have name |
Use doGet for form submit | Use doPost only |
| Multiple submit handlers | One shared submitToGoogleSheet |
📑 Templates
| File | Purpose |
|---|---|
templates/apps-script.js | Google Apps Script doPost handler |
templates/form-submit.js | Frontend JS with retry + toast |
templates/toast.css | Toast notification CSS component |
templates/form-markup.html | HTML form examples |
🔗 Related Skills
| Need | Skill |
|---|---|
| Form UI/UX design | @[skills/cm-ux-master] |
| SEO for forms | @[skills/cm-dockit] |
| Form security | @[skills/vulnerability-scanner] |
| Deployment | @[skills/deployment-procedures] |
Alternatives
Compare before choosing
mgiovani/cc-arsenal
team-review
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r
addyosmani/agent-skills
browser-testing-with-devtools
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.
vercel-labs/agent-browser
dogfood
Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.
daymade/claude-code-skills
frontend-visual-qa
Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find typography, wrapping, overlap, overflow, responsive, route, overlay, map, transient-state, data-visualization, browser-output, file-dialog, PDF/print, or Electron-shell defects, or to compa