0PricingLogin
Claude Architect · Lesson

Skill Frontmatter

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

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.

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