bash-ble
Use when working with ble.sh (Bash Line Editor) internals — completion system, cand/yield, menu styles, progcomp integration,…
Use when developing or debugging spf13/cobra internals — Command struct internals, ExecuteC dispatch, Find vs Traverse, flag set hierarchy, completion engine (__complete, getCompletions, ShellCompDirective), shell script generation (bash V1/V2, zsh, fish, powershell), flag group
Claude Code
$ npx -y skills add carapace-sh/carapace --skill cobra-dev --agent claude-code
Codex
$ npx skills add carapace-sh/carapace --skill cobra-dev -a codex -y
Cursor
$ npx skills add carapace-sh/carapace --skill cobra-dev -a cursor -y
Gemini CLI
$ npx skills add carapace-sh/carapace --skill cobra-dev -a gemini-cli -y
GitHub Copilot
$ npx skills add carapace-sh/carapace --skill cobra-dev -a github-copilot -y
OpenCode
$ npx skills add carapace-sh/carapace --skill cobra-dev -a opencode -y
Windsurf
$ npx skills add carapace-sh/carapace --skill cobra-dev -a windsurf -y
name: cobra-dev description: > Use when developing or debugging spf13/cobra internals — Command struct internals, ExecuteC dispatch, Find vs Traverse, flag set hierarchy, completion engine (__complete, getCompletions, ShellCompDirective), shell script generation (bash V1/V2, zsh, fish, powershell), flag group validation, global state, Levenshtein suggestions, or understanding the internal execution model. Triggers on: "cobra internals", "cobra ExecuteC", "cobra Find", "cobra Traverse", "cobra findNext", "cobra mergePersistentFlags", "cobra ParseFlags", "cobra getCompletions", "cobra __complete", "cobra completion engine", "cobra bash V2", "cobra flag resolution", "cobra flag groups internals", "cobra global state", "cobra EnablePrefixMatching", "cobra EnableCaseInsensitive", "cobra Levenshtein", "cobra stripFlags", "cobra legacyArgs", "cobra execute", "cobra preRun", "cobra postRun", "cobra mousetrap", "cobra templateFuncs". user-invocable: true
Reference for developing and debugging [cobra](https://github.com/spf13/cobra) internals. Covers the Command struct, execution flow, flag resolution, completion engine, and shell script generation.
os.Args[1:]
→ ExecuteC()
→ Root().ExecuteC() (always starts at root)
→ InitDefaultHelpCmd, initCompleteCmd, InitDefaultCompletionCmd
→ Find(args) or Traverse(args) (based on TraverseChildren)
→ findNext() (exact match → alias → prefix match)
→ execute(flags)
→ ParseFlags
→ ValidateArgs
→ PersistentPreRun chain (parent → child)
→ PreRun
→ ValidateRequiredFlags, ValidateFlagGroups
→ Run / RunE
→ PostRun
→ PersistentPostRun chain (child → parent)Load the reference that matches your task. When in doubt, load multiple references.
| Keywords | Reference | |----------|----------| | Command struct, all fields, internal state, commands slice, parent, flags, pflags, lflags, iflags, parentsPflags, FParseErrWhitelist, CompletionOptions, commandCalledAs, ctx | [references/command-struct.md](references/command-struct.md) | | ExecuteC, execute, Find, Traverse, findNext, stripFlags, argsMinusFirstX, legacyArgs, command resolution, flag stripping, prefix matching, TraverseChildren | [references/execute-flow.md](references/execute-flow.md) | | Flags, PersistentFlags, LocalFlags, InheritedFlags, LocalNonPersistentFlags, NonInheritedFlags, mergePersistentFlags, ParseFlags, flag set hierarchy, parentsPflags, globNormFunc, Flag lookup, persistentFlag lookup | [references/flag-resolution.md](references/flag-resolution.md) | | __complete, __completeNoDesc, getCompletions, checkIfFlagCompletion, ShellCompDirective, CompletionFunc, RegisterFlagCompletionFunc, flagCompletionFunctions, completion output format, directive handling, ValidArgsFunction, completion flow | [references/completion-engine.md](references/completion-engine.md) | | bash V1, bash V2, zsh, fish, powershell, GenBashCompletion, GenBashCompletionV2, GenZshCompletion, GenFishCompletion, GenPowerShellCompletion, script architecture, V1 vs V2 comparison, completion script internals | [references/shell-completions.md](references/shell-completions.md) | | flag groups, MarkFlagsRequiredTogether, MarkFlagsMutuallyExclusive, MarkFlagsOneRequired, ValidateFlagGroups, processFlagForGroupAnnotation, annotation storage, requiredAsGroupAnnotation, oneRequiredAnnotation, mutuallyExclusiveAnnotation, enforceFlagGroupsForCompletion | [references/flag-groups-internals.md](references/flag-groups-internals.md) | | global state, OnInitialize, OnFinalize, initializers, finalizers, EnablePrefixMatching, EnableCaseInsensitive, EnableCommandSorting, EnableTraverseRunHooks, templateFuncs, AddTemplateFunc, MousetrapHelpText, MousetrapDisplayDuration, CheckErr, Gt, Eq | [references/global-state.md](references/global-state.md) | | suggestions, Levenshtein, findNext, prefix matching, case-insensitive, SuggestFor, SuggestionsMinimumDistance, DisableSuggestions, ld function, hasNameOrAliasPrefix, commandNameMatches | [references/suggestions.md](references/suggestions.md) |
Command argument completion generator for [cobra]. Supported shells: Bash Cmd (experimental) Elvish Fish Nushell Oil Powershell Tcsh (experimental) Xonsh Zsh
Use when working with ble.sh (Bash Line Editor) internals — completion system, cand/yield, menu styles, progcomp integration,…
Use when working with bash shell internals — programmable completion, Readline, quoting/expansion, execution model, startup…
Use when developing or debugging the carapace library — Action API, traverse engine, shell formatters, style system, pflag…
Use when working with clink or cmd.exe shell internals — clink completion system, argmatcher Lua API, match generators, Readline…
Use when creating a compound skill — a structured knowledge base for a project or topic that uses a SKILL.md routing table and…
Use when working with elvish shell internals — completion system, arg-completer, complex-candidate, matcher, complete-getopt,…
Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI…
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a…
Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on…
Set up a new integration, connector, or CLI binding for any API. Wrap or generate a ship-ready Go CLI from an OpenAPI, HAR, or…