[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CWJ9AZ35376C9Q3CC9SNH3":3,"skill-same:01M6CWJ9AZ35376C9Q3CC9SNH3":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6CWJ9AZ35376C9Q3CC9SNH3","flag-add",null,"Add a CLI flag to shipctl end-to-end — argument parser definition, help text, shell completion scripts, documentation, and tests. Use when adding a new option or flag, when extending an existing subcommand, or when asked to \"add a --flag-name option\".","zakelfassi\u002Fskills-driven-development","zakelfassi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1274085?v=4","01M6CWHB4BNG8NYGSW0YS08B7E","Zak El Fassi","01M6CWHB8QCK700M6B2S6Y1QPD",18,"MIT","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fcli-tool\u002Fskills\u002Fflag-add\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"flag add","text","three","flags","use","session","cursor","parser","option","cli","format","shell","help","tasks","documentation","test","docs","2026-11-10 10:12:30",false,"---\nname: flag-add\ndescription: Add a CLI flag to shipctl end-to-end — argument parser definition, help text, shell completion scripts, documentation, and tests. Use when adding a new option or flag, when extending an existing subcommand, or when asked to \"add a --flag-name option\".\nmetadata:\n  forged-by: cursor-agent\n  forged-from: session-2026-04-02\n  forged-reason: \"Added --output, --format, and --timeout flags in three consecutive tasks with identical boilerplate — parser, help, completion, docs, test\"\n  usage-count: \"22\"\n  last-used: \"2026-06-01\"\n---\n\n# Flag Add\n\nAdd a new CLI flag to a `shipctl` command end-to-end.\n\n## Inputs\n- Command path (e.g., `release`, `build cross`, `config set`)\n- Flag name (long form, e.g., `--output-dir`)\n- Short alias (optional, e.g., `-o`)\n- Type (string, bool, integer, path)\n- Default value (or `required` if mandatory)\n- Description (one-line, used in help text and docs)\n\n## Steps\n\n1. **Define the flag in the parser**\n\n   For Rust + `clap`:\n   ```rust\n   \u002F\u002F In the relevant Args struct (src\u002Fcmd\u002F{command}.rs)\n   #[arg(long, short = '{alias}', default_value = \"{default}\",\n         help = \"{description}\")]\n   pub {flag_name}: {type},\n   ```\n\n   For Go + `cobra`:\n   ```go\n   \u002F\u002F In the relevant command file (cmd\u002F{command}.go)\n   cmd.Flags().{TypeVar}(&opts.{FlagName}, \"{flag-name}\", {default}, \"{description}\")\n   ```\n\n2. **Wire the value into the command logic**\n   Pass the flag value through to whatever downstream call needs it.\n   Verify the happy path compiles: `cargo check` \u002F `go build .\u002F...`.\n\n3. **Update the help text**\n   Run `shipctl {command} --help` and confirm the flag appears with the correct description and default.\n\n4. **Add shell completions**\n   Regenerate completions (invoke `manpage-sync` skill, or manually):\n   ```bash\n   shipctl completions bash > completions\u002Fshipctl.bash\n   shipctl completions zsh  > completions\u002F_shipctl\n   shipctl completions fish > completions\u002Fshipctl.fish\n   ```\n   Commit the updated completion files.\n\n5. **Update documentation**\n   Edit `docs\u002Freference\u002F{command}.md`:\n   - Add a row to the **Flags** table: `| --{flag-name} | {type} | {default} | {description} |`\n   - Add an **Examples** entry if the flag has a non-obvious use\n\n6. **Write or extend a test**\n   ```rust\n   \u002F\u002F tests\u002Fcmd_{command}.rs\n   #[test]\n   fn test_{flag_name}_flag() {\n       let output = Command::cargo_bin(\"shipctl\").unwrap()\n           .arg(\"{command}\")\n           .arg(\"--{flag-name}\").arg(\"{test-value}\")\n           .assert().success();\n       \u002F\u002F assert output contains expected value\n   }\n   ```\n\n7. **Verify the full suite passes**\n   ```bash\n   cargo test --workspace\n   ```\n\n## Conventions\n- Long flags are kebab-case (`--output-dir`, not `--outputDir`)\n- Boolean flags use `--flag` \u002F `--no-flag` pair when toggling a default-on behavior\n- Flags that accept file paths validate existence (return error with `ENOENT` message)\n- Help text: imperative mood, no trailing period, max 72 chars\n- Short aliases: only for the top 10 most-used flags; don't add new ones without team sign-off\n\n## Edge Cases\n- **Conflicting short alias:** Run `shipctl --help` on the parent command to audit existing aliases; pick a different letter or omit the alias.\n- **Required flag without a default:** Add a clear error message with the flag name and an example invocation.\n- **Flag affects multiple subcommands:** Define it at the parent command level with `PersistentFlags()` (cobra) or `Args` flattening (clap).\n- **Boolean flag default is `true`:** Document this prominently; many users expect flags to be opt-in.\n","# Flag Add\n\nAdd a new CLI flag to a `shipctl` command end-to-end.\n\n## Inputs\n- Command path (e.g., `release`, `build cross`, `config set`)\n- Flag name (long form, e.g., `--output-dir`)\n- Short alias (optional, e.g., `-o`)\n- Type (string, bool, integer, path)\n- Default value (or `required` if mandatory)\n- Description (one-line, used in help text and docs)\n\n## Steps\n\n1. **Define the flag in the parser**\n\n   For Rust + `clap`:\n   ```rust\n   \u002F\u002F In the relevant Args struct (src\u002Fcmd\u002F{command}.rs)\n   #[arg(long, short = '{alias}', default_value = \"{default}\",\n         help = \"{description}\")]\n   pub {flag_name}: {type},\n   ```\n\n   For Go + `cobra`:\n   ```go\n   \u002F\u002F In the relevant command file (cmd\u002F{command}.go)\n   cmd.Flags().{TypeVar}(&opts.{FlagName}, \"{flag-name}\", {default}, \"{description}\")\n   ```\n\n2. **Wire the value into the command logic**\n   Pass the flag value through to whatever downstream call needs it.\n   Verify the happy path compiles: `cargo check` \u002F `go build .\u002F...`.\n\n3. **Update the help text**\n   Run `shipctl {command} --help` and confirm the flag appears with the correct description and default.\n\n4. **Add shell completions**\n   Regenerate completions (invoke `manpage-sync` skill, or manually):\n   ```bash\n   shipctl completions bash > completions\u002Fshipctl.bash\n   shipctl completions zsh  > completions\u002F_shipctl\n   shipctl completions fish > completions\u002Fshipctl.fish\n   ```\n   Commit the updated completion files.\n\n5. **Update documentation**\n   Edit `docs\u002Freference\u002F{command}.md`:\n   - Add a row to the **Flags** table: `| --{flag-name} | {type} | {default} | {description} |`\n   - Add an **Examples** entry if the flag has a non-obvious use\n\n6. **Write or extend a test**\n   ```rust\n   \u002F\u002F tests\u002Fcmd_{command}.rs\n   #[test]\n   fn test_{flag_name}_flag() {\n       let output = Command::cargo_bin(\"shipctl\").unwrap()\n           .arg(\"{command}\")\n           .arg(\"--{flag-name}\").arg(\"{test-value}\")\n           .assert().success();\n       \u002F\u002F assert output contains expected value\n   }\n   ```\n\n7. **Verify the full suite passes**\n   ```bash\n   cargo test --workspace\n   ```\n\n## Conventions\n- Long flags are kebab-case (`--output-dir`, not `--outputDir`)\n- Boolean flags use `--flag` \u002F `--no-flag` pair when toggling a default-on behavior\n- Flags that accept file paths validate existence (return error with `ENOENT` message)\n- Help text: imperative mood, no trailing period, max 72 chars\n- Short aliases: only for the top 10 most-used flags; don't add new ones without team sign-off\n\n## Edge Cases\n- **Conflicting short alias:** Run `shipctl --help` on the parent command to audit existing aliases; pick a different letter or omit the alias.\n- **Required flag without a default:** Add a clear error message with the flag name and an example invocation.\n- **Flag affects multiple subcommands:** Define it at the parent command level with `PersistentFlags()` (cobra) or `Args` flattening (clap).\n- **Boolean flag default is `true`:** Document this prominently; many users expect flags to be opt-in.\n",{"name":5,"metadata":41,"description":7},{"forged-by":42,"last-used":43,"forged-from":44,"usage-count":45,"forged-reason":46},"cursor-agent","2026-06-01","session-2026-04-02","22","Added --output, --format, and --timeout flags in three consecutive tasks with identical boilerplate — parser, help, completion, docs, test","main","e959db0147cafe70b738efbd5a128985763fd0df","examples\u002Fcli-tool\u002Fskills\u002Fflag-add",1,"https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development","https:\u002F\u002Fskdd.dev","https:\u002F\u002Fgithub.com\u002Fzakelfassi","https:\u002F\u002Fzakelfassi.com","I build systems and write about what they do to us. Founder @TalkAndComment.","2026-11-06 14:19:15",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add zakelfassi\u002Fskills-driven-development --skill flag-add",{"tool":63,"command":64},"bunx","bunx skills add zakelfassi\u002Fskills-driven-development --skill flag-add",{"tool":66,"command":67},"pnpm","pnpm dlx skills add zakelfassi\u002Fskills-driven-development --skill flag-add","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fcli-tool\u002Fskills\u002Fflag-add\u002FSKILL.md",true,[71,77],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"Workflows\u002FAudit.md","REFERENCE","参考文档",1780,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002FPersonal_AI_Infrastructure\u002FReleases\u002Fv5.0.0\u002F.claude\u002Fskills\u002FBitterPillEngineering\u002FWorkflows\u002FAudit.md",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"Workflows\u002FQuickCheck.md",854,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002FPersonal_AI_Infrastructure\u002FReleases\u002Fv5.0.0\u002F.claude\u002Fskills\u002FBitterPillEngineering\u002FWorkflows\u002FQuickCheck.md",[82,99,104,124,140,161],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":36},"01M6CWKMXZDBQ8TK30ZV1X2KM7","skillforge","Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge\u002Fcreate\u002Fscaffold a new skill.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fskillforge\u002FSKILL.md",[],[84,89,90,91,92,93,23,94,95,96,97,98],"workflow","agentskills","pattern","new skill","reusable","forge","update","create","scaffold","sessions",{"skillNo":100,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":36},"01M6CWKJF5Y1PQBZ4QWA9DDES1","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fplugins\u002Fskdd-claude\u002Fskills\u002Fskillforge\u002FSKILL.md",[],[84,89,94,98,90,91,92,93,23,95,96,97],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":36},"01M6CWKFTNP9RBAD9SBEKRVMR2","deploy-preview","Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to \"deploy this for review\", or before opening a PR.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fdeploy-preview\u002FSKILL.md",[],[111,112,113,114,115,116,117,118,23,24,119,120,121,122,123],"deploy preview","deploy","preview","visual","branches","time","ready","opening a pr","environment","branch","pr","codex","review",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":36},"01M6CWKCSCQ6PV8TVKV2MDRAHH","component-scaffold","Create a new React component with co-located test, story, and styles. Use when creating new UI components, when asked to scaffold\u002Fgenerate a component, or when building new pages.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fcomponent-scaffold\u002FSKILL.md",[],[131,132,97,23,133,134,135,24,136,137,138,96,139,116,34],"component scaffold","component","components","structure","Story","ui","file","generate","react",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":36},"01M6CWKA7S16TW2KZZ7ADK9YSA","bug-triage","Triage a bug report into an actionable GitHub issue with severity, reproduction steps, and assignment. Use when a bug is reported, when error logs need investigation, or when asked to file\u002Ftriage an issue.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fbug-triage\u002FSKILL.md",[],[147,148,149,150,137,151,152,153,154,155,156,157,158,23,159,24,160],"triage","bug","bug triage","logs","report","toolkit","bug report","github","severity","project","issue","github issue","ops","investigation",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":36},"01M6CWK6Y4VB6HFNKP84WA3C6G","api-endpoint","Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.","https:\u002F\u002Fgithub.com\u002Fzakelfassi\u002Fskills-driven-development\u002Fblob\u002Fmain\u002Fexamples\u002Fwebapp-starter\u002Fskills\u002Fapi-endpoint\u002FSKILL.md",[],[168,169,170,171,91,116,134,172,173,174,23,24,175,176,177,97,122],"endpoint","api","api endpoint","route","build","endpoints","backend","controller","REST","validation"]