feat(skills): ship version-matched agent guides via pass-cli skills#148
Merged
Conversation
164be5f to
51cf328
Compare
pass-cli is evolving into a tool for humans *and* their AI agents, but the only agent-facing usage guidance lived in a hand-written personal skill on one machine — stale, unversioned, and invisible to anyone else. Adopt the agent-browser pattern: the CLI now self-serves its own skills, embedded in the binary via //go:embed so the guidance always matches the installed version and can't drift from shipped behavior. - `pass-cli skills list` / `skills get core [--full]` — a canonical safe-usage guide (exec/export/inject/agent/list/get + the leak traps) plus a full command reference, rewritten against the current binary. - `pass-cli skills install [--dir <path>] [--force]` — writes a thin discovery stub into a detected agent skills dir (~/.claude/skills or ~/.agents/skills) that points agents at `skills get core`; preserves an existing, differing stub unless --force. - New `internal/skills` package (first //go:embed in the repo) is the single source of truth; `cmd/skills.go` is a thin wrapper. Docs + CHANGELOG added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kVLjbUL4F4CkoA7RbMYy8
51cf328 to
41bf233
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
pass-cli is evolving into a tool for humans and their AI agents, but the only agent-facing usage guidance lived in a hand-written personal skill on one machine — stale, unversioned, invisible to anyone else.
This adopts the agent-browser pattern: the CLI self-serves its own skills, embedded in the binary via
//go:embed, so the guidance always matches the installed version and can't drift from shipped behavior.What's new
pass-cli skills list(or barepass-cli skills) — lists available skills with descriptions.pass-cli skills get core— the canonical agent safe-usage guide, rewritten against the current binary:exec(default) /export/inject/ theagentdaemon /list -q/get, the env-injection grammar, the v0.19.0base64/base64url/basicauthfilters, and the leak-trap checklist.--fullappends a complete command reference.pass-cli skills install [--dir <path>] [--force]— writes a thin discovery stub into a detected agent skills dir (~/.claude/skills→~/.agents/skills) pointing agents atskills get core. Idempotent; refuses to clobber a differing existing stub without--force.Design
internal/skills(the repo's first//go:embed) is canonical;cmd/skills.gois a thin wrapper. The embedded markdown is the only copy of the guidance — no drift.data/skills/<name>.mdauto-lists a new skill. Specialized skills (e.g. a credential-management/setup skill) and an MCP server are intentionally out of scope for this MVP.Testing
internal/skillstests (every listed skill is retrievable,--fullis a superset, frontmatter stripped, unknown-name errors, stub sanity) andcmdtests (install idempotency / refuse-without---force/--forceoverwrite; rune-safetruncate).mise run test(incl. integration),go vet,golangci-lint(whole repo),gofmt, markdownlint on the new doc, and an end-to-end run of every subcommand.🤖 Generated with Claude Code