[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFMVC200CC78NKDJ5HKPYM":3,"skill-same:01M6CFMVC200CC78NKDJ5HKPYM":148},{"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":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":71,"repositoryHtmlUrl":72,"repositoryHomepageUrl":6,"ownerHtmlUrl":73,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":74,"install":75,"resources":87},"01M6CFMVC200CC78NKDJ5HKPYM","golang-spf13-cobra",null,"Golang CLI command tree library using spf13\u002Fcobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage\u002Fhelp template customization, man-page and markdown doc generation, and testing with SetArgs\u002FSetOut\u002FSetErr. Apply when using or adopting spf13\u002Fcobra, or when the codebase imports `github.com\u002Fspf13\u002Fcobra`. For configuration layering alongside cobra, see the `golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I\u002FO patterns), see `golang-cli`.","rockcookies\u002Fskills","rockcookies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3498265?v=4","01M6CF9C16X3SDSKZX6ANH7HQM","Jacob He","01M6CF9C53JP821FCW6R9B00AJ",1,"MIT","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"golang spf13 cobra","golang","Bash","context7","exit","general","webfetch","command","page","projects","gopls","testing","harness","code","lint","architecture","codex","github","cli","MCP","2026-11-10 10:12:30",false,"---\nname: golang-spf13-cobra\ndescription: >-\n  Golang CLI command tree library using spf13\u002Fcobra — cobra.Command, RunE vs\n  Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs,\n  MatchAll, custom), persistent vs local flags, command groups,\n  ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage\u002Fhelp\n  template customization, man-page and markdown doc generation, and testing with\n  SetArgs\u002FSetOut\u002FSetErr. Apply when using or adopting spf13\u002Fcobra, or when the\n  codebase imports `github.com\u002Fspf13\u002Fcobra`. For configuration layering\n  alongside cobra, see the `golang-spf13-viper` skill. For general CLI\n  architecture (project layout, exit codes, signal handling, I\u002FO patterns), see\n  `golang-cli`.\nuser-invocable: true\nlicense: MIT\ncompatibility: >-\n  Designed for Claude Code, Codex or similar harness, and for projects using\n  Golang.\nmetadata:\n  author: samber\n  version: 1.1.0\n  openclaw:\n    emoji: ?\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\n    skill-library-version: 1.10.2\nallowed-tools: >-\n  Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n  WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs\n  Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*\npaths:\n  - '**\u002F*.go'\n---\n\n**Persona:** You are a Go CLI engineer building command trees that feel native to the Unix shell. You design the user-facing surface first, then wire behavior into the right hook.\n\n**Modes:**\n\n- **Build** — creating a new CLI from scratch: follow command tree setup, hook wiring, and flag sections sequentially.\n- **Extend** — adding subcommands, flags, or completions to an existing CLI: read the current command tree first, then apply changes consistent with the existing structure.\n- **Review** — auditing an existing CLI: check the Common Mistakes table, verify `RunE` usage, `OutOrStdout()`, hook chain ordering, and args validation.\n\n# Using spf13\u002Fcobra for CLI command trees in Go\n\nCobra is the de facto standard for Go CLI applications. It provides the command\u002Fsubcommand tree, flag parsing (via `pflag`), args validation, shell completion generation, and documentation generation. It does **not** handle configuration layering — that's viper's job.\n\n**Official Resources:**\n\n- [pkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra)\n- [github.com\u002Fspf13\u002Fcobra](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra)\n- [cobra.dev](https:\u002F\u002Fcobra.dev)\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n```bash\ngo get github.com\u002Fspf13\u002Fcobra@latest\n```\n\n## Cobra vs. viper\n\nThese libraries do fundamentally different things and can be used independently.\n\n| Concern | cobra | viper |\n| --- | --- | --- |\n| Owns | Command tree, flags, arg validation, completions | Configuration value resolution |\n| User-facing? | Yes — subcommands, flags, help text | No — purely a key-value resolver |\n| Without the other? | Yes — a CLI with flags only needs cobra | Yes — a daemon reading YAML + env needs only viper |\n| Integration seam | Hands `pflag.Flag` to viper via `BindPFlag` | Treats the cobra flag as the highest-precedence layer |\n\n**Use cobra alone** when your binary takes flags and args but needs no config file or env resolution. **Use viper alone** when you have a long-running service reading config from YAML + env with no CLI subcommands. Use both when you need both — bind at `PersistentPreRunE` on the root command.\n\n→ See `golang-spf13-viper` for the viper side of this integration.\n\n## Command tree\n\nEvery cobra CLI has a root command plus zero or more subcommands registered with `AddCommand`. The root command name is the binary name.\n\n```go\nvar rootCmd = &cobra.Command{\n    Use:          \"myapp\",\n    Short:        \"One-line summary\",\n    SilenceUsage: true,  \u002F\u002F ✓ prevents usage wall on every error\n    SilenceErrors: true, \u002F\u002F ✓ lets you control error output format\n}\n```\n\nUse `AddGroup` to label subcommands in help output — register groups **before** the `AddCommand` calls that reference them; cobra does not retroactively assign groups.\n\n## The Run\\* family\n\nCobra commands have five run hooks executed in order:\n\n```\nPersistentPreRunE → PreRunE → RunE → PostRunE → PersistentPostRunE\n```\n\nAlways use `*E` variants — the non-`E` forms cannot return errors. Key rules:\n\n- `PersistentPreRunE` on the root runs before **every** subcommand — use it for config init and auth checks.\n- A child `PersistentPreRunE` **replaces** the parent's entirely — call the parent explicitly if you need both.\n- `PostRunE` runs only if `RunE` succeeded.\n\nFor the full lifecycle and inheritance rules, see [commands-and-args.md](references\u002Fcommands-and-args.md).\n\n## Args validators\n\nCobra validates positional arguments before `RunE` runs. Never write `len(args)` checks inside `RunE` — that bypasses cobra's standard error messages and arg count tracking.\n\nBuilt-ins: `NoArgs`, `ExactArgs(n)`, `MinimumNArgs(n)`, `MaximumNArgs(n)`, `RangeArgs(min,max)`, `OnlyValidArgs`, `ExactValidArgs(n)`. Compose with `MatchAll(v1, v2)`. Custom validator: `func(cmd *cobra.Command, args []string) error`.\n\nFor the full validator set with examples and `MatchAll` patterns, see [commands-and-args.md](references\u002Fcommands-and-args.md).\n\n## Flags primer\n\nCobra delegates flag parsing to `pflag`. **Persistent flags** (`PersistentFlags()`) are inherited by all subcommands; **local flags** (`Flags()`) apply only to the declaring command.\n\n```go\nrootCmd.PersistentFlags().StringVar(&cfgFile, \"config\", \"\", \"config file path\") \u002F\u002F inherited by all subcommands\nserveCmd.Flags().IntVar(&port, \"port\", 8080, \"listen port\")                     \u002F\u002F local to serveCmd only\nserveCmd.MarkFlagRequired(\"port\")\nserveCmd.MarkFlagsMutuallyExclusive(\"json\", \"yaml\")\n```\n\nFor pflag types, custom flag values, flag groups, and viper binding, see [flags.md](references\u002Fflags.md).\n\n## Completions primer\n\nCobra generates shell completions automatically. Extend them with:\n\n- **`ValidArgs []string`** — static positional arg completion.\n- **`ValidArgsFunction`** — dynamic: `func(cmd, args, toComplete string) ([]string, ShellCompDirective)`. Return `ShellCompDirectiveNoFileComp` to suppress file fallback.\n- **`RegisterFlagCompletionFunc(name, fn)`** — flag value completion.\n\nFor `ShellCompDirective` values, annotations, and testing, see [completions.md](references\u002Fcompletions.md).\n\n## Testing commands\n\nTest commands by executing them programmatically. **Never use `os.Stdout` \u002F `os.Stderr` directly** in command handlers — use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` so tests can redirect output.\n\n```go\nfunc TestServeCmd(t *testing.T) {\n    buf := new(bytes.Buffer)\n    rootCmd.SetOut(buf)\n    rootCmd.SetArgs([]string{\"serve\", \"--port\", \"9090\"})\n    require.NoError(t, rootCmd.Execute())\n    assert.Contains(t, buf.String(), \"listening on :9090\")\n}\n```\n\nCobra accumulates flag state across `Execute()` calls — build a fresh command tree per test. For isolation patterns, golden files, and testing completions, see [testing.md](references\u002Ftesting.md).\n\n## Best Practices\n\n1. **Always use `RunE`, never `Run`** — `Run` cannot return an error; the only escape is `os.Exit` or panic, bypassing defers.\n2. **Put config initialization in `PersistentPreRunE`** — it runs before every subcommand; the right place for viper binding and auth checks.\n3. **Validate positional args with `Args`, not inside `RunE`** — `Args` gives cobra's standard error messages; `MatchAll` composes validators.\n4. **Use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` for all output** — direct `os.Stdout` writes cannot be captured by tests.\n5. **Re-create the command tree per test** — cobra accumulates flag state across `Execute()` calls on the same instance.\n\n## Common Mistakes\n\n| Mistake | Why it fails | Fix |\n| --- | --- | --- |\n| Using `Run` instead of `RunE` | Cannot return an error — only escape is `os.Exit` or panic, bypassing defers | Use `RunE` — return the error, let cobra handle the exit |\n| Writing `len(args)` checks in `RunE` | Bypasses cobra's standard error messages (\"accepts 1 arg, received 2\") | Declare `Args: cobra.ExactArgs(1)` on the command |\n| Writing to `os.Stdout` directly | Tests cannot capture output — os-level file handles can't be redirected | Use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` |\n| Child `PersistentPreRunE` silently drops parent's | Cobra does not chain — the child replaces the parent's hook entirely | Call `parent.PersistentPreRunE(cmd, args)` from the child's hook |\n| Reusing a root command across tests | Cobra accumulates flag state; second `Execute()` sees flags from the first | Build a fresh command tree per test |\n\n## Further Reading\n\n- [commands-and-args.md](references\u002Fcommands-and-args.md) — full PreRun\\*\u002FPostRun\\* chain, every Args validator, PersistentPreRunE inheritance rules\n- [flags.md](references\u002Fflags.md) — pflag types, required\u002Fexclusive\u002FoneRequired groups, custom value types, viper binding\n- [completions.md](references\u002Fcompletions.md) — ShellCompDirective set, annotation-based completions, testing completions\n- [generators.md](references\u002Fgenerators.md) — man page, markdown, YAML, RST doc generation; `cobra-cli` scaffolder\n- [testing.md](references\u002Ftesting.md) — isolation patterns, golden files, testing completions, table-driven command tests\n\n## Cross-References\n\n- → See `golang-cli` skill for general CLI architecture — project layout, exit codes, signal handling, I\u002FO patterns\n- → See `golang-spf13-viper` skill for configuration layering alongside cobra (flag → env → file → default precedence)\n- → See `golang-testing` skill for general Go testing patterns\n\nIf you encounter a bug or unexpected behavior in spf13\u002Fcobra, open an issue at \u003Chttps:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra\u002Fissues>.\n","**Persona:** You are a Go CLI engineer building command trees that feel native to the Unix shell. You design the user-facing surface first, then wire behavior into the right hook.\n\n**Modes:**\n\n- **Build** — creating a new CLI from scratch: follow command tree setup, hook wiring, and flag sections sequentially.\n- **Extend** — adding subcommands, flags, or completions to an existing CLI: read the current command tree first, then apply changes consistent with the existing structure.\n- **Review** — auditing an existing CLI: check the Common Mistakes table, verify `RunE` usage, `OutOrStdout()`, hook chain ordering, and args validation.\n\n# Using spf13\u002Fcobra for CLI command trees in Go\n\nCobra is the de facto standard for Go CLI applications. It provides the command\u002Fsubcommand tree, flag parsing (via `pflag`), args validation, shell completion generation, and documentation generation. It does **not** handle configuration layering — that's viper's job.\n\n**Official Resources:**\n\n- [pkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fspf13\u002Fcobra)\n- [github.com\u002Fspf13\u002Fcobra](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra)\n- [cobra.dev](https:\u002F\u002Fcobra.dev)\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n```bash\ngo get github.com\u002Fspf13\u002Fcobra@latest\n```\n\n## Cobra vs. viper\n\nThese libraries do fundamentally different things and can be used independently.\n\n| Concern | cobra | viper |\n| --- | --- | --- |\n| Owns | Command tree, flags, arg validation, completions | Configuration value resolution |\n| User-facing? | Yes — subcommands, flags, help text | No — purely a key-value resolver |\n| Without the other? | Yes — a CLI with flags only needs cobra | Yes — a daemon reading YAML + env needs only viper |\n| Integration seam | Hands `pflag.Flag` to viper via `BindPFlag` | Treats the cobra flag as the highest-precedence layer |\n\n**Use cobra alone** when your binary takes flags and args but needs no config file or env resolution. **Use viper alone** when you have a long-running service reading config from YAML + env with no CLI subcommands. Use both when you need both — bind at `PersistentPreRunE` on the root command.\n\n→ See `golang-spf13-viper` for the viper side of this integration.\n\n## Command tree\n\nEvery cobra CLI has a root command plus zero or more subcommands registered with `AddCommand`. The root command name is the binary name.\n\n```go\nvar rootCmd = &cobra.Command{\n    Use:          \"myapp\",\n    Short:        \"One-line summary\",\n    SilenceUsage: true,  \u002F\u002F ✓ prevents usage wall on every error\n    SilenceErrors: true, \u002F\u002F ✓ lets you control error output format\n}\n```\n\nUse `AddGroup` to label subcommands in help output — register groups **before** the `AddCommand` calls that reference them; cobra does not retroactively assign groups.\n\n## The Run\\* family\n\nCobra commands have five run hooks executed in order:\n\n```\nPersistentPreRunE → PreRunE → RunE → PostRunE → PersistentPostRunE\n```\n\nAlways use `*E` variants — the non-`E` forms cannot return errors. Key rules:\n\n- `PersistentPreRunE` on the root runs before **every** subcommand — use it for config init and auth checks.\n- A child `PersistentPreRunE` **replaces** the parent's entirely — call the parent explicitly if you need both.\n- `PostRunE` runs only if `RunE` succeeded.\n\nFor the full lifecycle and inheritance rules, see [commands-and-args.md](references\u002Fcommands-and-args.md).\n\n## Args validators\n\nCobra validates positional arguments before `RunE` runs. Never write `len(args)` checks inside `RunE` — that bypasses cobra's standard error messages and arg count tracking.\n\nBuilt-ins: `NoArgs`, `ExactArgs(n)`, `MinimumNArgs(n)`, `MaximumNArgs(n)`, `RangeArgs(min,max)`, `OnlyValidArgs`, `ExactValidArgs(n)`. Compose with `MatchAll(v1, v2)`. Custom validator: `func(cmd *cobra.Command, args []string) error`.\n\nFor the full validator set with examples and `MatchAll` patterns, see [commands-and-args.md](references\u002Fcommands-and-args.md).\n\n## Flags primer\n\nCobra delegates flag parsing to `pflag`. **Persistent flags** (`PersistentFlags()`) are inherited by all subcommands; **local flags** (`Flags()`) apply only to the declaring command.\n\n```go\nrootCmd.PersistentFlags().StringVar(&cfgFile, \"config\", \"\", \"config file path\") \u002F\u002F inherited by all subcommands\nserveCmd.Flags().IntVar(&port, \"port\", 8080, \"listen port\")                     \u002F\u002F local to serveCmd only\nserveCmd.MarkFlagRequired(\"port\")\nserveCmd.MarkFlagsMutuallyExclusive(\"json\", \"yaml\")\n```\n\nFor pflag types, custom flag values, flag groups, and viper binding, see [flags.md](references\u002Fflags.md).\n\n## Completions primer\n\nCobra generates shell completions automatically. Extend them with:\n\n- **`ValidArgs []string`** — static positional arg completion.\n- **`ValidArgsFunction`** — dynamic: `func(cmd, args, toComplete string) ([]string, ShellCompDirective)`. Return `ShellCompDirectiveNoFileComp` to suppress file fallback.\n- **`RegisterFlagCompletionFunc(name, fn)`** — flag value completion.\n\nFor `ShellCompDirective` values, annotations, and testing, see [completions.md](references\u002Fcompletions.md).\n\n## Testing commands\n\nTest commands by executing them programmatically. **Never use `os.Stdout` \u002F `os.Stderr` directly** in command handlers — use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` so tests can redirect output.\n\n```go\nfunc TestServeCmd(t *testing.T) {\n    buf := new(bytes.Buffer)\n    rootCmd.SetOut(buf)\n    rootCmd.SetArgs([]string{\"serve\", \"--port\", \"9090\"})\n    require.NoError(t, rootCmd.Execute())\n    assert.Contains(t, buf.String(), \"listening on :9090\")\n}\n```\n\nCobra accumulates flag state across `Execute()` calls — build a fresh command tree per test. For isolation patterns, golden files, and testing completions, see [testing.md](references\u002Ftesting.md).\n\n## Best Practices\n\n1. **Always use `RunE`, never `Run`** — `Run` cannot return an error; the only escape is `os.Exit` or panic, bypassing defers.\n2. **Put config initialization in `PersistentPreRunE`** — it runs before every subcommand; the right place for viper binding and auth checks.\n3. **Validate positional args with `Args`, not inside `RunE`** — `Args` gives cobra's standard error messages; `MatchAll` composes validators.\n4. **Use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` for all output** — direct `os.Stdout` writes cannot be captured by tests.\n5. **Re-create the command tree per test** — cobra accumulates flag state across `Execute()` calls on the same instance.\n\n## Common Mistakes\n\n| Mistake | Why it fails | Fix |\n| --- | --- | --- |\n| Using `Run` instead of `RunE` | Cannot return an error — only escape is `os.Exit` or panic, bypassing defers | Use `RunE` — return the error, let cobra handle the exit |\n| Writing `len(args)` checks in `RunE` | Bypasses cobra's standard error messages (\"accepts 1 arg, received 2\") | Declare `Args: cobra.ExactArgs(1)` on the command |\n| Writing to `os.Stdout` directly | Tests cannot capture output — os-level file handles can't be redirected | Use `cmd.OutOrStdout()` \u002F `cmd.ErrOrStderr()` |\n| Child `PersistentPreRunE` silently drops parent's | Cobra does not chain — the child replaces the parent's hook entirely | Call `parent.PersistentPreRunE(cmd, args)` from the child's hook |\n| Reusing a root command across tests | Cobra accumulates flag state; second `Execute()` sees flags from the first | Build a fresh command tree per test |\n\n## Further Reading\n\n- [commands-and-args.md](references\u002Fcommands-and-args.md) — full PreRun\\*\u002FPostRun\\* chain, every Args validator, PersistentPreRunE inheritance rules\n- [flags.md](references\u002Fflags.md) — pflag types, required\u002Fexclusive\u002FoneRequired groups, custom value types, viper binding\n- [completions.md](references\u002Fcompletions.md) — ShellCompDirective set, annotation-based completions, testing completions\n- [generators.md](references\u002Fgenerators.md) — man page, markdown, YAML, RST doc generation; `cobra-cli` scaffolder\n- [testing.md](references\u002Ftesting.md) — isolation patterns, golden files, testing completions, table-driven command tests\n\n## Cross-References\n\n- → See `golang-cli` skill for general CLI architecture — project layout, exit codes, signal handling, I\u002FO patterns\n- → See `golang-spf13-viper` skill for configuration layering alongside cobra (flag → env → file → default precedence)\n- → See `golang-testing` skill for general Go testing patterns\n\nIf you encounter a bug or unexpected behavior in spf13\u002Fcobra, open an issue at \u003Chttps:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra\u002Fissues>.\n",{"name":5,"paths":52,"license":15,"metadata":54,"description":7,"allowed-tools":65,"compatibility":66,"user-invocable":67},[53],"**\u002F*.go",{"author":55,"version":56,"openclaw":57},"samber","1.1.0",{"emoji":58,"install":59,"homepage":60,"requires":61,"skill-library-version":64},"?",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":62},[63],"go","1.10.2","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","c349be0704bffe54a7191d1412faf564b08983ca","skills\u002Fsamber-golang\u002Fgolang-spf13-cobra",0,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills","https:\u002F\u002Fgithub.com\u002Frockcookies","2026-11-07 20:43:47",{"source":8,"skillName":5,"commands":76,"prompt":86,"zipAvailable":67},[77,80,83],{"tool":78,"command":79},"npx","npx skills add rockcookies\u002Fskills --skill golang-spf13-cobra",{"tool":81,"command":82},"bunx","bunx skills add rockcookies\u002Fskills --skill golang-spf13-cobra",{"tool":84,"command":85},"pnpm","pnpm dlx skills add rockcookies\u002Fskills --skill golang-spf13-cobra","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002FSKILL.md",[88,94,98,102,106,112,116,120,124,128,132,136,140,144],{"path":89,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"assets\u002Ffavicon-svg-circle.svg","ASSET","资产文件",387,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Fassets\u002Ffavicon-svg-circle.svg",{"path":95,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":96,"sourceHtmlUrl":97},"assets\u002Ffavicon-svg-shield.svg",491,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Fassets\u002Ffavicon-svg-shield.svg",{"path":99,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":100,"sourceHtmlUrl":101},"assets\u002Ffavicon-svg-square.svg",453,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Fassets\u002Ffavicon-svg-square.svg",{"path":103,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":104,"sourceHtmlUrl":105},"assets\u002Fmanifest.webmanifest",509,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Fassets\u002Fmanifest.webmanifest",{"path":107,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":110,"sourceHtmlUrl":111},"evals\u002Fevals.json","REFERENCE","参考文档",19592,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Fevals\u002Fevals.json",{"path":113,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fcommands-and-args.md",5009,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Freferences\u002Fcommands-and-args.md",{"path":117,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fcompletions.md",4007,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Freferences\u002Fcompletions.md",{"path":121,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Fextraction-methods.md",12460,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Freferences\u002Fextraction-methods.md",{"path":125,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fflags.md",3921,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Freferences\u002Fflags.md",{"path":129,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fformat-guide.md",14142,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Freferences\u002Fformat-guide.md",{"path":133,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fgenerators.md",2266,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Freferences\u002Fgenerators.md",{"path":137,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fmonogram-patterns.md",16762,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Freferences\u002Fmonogram-patterns.md",{"path":141,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Fshape-templates.md",14893,"https:\u002F\u002Fgithub.com\u002Fcompozy\u002Fcompozy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffavicon-gen\u002Freferences\u002Fshape-templates.md",{"path":145,"resourceType":108,"resourceTypeDesc":109,"sizeBytes":146,"sourceHtmlUrl":147},"references\u002Ftesting.md",3800,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-spf13-cobra\u002Freferences\u002Ftesting.md",[149,173,190,210,222,236],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":47},"01M6WMNKD3Y4H9FGM8Q901F507","hierarchical-agents-md","init、update、audit 或 reorganize 以 AGENTS.md 与 README.md 为中心的层级项目文档： 初始化 Agent 指令、代码改动后更新文档、审计过期或冲突文档、重组仓库文档层级。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcustom\u002Fhierarchical-agents-md\u002FSKILL.md",[],[156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172],"hierarchical agents md","agents md","python","change","init","packages","update","git","audit","文档","README","maintenance","third-party","初始化","true","for","party",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":182,"publishedAt":47},"01M6CFS6BRTQPFZCDHQP97HYXR","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvueuse\u002Fvueuse-functions\u002FSKILL.md",[179],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[183,184,185,186,187,188,189,44],"functions","vueuse functions","https","vue","js","nuxt","build",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":198,"publishedAt":47},"01M6CFS34MDQXZPAWQFE5D7VGT","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[196,197],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},[199,200,201,186,38,202,203,44,204,205,206,207,208,209,187],"best practices","vue testing best practices","testing best practices","use","e2e testing","playwright","test","component","testing patterns","e2e","vitest",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":217,"publishedAt":47},"01M6CFS0N19MSJNTVM9AEQ7Z73","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[216],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},[218,219,186,199,44,206,220,221],"vue router best practices","router","lifecycle","navigation",{"skillNo":223,"name":224,"nameZh":6,"description":225,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":226,"categories":227,"keywords":229,"publishedAt":47},"01M6CFRYN31RFQFTE41Z6DCGKE","vue-pinia-best-practices","Pinia stores, state management patterns, store setup, and reactivity with stores.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[228],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},[230,231,199,186,232,233,234,235,44],"vue pinia best practices","pinia","state","management","state management","setup",{"skillNo":237,"name":238,"nameZh":6,"description":239,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":240,"categories":241,"keywords":251,"publishedAt":47},"01M6CFRW2DKXJHP05DYJ3P3Y2S","vue-options-api-best-practices","Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-options-api-best-practices\u002FSKILL.md",[242,243,246],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":244,"categoryName":245,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":247,"categoryName":248,"taxonomyType":249,"taxonomyTypeDesc":250},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[199,252,186,253,254,255,44,256,257,258],"api","vue options api best practices","data","methods","reference","only","context"]