Task statement 3.2 · Claude Code configuration and workflows

Create and configure custom slash commands and skills

Developers in the monorepo run the team's review checklist by pasting it into Claude. You want one /review command that everyone gets on clone, and you want its codebase analysis kept out of their conversation.

Why it's tested

The tempting fixes each solve the other problem. When teammates lack /review, making the skill run in a subagent changes where output lands, not who has the file. When a skill floods the conversation, moving it to ~/.claude/ changes who has it, not where its reads land. Pasting the checklist into CLAUDE.md reaches everyone, but it creates no command and it costs tokens in every session.

KnowledgeScope: the directory decides who gets the command

A custom slash command is a markdown file whose body becomes the prompt when someone types its name, and its directory decides who has it. A file in .claude/commands/ is project-scoped: it is shared via version control, so every developer who clones gets /review. A file in ~/.claude/commands/ is user-scoped, so it works in all your projects and nobody else has it. When a new developer reports that /review is missing, the fix is to commit the file, not to rewrite it.

Skills use the same two scopes, .claude/skills/ and ~/.claude/skills/, with one folder and one SKILL.md per skill. Current Claude Code has merged custom commands into skills, so .claude/commands/review.md and .claude/skills/review/SKILL.md both create /review. In both, $ARGUMENTS expands to what the developer typed after the name, so /review packages/api reviews packages/api.

repo/.claude/commands/review.md     # committed: every clone gets /review
repo/.claude/skills/review/SKILL.md # same, as a skill
~/.claude/commands/review.md        # your machine only

Knowledgecontext: fork: where a skill's output lands

A skill runs inline by default, so everything it reads lands in your main conversation and stays there. A codebase analysis that reads forty files to answer one question leaves all forty in context. context: fork is the frontmatter setting that runs the skill in an isolated sub-agent context instead, so the reads cost a subagent's own context window and only its result returns, which keeps skill output from polluting the main conversation. Fork a skill that produces verbose output, such as codebase analysis, or exploratory context, such as brainstorming alternatives. A forked /compare-caching skill that drafts three cache designs keeps the two you reject in the subagent.

The agent: field names the kind of subagent that runs the fork. It defaults to general-purpose, which has every tool, while Explore and Plan are read-only.

# .claude/skills/analyze-module/SKILL.md
---
description: Map a package's exports and their test coverage
context: fork
agent: Explore
---
Analyze $ARGUMENTS. List each export, where it is used, and
whether a test covers it. Return at most 30 lines.
  1. You type /analyze-module packages/api, or Claude invokes the skill because its description matches.
  2. Claude Code starts an Explore subagent with its own context window.
  3. The subagent gets the SKILL.md content as its prompt and none of your conversation history.
  4. It runs the forty reads there.
  5. Its result returns to your conversation. It runs in the background by default; a -p run waits for it.

Interactive · choose how the skill runs

Comparison of a skill running inline, where forty file reads accumulate in the main conversation context, and with context fork, where they accumulate in a subagent's own context window outside it and only the result returns Default — runs inline MAIN CONVERSATION CONTEXT your prompt + SKILL.md content Read × 40 — full file contents Grep output, directory listings intermediate reasoning, dead ends the answer you actually wanted MAIN CONTEXT USED All of it stays for the rest of the session. context: fork MAIN CONVERSATION CONTEXT prompt + skill invocation nothing lands here while the fork runs returned summary only MAIN CONTEXT USED Two blocks. Nothing else. SUBAGENT · OWN CONTEXT Read × 40 Grep, dead ends SKILL.md as prompt summary returned

Choose how the skill runs.

Inline · the forty file reads, the search output and the dead ends all stay in the main conversation context for the rest of the session.

context: fork · the subagent does the same work in its own context window, outside the main one. Only its summary crosses back.

Same skill, same forty files. Inline, every read stays in the main conversation. With context: fork, the reads cost the subagent's own context window, drawn outside the main one, and only the summary crosses back.

KnowledgeThe three frontmatter fields the guide names

All three fields apply only while the skill runs, and the guide gives each a job. context: fork isolates the skill's work, as above. In the guide's terms, allowed-tools is the field that restricts tool access during skill execution, for example limiting a skill to file write operations to prevent destructive actions. argument-hint is the field that prompts developers for required parameters when they invoke the skill without arguments. The docs define the last two more narrowly, as the notes below explain.

More precise than the guide. The docs define allowed-tools as tools Claude can use without asking permission, and that grant ends when you send your next message. Unlisted tools stay callable under your normal permission settings, so nothing is restricted. The field that removes tools is disallowed-tools (checked 2026-10-01). Exam answer: allowed-tools restricts a skill's tool access.

More precise than the guide. The docs define argument-hint as a hint shown during autocomplete, so the developer sees [service-name] while typing. Nothing asks for a missing argument after invocation, so the skill body should say what to do without one (checked 2026-10-01). Exam answer: argument-hint prompts developers for required parameters.

SkillA scaffolding skill limited to file writes

The platform team's /new-service skill scaffolds services in packages/api/services/. Last week a developer typed /new-service with no name and Claude guessed one, and in another run Claude proposed rm -rf packages/api/services/billing to clear an old folder. The guide's fix is argument-hint for the name and allowed-tools limited to file writes.

# .claude/skills/new-service/SKILL.md
---
argument-hint: "[service-name]"
allowed-tools: Write     # the guide's fix
disallowed-tools: Bash   # removes the shell
---
Create packages/api/services/$ARGUMENTS/ with index.ts and a test.
If no service name was given, ask for one and write nothing.

Run /new-service invoices and Claude writes both files under packages/api/services/invoices/ without a permission prompt, because allowed-tools: Write pre-approves Write. An rm -rf would still only meet your normal permission prompt, so disallowed-tools: Bash is the line that removes the shell. The last body line handles a missing name, because the hint shows only while typing.

SkillA personal variant of a team skill

To make /review also check naming rules the team has not adopted, don't edit .claude/skills/review/SKILL.md, because that ships your preference to every teammate. Copy it to ~/.claude/skills/review-strict/SKILL.md and edit the copy. /review still runs the team's checklist, and /review-strict runs yours.

More precise than the guide. A skill in ~/.claude/skills/ never reaches teammates, whatever its name. The different name keeps both versions available to you, because a personal skill overrides a project skill with the same name (checked 2026-10-01). Exam answer: a personal variant in ~/.claude/skills/ with a different name.

SkillSkill or CLAUDE.md

CLAUDE.md is always loaded, so it suits universal standards such as "use pnpm, never npm". A skill's description is in context every session, but its body loads on demand, when you invoke it or Claude judges it relevant. A review checklist is a task-specific workflow, so as a skill it costs one line in sessions that never review. A skill can also set paths, so it loads automatically only for matching files; 3.3 compares that with path-scoped rules.

Before adding a procedure, ask: Should it load in every session, or only when someone runs it?
Every session, for everyoneCLAUDE.md.
Only when run, for the teamA committed skill in .claude/skills/ or command in .claude/commands/.
Only when run, only for you~/.claude/skills/, renamed if it varies a team skill.
Takeaway
  • context: fork keeps a skill's verbose reads in a subagent's own context window; only the result returns.
  • Exam: allowed-tools restricts a skill's tools. Docs: it pre-approves them, and disallowed-tools removes them.
  • argument-hint shows expected arguments while typing, so the body must handle a missing one.

check yourself

0 / 3 answered

The committed /dep-audit skill reads every package.json and lockfile in the monorepo, about 60 files, and prints a 20-line upgrade list. Developers run it in the middle of feature work, and afterwards Claude loses track of their earlier instructions. Developers must be able to keep working in the same session.Which change most directly fixes this?

Select one.

The team's committed /deploy-check skill runs five pre-release checks. You want a version that also runs the 20-minute load test before your own releases. Teammates must keep the five-check version, and you still want the quick original for small changes.What is the most maintainable way to set this up?

Select one.

A 120-line database-migration procedure sits in the root CLAUDE.md. Engineers use it about twice a month, and it starts by reading all 80 existing migration files, which crowd their session afterwards. Every clone must get it as a command, and other sessions should stop loading it.Which TWO changes best achieve this?

Select two.

sources

  1. Claude Docs, "Extend Claude with skills": personal and project skill directories; custom commands merged into skills, with .claude/commands/ files still working; the frontmatter table (allowed-tools "without asking permission", grant clears at your next message, does not restrict; disallowed-tools removes tools; argument-hint "hint shown during autocomplete"; context: fork; agent defaulting to general-purpose; paths); forked skills get the skill content as prompt, no conversation history, background by default, foreground with -p; personal over project on a name conflict; descriptions always in context, body on invocation. Checked 2026-10-01.
  2. Claude Docs, "Create custom subagents": Explore and Plan use read-only tools with Write and Edit denied; general-purpose has every tool. Checked 2026-10-01.
  3. Claude Docs, "Best practices for Claude Code": skills for on-demand workflows versus CLAUDE.md for what applies broadly.
  4. Task statement text, "isolated sub-agent context", "polluting the main conversation", the file-writes-only and personal-variant examples, and the /review shared-command scenario: Claude Certified Architect — Foundations Exam Guide v1.0, Domain 3.2 and Sample Question 4. The monorepo, /new-service, /analyze-module, /compare-caching and /review-strict are this course's scenario details.