apply-to-claude-md-home-root

apply-to-claude-md-home-root is a skill for Claude Code from aiya000/dotfiles. It costs 66 tokens per session (571 once invoked), scanned A, original, MIT.

A skill for saving durable, general project knowledge to the global Claude configuration file at ~/.claude/CLAUDE.md. It checks for secrets, avoids duplicates, and reports what it added.

In plain words
What is it for?
Recording general workflow preferences, tool behavior, or other reusable facts in the user's global assistant instructions.
Why use it?
It preserves useful information across projects while reducing the risk of writing API keys, tokens, or private keys to the file.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Good fit Recording general workflow preferences, tool behavior, or other reusable facts in the user's global assistant instructions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiya000/dotfiles/apply-to-claude-md-home-root
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 aiya000/dotfiles --skill apply-to-claude-md-home-root
Clone the repo
git clone --depth 1 https://github.com/aiya000/dotfiles

Made for: Claude Code.

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 apply-to-claude-md-home-root

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiya000/dotfiles/apply-to-claude-md-home-root/github.svg)](https://agentmods.dev/skills/aiya000/dotfiles/apply-to-claude-md-home-root)
Your own site
<a href="https://agentmods.dev/skills/aiya000/dotfiles/apply-to-claude-md-home-root"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/apply-to-claude-md-home-root/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 apply-to-claude-md-home-root

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiya000/dotfiles/apply-to-claude-md-home-root"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/apply-to-claude-md-home-root.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00066 $0.00571
Opus 5 $0.00033 $0.00285
Sonnet 5 $0.00013 $0.00114
Haiku 4.5 $0.00007 $0.00057

Measured 5d ago against content hash 5ee6a3f9c7f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

apply-to-claude-md-home-root 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 5d 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.

.claude_global/skills/apply-to-claude-md-home-root/SKILL.md · 51 lines

What it actually says

apply-to-claude-md-home-root

Append durable, general-purpose information — not specific to any one project — to the user's global ~/.claude/CLAUDE.md.

Steps

  1. Identify the information to add:

    • If invoked with a specific excerpt (e.g. handed off from apply-to-agents-md-git-root), use that
    • Otherwise, review the current conversation for information that is general-purpose (true across projects — e.g. a Claude Code / sandbox behavior, a tool quirk, a workflow or communication preference) and durable
    • If nothing meets this bar, tell the user there's nothing worth recording globally and stop here
  2. Read ~/.claude/CLAUDE.md

  3. Secret scan the content before writing (see below)

  4. Merge the new information into the most relevant existing section, or add a new section if none fits

    • Keep it concise: the fact, and where non-obvious, why it matters
    • Do not duplicate information already present
  5. Write the updated file

  6. Report to the user what was added and where

Secret Scan

Before writing, check the content for:

  • API keys and tokens: strings starting with ghp_, gho_, AKIA, sk-, xox, or matching -----BEGIN.*PRIVATE KEY
  • Variables with sensitive names holding a value: patterns like API_KEY=, _SECRET=, _TOKEN=, PASSWORD=
  • Hardcoded absolute home paths: /Users/<name>/ or /home/<name>/ (prefer ~)
  • Personal or organizational proper nouns that could identify specific individuals or organizations

If any of the above are found, use AskUserQuestion to present:

  • "Save as-is" — proceed despite the finding
  • "Fix then save" — cancel so the user can fix it first
  • "Cancel" — abort without writing

Only proceed if the user selects "Save as-is", or if nothing suspicious was found.

Does Not

  • Add project-specific information — that belongs in the project's AGENTS.md instead
  • Rewrite or reorganize unrelated existing sections
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. 5d ago First seen · 51 lines · 66 tokens per session scan A 5ee6a3f9c7f0

Subscribe to this mod's changes

apply-to-claude-md-home-root is a skill published in the GitHub repository aiya000/dotfiles (19 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 571 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.