agent-config

agent-config is a skill for Claude Code from dennishavermans/agentfile. It costs 51 tokens per session (816 once invoked), scanned A, original, MIT.

A skill for writing and checking coding-agent configuration, including permissions, hooks, skills, and MCP servers. It explains how wildcard permission rules are matched and how broad rules can allow more commands than intended.

In plain words
What is it for?
Use it when editing settings.json, permission rules, hooks, skills, or MCP server definitions, especially when reviewing command permissions.
Why use it?
It helps prevent configuration rules from granting unsafe command access by accident. It also provides a way to check configuration with agentfile.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the agentfile plugin — 1 skill, 1 hook shipped together

Good fit Use it when editing settings.json, permission rules, hooks, skills, or MCP server definitions, especially when reviewing command permissions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dennishavermans/agentfile/agent-config
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 dennishavermans/agentfile --skill agent-config
Clone the repo
git clone --depth 1 https://github.com/dennishavermans/agentfile

Made for: Claude Code.

Or install agentfile, the plugin that ships this one along with the rest of its 1 skill, 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 agent-config

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dennishavermans/agentfile/agent-config"><img src="https://agentmods.dev/badge/skills/dennishavermans/agentfile/agent-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 816 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.00051 $0.00816
Opus 5 $0.00026 $0.00408
Sonnet 5 $0.00010 $0.00163
Haiku 4.5 $0.00005 $0.00082

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

Security

Grade A, and why

agent-config 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.

plugin/skills/agent-config/SKILL.md · 86 lines

How it starts

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

Writing agent configuration that means what it says

Permission rules are the part people get wrong, because a rule that looks narrow can be wide. The behaviour below was measured on Claude Code 2.1.238 with a write probe, a command that creates a file, so the read-only classifier could not approve it on its own.

The one thing to know

Everything before the first * is matched as written, and that prefix is the only thing limiting the rule. The wildcard spans spaces.

Nearly every dangerous rule follows from that sentence.

Rule shapes that grant more than they read

A wildcard where the subcommand goes leaves only the program.

Bash(git * main) reads as "git something main". It approves every git subcommand and every option before it. Measured with that rule as the only rule present: git branch -D main deleted the branch, and git -c core.fsmonitor=<script> diff main ran the named script. -c core.fsmonitor= makes git run a program you name, so this rule is arbitrary command execution.

A leading wildcard leaves nothing at all.

Bash(* --version) has no prefix, so nothing limits it. Measured: bash -c 'touch <marker>' --version ran and the marker appeared. The tail still has to match, which is exactly what makes the rule read narrower than it is.

A runner passes the wildcard to a shell.

Bash(npx *), Bash(uvx *) and friends approve any command, because the runner executes its arguments. The rule limits the runner, not what runs.

gh api writes look like reads.

A rule shaped for fetching also approves mutation, because the method is a flag. -X, --method, -f, -F, --field, --raw-field and --input all turn a GET into a write, and short flags cluster, so -fkey=value is -f.

Some rules approve nothing at all.

:* is only recognised at the end of a pattern. A shell separator like && splits a command before rules are matched, so a rule containing one never fires. These are the harmless half of the same misunderstanding, and they are worth fixing because they give false confidence.

Read the full file on GitHub · 86 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 · 86 lines · 51 tokens per session scan A 0d05aac10c36

Subscribe to this mod's changes

agent-config is a skill published in the GitHub repository dennishavermans/agentfile (9 stars, last pushed 3d ago), licensed MIT. It adds 51 tokens to every session and 816 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-10.