- Docs
- Build a Catalogue
- Author a skill
- Add credentials to a skill
Add credentials to a skill
Keep credentials out of the AI loop: never in the repo, never in the agent's context. credbroker resolves them in-process.
Pick a broker, declare the credential in your skill’s SKILL.md, and resolve it in a script with credbroker.
The credentialed-skill contract
Section titled “The credentialed-skill contract”The metadata.auth field in your skill’s SKILL.md names how the credential reaches your script. Pick one of four brokers:
env— a plain environment variable, for CI runners and containers.cli— a vendor command that is already signed in, such asghoraws.creds— a static token you store once, read from your OS keychain. The example below uses it.sso-cookie— a browser session for a corporate single sign-on.
Declare the credential
Section titled “Declare the credential”Name the broker and the keys in your skill’s SKILL.md frontmatter:
metadata: credentialed: true auth: creds namespace: your-namespace keys: ["API_TOKEN"]The skill declares the key names only. The values never appear in the repository.
Resolve it in your script
Section titled “Resolve it in your script”Call credbroker from the skill’s scripts/ code, not from the agent:
from credbroker import load_credentials
creds = load_credentials("your-namespace", required_keys=["API_TOKEN"])The script builds the API request itself. The agent sees the result, not the token.
Set it up on first run
Section titled “Set it up on first run”Say “set up credentials” in your agent. That starts the credential-setup skill from the Credential Brokers pack. It prompts you for each key you declared and stores it in your OS keychain, so you type it once and it stays out of chat.
Where the rest lives
Section titled “Where the rest lives”Corporate SSO cookies, the other brokers, install options, and every lint rule are in the credentialed skill walkthrough. For why the design works this way, read Credentialed skills.