0Pricing
Claude Architect · Lesson

Skill Frontmatter

context: fork, allowed-tools and argument-hint.

Skill Frontmatter is a free Claude Architect lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Claude Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Frontmatter Matters

In Claude Code, a skill lives under .claude/skills/ and packages a reusable workflow. The body holds the instructions; the YAML frontmatter at the top configures how the skill executes.

Three frontmatter keys do most of the architectural work:

  • context: fork — isolate verbose output from your main session.
  • allowed-tools — restrict which tools the skill may use.
  • argument-hint — document the expected input.

Getting these right is the difference between a tidy, least-privilege skill and one that floods your context window or runs tools it never should.

Anatomy of a Skill File

A skill is a markdown file. The fenced YAML block at the very top is the frontmatter; everything below is the prompt Claude follows.

Note the distinction from the older .claude/commands/ directory (legacy) — .claude/skills/ is the current home. Both share project scope via VCS, while a copy under ~/.claude/ is personal and not shared with teammates.

---
name: audit-deps
description: Scan dependencies for known CVEs and summarize risk
context: fork
allowed-tools: Read, Grep, Glob, Bash
argument-hint: <package-name> [--severity high]
---

Audit the project's dependencies. If a package name is
provided as $ARGUMENTS, focus on that package; otherwise
scan all manifests. Report only HIGH and CRITICAL findings.

context: fork — The Core Idea

context: fork runs the skill in an isolated context branched from a shared point, then returns only the result to the main conversation. The verbose, intermediate output stays in the fork and never pollutes your primary window.

This is the same isolation principle behind an Explore subagent: discovery work generates a lot of noise, so you isolate it and hand back a clean summary. Skills make that pattern declarative — one line of frontmatter.

Why Isolation Protects Reliability

Context windows are not infinite, and models attend to the start and end of a long context more than the middle ("lost-in-the-middle"). A skill that greps hundreds of files or dumps long build logs into the main session pushes your real task into that weak middle zone.

context: fork keeps that bulk out. You preserve attention for what matters and avoid burning tokens on transient tool chatter that you'll never reference again.

When to Fork (and When Not To)

Fork when the skill produces verbose output you don't need to keep: dependency scans, log analysis, broad codebase exploration, test-suite runs.

Do not fork when the skill's full output is the deliverable you want inline in the main conversation — for example a short refactor of one file you're about to discuss. Forking there just adds a round-trip and hides detail you actually wanted.

  • Fork: noisy discovery, returns a summary.
  • No fork: small, surgical edits you keep working with.
---
name: analyze-logs
description: Parse the last 24h of error logs and surface top failure modes
context: fork
allowed-tools: Read, Grep, Bash
argument-hint: [service-name]
---

Grep the log files for ERROR/FATAL lines, group by message
template, and return ONLY the top 5 failure modes with counts.
Keep raw log lines inside this fork; do not echo them back.

allowed-tools — Least Privilege

allowed-tools restricts the skill to a named set of tools. This is the principle of least privilege applied to a workflow: a read-only audit skill should never hold Write or Edit.

It mirrors how you scope an agent's allowed_tools to its role. Narrow tool access reduces blast radius and also sharpens selection — fewer, well-scoped tools are chosen more reliably than a large grab-bag.

---
name: read-only-review
description: Inspect code and report findings WITHOUT modifying files
context: fork
allowed-tools: Read, Grep, Glob
argument-hint: <path-or-glob>
---

Review the matching files for correctness issues.
You may read and search only. Report findings as a list;
never attempt to edit — you have no write tools.

Restriction Is Not Enforcement

Be precise about what allowed-tools guarantees. It limits the menu of tools the skill can pick from — a useful, deterministic boundary on capability.

But it is not a substitute for a hook when a business rule must hold with certainty. If "never refund over $500" or "never push to main" has financial, legal, or safety stakes, enforce it with a deterministic hook (e.g. PostToolUse or an outgoing-call block), not by hoping the skill's prompt and tool list behave. Prompts are ~90% probabilistic; hooks are 100%.

argument-hint — Documenting Input

argument-hint describes the arguments the skill expects. It surfaces usage to the caller and documents intent — the angle-bracket and bracket convention signals required vs optional parameters.

Inside the body, those arguments arrive via $ARGUMENTS (or positional $1, $2). The hint is for humans and tooling; it does not parse or validate — your skill body decides how to interpret the input.

---
name: scaffold-endpoint
description: Generate a REST endpoint with handler, route, and test
allowed-tools: Read, Write, Edit, Glob
argument-hint: <resource-name> <http-method> [--auth]
---

Scaffold an endpoint for $1 using HTTP method $2.
If --auth is present, wire in the auth middleware.

Writing a Good argument-hint

A good hint follows the same discipline as a good tool description: state the input format, show the expected shape, and signal which parts are optional.

  • Use <required> for mandatory arguments.
  • Use [optional] for flags and extras.
  • Order positional arguments the way the body reads them.

An ambiguous hint causes misuse the same way an ambiguous tool description causes misrouting — clarity at the boundary prevents errors downstream.

The Three Keys Together

The keys compose into one coherent contract. A well-formed skill says: here is what I take (argument-hint), here is what I'm allowed to touch (allowed-tools), and here is how I keep your session clean (context: fork).

Read together, the frontmatter lets a teammate understand the skill's behavior and safety boundary without reading the body — exactly what shared, version-controlled config should provide.

---
name: security-scan
description: Static security scan; returns a ranked findings summary
context: fork
allowed-tools: Read, Grep, Glob, Bash
argument-hint: <path> [--fail-on critical]
---

Scan $1 for injection, secrets, and unsafe deserialization.
Run analysis in this fork; return a ranked summary only.
You have no Write/Edit tools — report, do not patch.

Scope and Sharing

Where the skill file lives decides who gets it. A skill in the project's .claude/skills/ is committed to VCS and shared with the whole team. A skill under ~/.claude/skills/ is personal — a new teammate cloning the repo will never see it.

This is the same trade-off as user-level vs project-level CLAUDE.md. If a skill encodes a team standard, commit it to project scope so the contract travels with the code.

Quick Check

Apply what you've learned to a concrete design decision.

Recap

Skill frontmatter is a compact safety-and-clarity contract built from three keys:

  • context: fork — isolate verbose output, return a clean summary, protect the main context window from lost-in-the-middle dilution.
  • allowed-tools — least-privilege capability boundary; restricts the tool menu but does NOT enforce business rules — use a deterministic hook for policies with financial/legal/safety stakes.
  • argument-hint — documents expected input (<required> vs [optional]); like a good tool description, clarity here prevents misuse. It does not validate.

Commit team skills to project .claude/skills/ so the contract ships with the code; keep personal ones in ~/.claude/.

Frequently asked questions

Is the “Skill Frontmatter” lesson free?

Yes — the full text of “Skill Frontmatter” is free to read here on the web, and the Claude Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Claude Architect course, upgrade to CoddyKit PRO.

What will I learn in “Skill Frontmatter”?

context: fork, allowed-tools and argument-hint. You practise Claude Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Claude Architect?

No prior experience is required. Claude Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Skill Frontmatter” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Claude Architect lesson?

Yes. Every Claude Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Custom Commands vs Skills
  2. Skill Frontmatter
  3. Plan Mode vs Direct Execution
  4. Iterative Refinement with Examples
← Back to Claude Architect