CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

golang-spf13-cobra

Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage/help template customization, man-page and markdown doc generation, and testing with SetArgs/SetOut/SetErr. Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`. For configuration layering alongside cobra, see the `samber/cc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I/O patterns), see `samber/cc-skills-golang@golang-cli`.

72

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, actionable cobra skill body with copy-paste-ready Go examples and clean one-level-deep progressive disclosure. The main improvement opportunity is removing the Best Practices/Common Mistakes redundancy and surfacing explicit validation feedback loops inline.

Suggestions

Collapse the Best Practices list into the Common Mistakes table (or vice versa) to remove the duplicated Run/RunE, args-validation, OutOrStdout, and fresh-tree-per-test points.

Add one short inline validate→fix→retry note (e.g. 'run tests after wiring PersistentPreRunE; if a child drops the parent hook, re-add the explicit call') rather than only deferring feedback loops to testing.md.

DimensionReasoningScore

Conciseness

The body is lean: compact tables, terse rules with ✓ marks, and real code rather than padded prose. It is not a 5 because the Best Practices list recapitulates the Common Mistakes table (Run vs RunE, args validation, OutOrStdout, fresh tree per test), a minor redundancy that could be trimmed.

4 / 5

Actionability

Examples are copy-paste-ready, executable Go — rootCmd construction with SilenceUsage/SilenceErrors, PersistentFlags/Flags with MarkFlagRequired and MarkFlagsMutuallyExclusive, a complete TestServeCmd test, and the `go get` command — covering the common cases concretely.

5 / 5

Workflow Clarity

Build/Extend/Review modes plus ordered sections (command tree → Run* → Args → flags → completions → testing) give a clear sequence, and Review mode supplies a verification checklist via the Common Mistakes table. It is not a 5 because explicit validate→fix→retry feedback loops are deferred to references rather than stated in the main body.

4 / 5

Progressive Disclosure

Concise overview sections each link to a real, one-level-deep reference file (verified to exist and to contain no nested .md links), capped by a Further Reading index and cross-references to sibling skills, making navigation easy.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, specific description with an explicit 'Apply when...' trigger, concrete capability enumeration, and clear disambiguation from sibling skills. Its only weakness is a term list weighted toward API symbols over natural user phrasing.

Suggestions

Lead the trigger clause with a few natural-sounding synonyms a user would actually say (e.g. 'CLI subcommands', 'cobra command tree') before the API-symbol list, so trigger matching favors user phrasing.

Consider trimming one or two of the most obscure symbols (e.g. ShellCompDirective, RegisterFlagCompletionFunc) from the description to sharpen the most common trigger terms.

DimensionReasoningScore

Specificity

The description enumerates many concrete capabilities — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, named Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, completions, doc generation, and testing with SetArgs/SetOut/SetErr — giving comprehensive coverage rather than a single abstract claim.

5 / 5

Completeness

It answers both 'what' (the full feature surface) and 'when' explicitly via 'Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`', with concrete trigger phrases.

5 / 5

Trigger Term Quality

It includes solid natural triggers ('cobra', 'CLI command tree', 'Apply when using or adopting spf13/cobra', and the import-path trigger), but much of the term list is API-symbol jargon (ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective) rather than phrases a user would naturally say, so it falls just short of comprehensive synonym/extension coverage.

4 / 5

Distinctiveness Conflict Risk

It carves a clear cobra-specific niche and explicitly disambiguates from the viper config-layering skill and the general CLI-architecture skill, minimizing overlap and wrong-skill triggers.

5 / 5

Total

19

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

allowed_tools_field

'allowed-tools' contains unusual tool name(s)

Warning

metadata_field

'metadata' should map string keys to string values

Warning

Total

14

/

16

Passed

Repository

samber/cc-skills-golang

Path

skills/golang-spf13-cobra/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.