apply-to-agents-md-git-root

apply-to-agents-md-git-root is a skill for Claude Code from aiya000/dotfiles. It costs 77 tokens per session (876 once invoked), scanned A, original, MIT.

A repository-knowledge updater that saves durable, non-obvious facts from the current conversation into AGENTS.md at the Git repository root. AGENTS.md is a guidance file that future coding agents can read; Git is a system for tracking code changes.

In plain words
What is it for?
Use it after a session to record reusable project facts in AGENTS.md, with a small CLAUDE.md pointer created when needed. It first checks that the project is a Git repository and scans new content for secrets.
Why use it?
It prevents future agents from repeating discoveries about hidden dependencies, startup steps, or infrastructure quirks. It also avoids saving temporary task details, existing documentation, or secrets.

Skill for Claude Code

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

Good fit Use it after a session to record reusable project facts in AGENTS.md, with a small CLAUDE.md pointer created when needed. It first checks that the project is a Git repository and scans new content for secrets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiya000/dotfiles/apply-to-agents-md-git-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-agents-md-git-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-agents-md-git-root

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiya000/dotfiles/apply-to-agents-md-git-root.svg)](https://agentmods.dev/skills/aiya000/dotfiles/apply-to-agents-md-git-root)
Your own site
<a href="https://agentmods.dev/skills/aiya000/dotfiles/apply-to-agents-md-git-root"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/apply-to-agents-md-git-root.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 876 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00077 $0.00876
Opus 5 $0.00039 $0.00438
Sonnet 5 $0.00015 $0.00175
Haiku 4.5 $0.00008 $0.00088

Measured 2d ago against content hash 18cf2aef73ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

apply-to-agents-md-git-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 2d 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-agents-md-git-root/SKILL.md · 70 lines

How it starts

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

apply-to-agents-md-git-root

Distill useful information from the current session into the project's AGENTS.md, so future agents working in this repo start already knowing it.

Steps

  1. Determine {git-root}: run git rev-parse --show-toplevel

    • If not in a git repository, stop and tell the user this skill requires a git repo
  2. Review the current conversation for information that is:

    • Non-obvious and not derivable by reading the code (a gotcha, a hidden dependency between components, a startup/recovery procedure, a networking quirk, an infra fact)
    • Durable — true beyond this one conversation, not a one-off task detail
    • Relevant to this repository specifically

    Do not extract:

    • Ephemeral task details, or a chronological blow-by-blow of what was done
    • Anything already documented in {git-root}/AGENTS.md, README.md, or derivable by reading the code / git log
    • Secrets or credentials

    If nothing meets this bar, tell the user there's nothing worth recording and stop here

  3. Read {git-root}/AGENTS.md if it exists

  4. Secret scan the new content before writing (see below)

  5. Write the distilled information into {git-root}/AGENTS.md:

    • Organize by topic/section — this is a living reference, not a chronological log
    • Merge into existing sections where topically related; add new sections otherwise
    • Keep entries concise — a fact, plus (where non-obvious) the reason it matters
  6. If {git-root}/CLAUDE.md does not already exist, create it with exactly this content and nothing else:

    Read `AGENTS.md` in this directory before doing anything else.
    
    • If {git-root}/CLAUDE.md already exists, leave it untouched — do not modify or overwrite it
  7. Review what was just added to AGENTS.md. If any of it is general-purpose (useful beyond this one repo — e.g. a Claude Code / sandbox behavior, a tool quirk, a workflow preference) and high-importance, use AskUserQuestion to ask whether to also apply it globally via the apply-to-claude-md-home-root skill. If the user agrees, invoke that skill, handing it the relevant excerpt

Read the full file on GitHub · 70 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. 2d ago First seen · 70 lines · 77 tokens per session scan A 18cf2aef73ad

Subscribe to this mod's changes

apply-to-agents-md-git-root is a skill published in the GitHub repository aiya000/dotfiles (19 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 876 once invoked, about $0.0004 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.