[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75XQ7S4862T0RMNYP9P468F":3,"skill-same:01M75XQ7S4862T0RMNYP9P468F":84},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":14,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":57},"01M75XQ7S4862T0RMNYP9P468F","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 `samber\u002Fcc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I\u002FO patterns), see `samber\u002Fcc-skills-golang@golang-cli`.","sushichan044\u002Fgo-cli-sub-command-completion","sushichan044","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71284054?v=4","01M6CD61CFDCQYW4XTQ1CF5200","Kentaro Suzuki","01M75XMZ4B4C4XMZA1WKDQQBFK",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: golang-spf13-cobra\ndescription: \"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 `samber\u002Fcc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I\u002FO patterns), see `samber\u002Fcc-skills-golang@golang-cli`.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.0.1\"\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: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs\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. Context7 can help as a discoverability platform.\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 `samber\u002Fcc-skills-golang@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 `samber\u002Fcc-skills-golang@golang-cli` skill for general CLI architecture — project layout, exit codes, signal handling, I\u002FO patterns\n- → See `samber\u002Fcc-skills-golang@golang-spf13-viper` skill for configuration layering alongside cobra (flag → env → file → default precedence)\n- → See `samber\u002Fcc-skills-golang@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. Context7 can help as a discoverability platform.\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 `samber\u002Fcc-skills-golang@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 `samber\u002Fcc-skills-golang@golang-cli` skill for general CLI architecture — project layout, exit codes, signal handling, I\u002FO patterns\n- → See `samber\u002Fcc-skills-golang@golang-spf13-viper` skill for configuration layering alongside cobra (flag → env → file → default precedence)\n- → See `samber\u002Fcc-skills-golang@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,"license":15,"metadata":24,"description":7,"allowed-tools":35,"compatibility":36,"user-invocable":37},{"author":25,"version":26,"openclaw":27},"samber","1.0.1",{"emoji":28,"install":29,"homepage":30,"requires":31,"skill-library-version":34},"🐍",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":32},[33],"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","Designed for Claude Code or similar AI coding agents, and for projects using Golang.",true,"main","5bd2e2880509d8934a47694565489e55d58d3040",".agents\u002Fskills\u002Fgolang-spf13-cobra","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion","https:\u002F\u002Fgithub.com\u002Fsushichan044","A software engineer with a passion for novels and music.","2026-06-19 12:37:01",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":37},[47,50,53],{"tool":48,"command":49},"npx","npx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-spf13-cobra",{"tool":51,"command":52},"bunx","bunx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-spf13-cobra",{"tool":54,"command":55},"pnpm","pnpm dlx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-spf13-cobra","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002FSKILL.md",[58,64,68,72,76,80],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"evals\u002Fevals.json","REFERENCE","参考文档",19592,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Fevals\u002Fevals.json",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fcommands-and-args.md",5387,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Freferences\u002Fcommands-and-args.md",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fcompletions.md",4277,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Freferences\u002Fcompletions.md",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fflags.md",3921,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Freferences\u002Fflags.md",{"path":77,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fgenerators.md",2266,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Freferences\u002Fgenerators.md",{"path":81,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Ftesting.md",3800,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002Freferences\u002Ftesting.md",[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M75XQZ90ZTFP09ZH20ZHGG5G","golang-troubleshooting","Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber\u002Fcc-skills-golang@golang-benchmark` skill) or applying optimization patterns (→ See `samber\u002Fcc-skills-golang@golang-performance` skill).","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-troubleshooting\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M75XQS47M7BEJHGDBYB80GV7","golang-testing","Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky\u002Fslow tests. For testify-specific APIs see `samber\u002Fcc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber\u002Fcc-skills-golang@golang-benchmark`.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-testing\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M75XQJ26PB3HX3BE2Y9PQTRH","golang-structs-interfaces","Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON\u002FYAML\u002FDB serialization, or choosing between pointer and value receivers. Also use when the user asks about \"accept interfaces, return structs\", compile-time interface checks, or composing small interfaces into larger ones.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-structs-interfaces\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M75XQDAYJ2CBD5TRWY1P9CXA","golang-stretchr-testify","Comprehensive guide to stretchr\u002Ftestify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com\u002Fstretchr\u002Ftestify.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-stretchr-testify\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M75XQ289794Z4EVRBJCGM80V","golang-security","Security best practices and vulnerability prevention for Golang. Covers injection (SQL, command, XSS), cryptography, filesystem safety, network security, cookies, secrets management, memory safety, and logging. Apply when writing, reviewing, or auditing Go code for security, or when working on any risky code involving crypto, I\u002FO, secrets management, user input handling, or authentication. Includes configuration of security tools.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-security\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M75XPWT6EAP5M2DZZQGZCBMV","golang-samber-lo","Functional programming helpers for Golang using samber\u002Flo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurrency (Map, Filter, Reduce, GroupBy, Chunk, Flatten, Find, Uniq, etc.). Core immutable package (lo), concurrent variants (lo\u002Fparallel aka lop), in-place mutations (lo\u002Fmutable aka lom), lazy iterators (lo\u002Fit aka loi for Go 1.23+), and experimental SIMD (lo\u002Fexp\u002Fsimd). Apply when using or adopting samber\u002Flo, when the codebase imports github.com\u002Fsamber\u002Flo, or when implementing functional-style data transformations in Go. Not for streaming pipelines (→ See `samber\u002Fcc-skills-golang@golang-samber-ro` skill).","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-samber-lo\u002FSKILL.md",[],[]]