agentleFS
stevedericostevederico/agent-keychain/src/skill.md

src

Skill8 starsChanged 27 days agoMITView on GitHub

The user keeps secrets (API tokens, passwords) in agent-keychain. You get one only after the user approves your request with their password. Use it inline, in the one command that needs it: Never retry a denied or throttled request in a loop. Add --json to get errors as {"error": "...", "code": 2} (not for get, which always prints the raw value). If nothing works, run agent-keychain doctor and show the user its output. If a task needs the same secret…

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. Langspan/LangSpan.dev★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use it inline, in the one command that needs it:

    line 7
  2. Distinctive:

    Never print, echo, log or write a secret to a file, and never paste one into your reply

    line 19
  3. Distinctive:

    Never store a secret in a variable that outlives the command

    line 20
  4. Distinctive:

    Ask for the narrowest secret the task needs, and only when you need it

    line 21
  5. Distinctive:

    Never retry a denied or throttled request in a loop.

    line 33
  6. Very specific:

    Add --json to get errors as {"error": "...", "code": 2} (not for get, which always prints the raw value).

    line 35
  7. Distinctive:

    If a task needs the same secret many times, ask the user to start you with:

    line 39
  8. Very specific:

    Never run allow, deny or unallow.

    line 53
  9. Distinctive:

    Never rename your process or run under another agent's name to match a rule

    line 54
  10. Very specific:

    Do not run set, rm or import unless the user asked you to change secrets

    line 58
  11. Distinctive:

    Do not try to read secrets from other processes or from the vault files

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

agent-keychain: guide for AI agents

The user keeps secrets (API tokens, passwords) in agent-keychain. You get one only after the user approves your request with their password.

Get a secret

Use it inline, in the one command that needs it:

GITHUB_TOKEN=$(agent-keychain get github) gh pr list
  • agent-keychain list shows the names. It never prompts. list --json gives a JSON array
  • agent-keychain log --json shows recent requests and their outcomes as JSON
  • Each get shows the user a password prompt naming the secret and your process

Rules

  • Never print, echo, log or write a secret to a file, and never paste one into your reply
  • Never store a secret in a variable that outlives the command
  • Ask for the narrowest secret the task needs, and only when you need it
  • The user sees every request in agent-keychain log

Exit codes

CodeMeaningWhat to do
0ApprovedContinue
2DeniedStop. Ask the user why; do not retry
1ErrorRead the message. busy: another prompt is open, wait for it. try again in Ns: a recent denial, wait or ask the user. no secret named x: ask the user to run agent-keychain set x
64UsageFix the command

Never retry a denied or throttled request in a loop.

Add --json to get errors as {"error": "...", "code": 2} (not for get, which always prints the raw value). If nothing works, run agent-keychain doctor and show the user its output.

Many requests

If a task needs the same secret many times, ask the user to start you with:

agent-keychain with github --for 2h -- <your command>

They approve once; you and your child processes then get github without prompts until it expires. You cannot set this up yourself without the user approving it. The user can end it early with agent-keychain revoke; after that your next get prompts again.

Rules the user set

The user may allow or deny agents by process name (agent-keychain rules lists them).

  • An allow rule for you: get returns with no prompt
  • A deny rule: get exits 2 at once, with no prompt. Treat it as a denial: stop, do not retry
  • Never run allow, deny or unallow. They need the user's password, and they are refused from inside an agent anyway
  • Never rename your process or run under another agent's name to match a rule

Do not

  • Do not run set, rm or import unless the user asked you to change secrets
  • agent-keychain scan is the user's tool for finding keys in plain files; run it only when asked
  • Do not try to read secrets from other processes or from the vault files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.