Borrowing it
Nothing to install: this file belongs to PascaleBeier/hitkeep. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PascaleBeier/hitkeep/main/.agents/skills/cobra-viper/SKILL.mdgit clone --depth 1 https://github.com/PascaleBeier/hitkeepWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/pascalebeier/hitkeep/cobra-viper)<a href="https://agentmods.dev/skills/pascalebeier/hitkeep/cobra-viper"><img src="https://agentmods.dev/badge/skills/pascalebeier/hitkeep/cobra-viper/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/pascalebeier/hitkeep/cobra-viper"><img src="https://agentmods.dev/badge/skills/pascalebeier/hitkeep/cobra-viper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 110 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
- medium Rogue Agent · line 249 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00104 | $0.04315 |
| Opus 5.5 | $0.00042 | $0.01726 |
| Sonnet 5.5 | $0.00021 | $0.00863 |
| Haiku 4.5 | $0.00010 | $0.00432 |
Grade A, and why
cobra-viper scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to cobra-viper — 64 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 447 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go CLI Architecture: Cobra & Viper
Idiomatic patterns and best practices for building robust, configuration-driven command-line interfaces using Cobra and Viper.
When to Activate
- Writing a new CLI application in Go
- Adding commands, subcommands, or flags to an existing Cobra application
- Integrating Viper for configuration file, environment variable, or flag management
- Reviewing or refactoring CLI code that uses Cobra and/or Viper
- Designing the command structure or configuration schema for a CLI tool
- Testing CLI commands
Core Philosophy
The Command-First Architecture
Treat your application binary as a router for commands. The CLI framework (Cobra) should solely handle flags, arguments, and routing. Your core business logic should remain completely unaware of the CLI layer, making it highly testable and reusable.
Unified Configuration
Configuration should be environment-aware and unified. Viper acts as the single source of truth, merging defaults, config files, environment variables, and command-line flags into a cohesive state before passing it to the application logic.
Commands Are Built, Not Declared
Construct the command tree with factory functions (NewRootCmd()), not package-level var declarations. Globals make commands untestable (state leaks between test runs) and unusable as a library. The only global in a well-built CLI is main.go calling the factory.
CLI Package Organization
Anti-Pattern: Hiding all your commands and core logic deep inside an internal/ directory tree, or shoving everything into main.go.
Discoverable, Flat Structures
Command routing and business logic should live in standard, logically named packages. The cmd/ package handles the CLI surface area, while other top-level packages handle the domain logic.
mycli/
├── main.go # Minimal entry point: strictly calls cmd.Execute()
├── cmd/ # The Cobra routing layer
│ ├── root.go # Root command factory, global flags, Viper setup
│ ├── serve.go # The 'serve' subcommand
│ └── build.go # The 'build' subcommand
├── engine/ # Core business logic (name based on your domain)
│ ├── server.go
│ └── compiler.go
├── go.mod
└── go.sum
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 447 lines · 104 tokens per session scan A e215454171a0
cobra-viper is a skill published in the GitHub repository PascaleBeier/hitkeep (98 stars, last pushed 16d ago), licensed MIT. It adds 104 tokens to every session and 4,315 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to cobra-viper, differing in 64 lines, and is treated as a copy.
cobra-viper compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cobra-viperPascaleBeier/hitkeep | Skill | 98 | 16d ago | MIT | A | 104 | Claude Code |
| memory-indexdimetron/pi-go | Skill | 222 | 4d ago | MIT | A | 0 | Claude Code, Codex |
| memory-minedimetron/pi-go | Skill | 222 | 4d ago | MIT | A | 35 | Claude Code |
| memory-statusdimetron/pi-go | Skill | 222 | 4d ago | MIT | A | 27 | Claude Code |
| cartographer-kb-createBeppeTemp/cartographer | Skill | 55 | yesterday | Apache-2.0 | A | 53 | Claude Code, Codex |
| cartographer-kb-importBeppeTemp/cartographer | Skill | 55 | yesterday | Apache-2.0 | A | 51 | Claude Code, Codex |
| cartographer-kb-doctorBeppeTemp/cartographer | Skill | 55 | yesterday | Apache-2.0 | A | 91 | Claude Code, Codex |