using-keyward

using-keyward is a skill for Claude Code from albemiglio/keyward. It costs 68 tokens per session (915 once invoked), scanned C, original, MIT.

Instructions for safely using API keys stored by Keyward in protected secret files. They describe how to pass a key directly to a command without displaying its value.

In plain words
What is it for?
Use them whenever a prompt refers to a saved secret file, a secret reference, or asks the agent to use a vaulted API key.
Why use it?
They reduce the risk of exposing a saved credential in terminal output, the model's context, or the session transcript.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the keyward plugin — 1 skill, 4 commands, 1 hook shipped together

Good fit Use them whenever a prompt refers to a saved secret file, a secret reference, or asks the agent to use a vaulted API key.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/albemiglio/keyward/using-keyward
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add albemiglio/keyward --skill using-keyward
Clone the repo
git clone --depth 1 https://github.com/albemiglio/keyward

Made for: Claude Code.

Or install keyward, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 1 hook.

Wrote 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.

agentmods badge for using-keyward

README.md
[![agentmods](https://agentmods.dev/badge/skills/albemiglio/keyward/using-keyward/github.svg)](https://agentmods.dev/skills/albemiglio/keyward/using-keyward)
Your own site
<a href="https://agentmods.dev/skills/albemiglio/keyward/using-keyward"><img src="https://agentmods.dev/badge/skills/albemiglio/keyward/using-keyward/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.

agentmods 80×15 button for using-keyward

Your own site · 80×15
<a href="https://agentmods.dev/skills/albemiglio/keyward/using-keyward"><img src="https://agentmods.dev/badge/skills/albemiglio/keyward/using-keyward.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 915 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.00915
Opus 5.5 $0.00027 $0.00366
Sonnet 5.5 $0.00014 $0.00183
Haiku 4.5 $0.00007 $0.00092

Measured 2mo ago against content hash c74ff94b2479, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

using-keyward scanned grade C with 3 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

with chmod 600 permissions. When the user's prompt references one of these

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

transcript. If you `cat ~/.claude/secrets/openai.txt`, the value is now in the

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

export OPENAI_API_KEY=$(cat ~/.claude/secrets/openai.txt) && curl https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"
skills/using-keyward/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Using Keyward secrets safely

The Keyward plugin saves intercepted API keys to ~/.claude/secrets/<name>.txt with chmod 600 permissions. When the user's prompt references one of these files — directly or via a <<secret:NAME stored at ~/.claude/secrets/NAME.txt>> reference — you must read and use the value WITHOUT printing it.

The rule

Never cat a secret file as a top-level command, never echo its contents, never paste its value into your reply, never write it into a file the user can read alongside their code.

The contents of bash stdout are added to your context window and persist in the transcript. If you cat ~/.claude/secrets/openai.txt, the value is now in the conversation — defeating the entire purpose of the vault.

The pattern

Always inline-expand the secret as a shell variable in the same command that uses it. The value flows from disk → process env → tool, never appearing in your stdout.

✅ Correct

export OPENAI_API_KEY=$(cat ~/.claude/secrets/openai.txt) && curl https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"
GITHUB_TOKEN=$(cat ~/.claude/secrets/github_pat_classic.txt) gh api /user
ANTHROPIC_API_KEY=$(cat ~/.claude/secrets/anthropic.txt) python3 my_script.py

❌ Wrong

cat ~/.claude/secrets/openai.txt              # value into stdout → context
KEY=$(cat ~/.claude/secrets/openai.txt); echo $KEY  # explicit echo
head ~/.claude/secrets/openai.txt             # value into stdout
with open(os.path.expanduser("~/.claude/secrets/openai.txt")) as f:
    print(f.read())                           # printed → captured by stdout

When the user asks you to use a key

  1. Identify which slot to use (look for <<secret:NAME ...>> in the prompt, or ask if ambiguous).
  2. Choose the env-var name expected by the tool/SDK you're calling (OPENAI_API_KEY, ANTHROPIC_API_KEY, GITHUB_TOKEN, etc.).
  3. Use the inline-expansion pattern in a SINGLE bash command.
  4. In your reply, refer to "the saved key" — never repeat the value even if you accidentally observed it.

Read the full file on GitHub · 92 lines

Changes

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.

  1. 2mo ago First seen · 92 lines · 68 tokens per session scan C c74ff94b2479

Subscribe to this mod's changes

using-keyward is a skill published in the GitHub repository albemiglio/keyward (1 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 915 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 3 findings (asks for root, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

using-keyward compared with skills from other repositories

using-keyward next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
using-keywardalbemiglio/keywardSkill11mo agoMITC68Claude Code
fastapi-conventionsCypsy1714/cchadSkill14mo agoMITA26Claude Code, Codex
react-patternsCypsy1714/cchadSkill14mo agoMITA25Claude Code, Codex
remotion-conventionsCypsy1714/cchadSkill14mo agoMITA26Claude Code, Codex
typescript-conventionsCypsy1714/cchadSkill14mo agoMITA20Claude Code, Codex
django-conventionsCypsy1714/cchadSkill14mo agoMITA16Claude Code, Codex
express-conventionsCypsy1714/cchadSkill14mo agoMITA17Claude Code, Codex