Claude Code Slash Commands and Skills (SKILL.md Frontmatter)

Custom slash commands and skills package repeatable workflows for your team. The exam checks where they live, how they are shared, and how frontmatter controls isolation, permissions and arguments (Task Statement 3.2).

Advertisement
📖 What You’ll Learn: You will be able to create shared commands and skills and control their isolation, permissions and arguments with frontmatter.

⌨️ Commands: project vs personal

  • .claude/commands/review.md — project command, committed, available to everyone who clones the repo.
  • ~/.claude/commands/ — personal commands, not shared.
⚠️ Watch out: Commands are not defined in CLAUDE.md, and there is no .claude/config.json commands array.

🎯 Skills and SKILL.md

---
name: explore-codebase
description: Map an unfamiliar area of the codebase and summarise entry points
context: fork
allowed-tools: Read, Grep, Glob
argument-hint: <directory or feature to explore>
---
Explore $ARGUMENTS. Return: purpose, entry points, key data flows, risks.
FrontmatterWhat it doesUse when
context: forkRuns the skill in an isolated sub-agent contextVerbose output (codebase analysis) or exploratory brainstorming would pollute the main session
allowed-toolsRestricts tools during the skillPrevent destructive actions (e.g. allow only file writes, no Bash)
argument-hintPrompts for required parametersUsers often invoke the skill without arguments

📘 Personal variants

To customise a team skill for yourself, create a copy under a different name in ~/.claude/skills/. Editing the team skill — even locally — affects others or gets shadowed.

Advertisement

📄 Skills vs CLAUDE.md

Skills are invoked on demand for task-specific workflows; CLAUDE.md is always loaded for universal standards. Conventions that must always apply belong in CLAUDE.md or rules, not in a skill.

🧪 Exam-Style Practice Questions

Try these before opening the answers. They use the same scenario style as the real exam.

Question 1. Where does a project slash command that every developer gets on clone belong?

  • A. `.claude/commands/` in the repo
  • B. CLAUDE.md
  • C. `.claude/config.json`
  • D. `~/.claude/commands/`
Show answer

Answer: A. Project-scoped and version-controlled. D is personal. B holds instructions, not commands. C doesn't exist.

Question 2. A skill should only write files and never run Bash. Which frontmatter enforces this?

  • A. `context: fork`
  • B. `paths`
  • C. `argument-hint`
  • D. `allowed-tools: Write, Edit` (or similar, excluding Bash)
Show answer

Answer: D. It restricts the tools available during the skill. A isolates context. C prompts for arguments. B belongs to rules.

Question 3. Developers often run `/migrate-schema` with no arguments and get poor output. What helps?

  • A. Plan mode
  • B. `context: fork`
  • C. A longer CLAUDE.md
  • D. `argument-hint: <table-name> <target-version>` in the skill frontmatter
Show answer

Answer: D. It prompts for the required parameters. B, C and A don't address missing arguments.

Advertisement

📝 Assignment

Do these tasks in order. Each one has a Done when check, so you know when it is complete. The stretch task is optional but close to what the exam expects from an architect. Keep your answers in one notes file or Git repository, and revisit them in your final week of revision together with the cheat sheet in the last lesson of this course.

  1. Task 1: Create .claude/commands/review.md with your team's review checklist and run it.
    ✅ Done when: A teammate can run /review after pulling the repository, and it follows your checklist.
  2. Task 2: Create a skill with context: fork, allowed-tools and argument-hint, and run it with and without arguments.
    ✅ Done when: Running the skill without arguments shows the argument hint, and its output does not flood the main conversation.
  3. Stretch: make a personal variant of a team skill under a different name in ~/.claude/skills/.
    ✅ Done when: Your personal variant has a different name, and the team skill still behaves exactly as before.
Advertisement

❓ Frequently Asked Questions

🤔 Where do team slash commands live?

In .claude/commands/ in the repository, so everyone gets them after cloning.

🤔 What does context: fork do?

It runs the skill in an isolated sub-agent context so its output does not crowd the main conversation.

🤔 How do I stop a skill running shell commands?

List only the tools it needs in allowed-tools, leaving out Bash.

🤔 Skill or CLAUDE.md?

Use a skill for on-demand, task-specific workflows and CLAUDE.md for standards that must always apply.

🏁 Summary

  • .claude/commands = team; ~/.claude/commands = personal.
  • context: fork isolates, allowed-tools restricts, argument-hint prompts.
  • Personal variants get a different name at user level.
📝 Test yourself: Mock Test 1 · Mock Test 4 (30 scenario-based questions in 60 minutes, with explanations).

Next, continue with Claude Code Plan Mode vs Direct Execution and Iterative Refinement.

🎬 Prefer video? Watch QA, automation and AI testing tutorials on the SQA Tools YouTube channel.

Independent study material by SQA Tools. Not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic. Mock questions are original practice items, not real exam content. Exam facts checked against Anthropic's official exam guides and certification FAQ on 11 November 2026.