CLAUDE

A guide to creating custom agent files for Claude Code, an AI coding assistant. It explains the YAML header and descriptions Claude uses to decide when an agent should run.

In plain words
What is it for?
Use it when creating or editing files in .claude/agents/, especially when writing agent names, models, and trigger descriptions.
Why use it?
It prevents configuration errors that stop custom agents from loading or make them difficult to select for the right requests.

Agent

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.

agentmods
npx agentmods add agents/technickai/ai-coding-config/claude
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/ai-coding-config
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 739 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00739
Opus 5 $0.00000 $0.00369
Sonnet 5 $0.00000 $0.00148
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

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

plugins/core/agents/CLAUDE.md · 123 lines

How it starts

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

Creating Claude Code Agents

When creating custom agent files in .claude/agents/, the YAML frontmatter format matters.

Valid Frontmatter Format

---
name: agent-name
# prettier-ignore
description: "Use when reviewing for X, checking Y, or verifying Z - include all semantic triggers"
model: opus
---

Critical constraints:

  • Single line only - Claude Code doesn't parse block scalars (> or |) correctly
  • Use # prettier-ignore - Add before description to allow longer, richer triggers
  • Use quotes - Always quote descriptions to handle special characters like colons

Description Philosophy

Agents are LLM-triggered. Descriptions should match against user requests to enable Claude Code to auto-select the right agent. Use "Use when..." format with rich semantic triggers.

Do: Match user language

Think about what users will say:

  • "review the code"
  • "check if this is production ready"
  • "debug this error"
  • "test in the browser"

Include those exact phrases in your descriptions.

Do: Include variations

# prettier-ignore
description: "Use when reviewing for production readiness, fragile code, error handling, resilience, reliability, or catching bugs before deployment"

This triggers on: "review for production", "check fragile code", "error handling review", "catch bugs", etc.

Don't: Describe what it does

Bad: "A code reviewer that analyzes production readiness and error handling patterns"

This is technical documentation, not a semantic trigger.

Example Agent

---
name: test-runner
# prettier-ignore
description: "Use when running tests, checking test results, or verifying tests pass before committing"
model: haiku
---
I run tests using the specified test runner (bun, pnpm, pytest, etc) and return a terse
summary with pass count and failure details only. This preserves your context by
filtering verbose test output to just what's needed for fixes.

[Rest of agent prompt...]

Reviewer Agent Structure

Read the full file on GitHub · 123 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 · 123 lines · 0 tokens per session scan A 27fc302808e6

Subscribe to this mod's changes

CLAUDE is an agent published in the GitHub repository TechNickAI/ai-coding-config (24 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 739 tokens. 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-08-30.