Study notes · 3.3% of the exam

3.2 Create and configure custom slash commands and skills

Create project- or user-scoped slash commands and skills, configure SKILL.md frontmatter (context: fork, allowed-tools, argument-hint, disable-model-invocation) and decide what belongs in a skill versus CLAUDE.md.

Key points

  1. 1

    Project-scoped commands live in .claude/commands/<name>.md and project skills in .claude/skills/<name>/SKILL.md; both are committed and available to everyone who clones or pulls. User-scoped equivalents live in ~/.claude/commands/ and ~/.claude/skills/ and are personal across all projects.

  2. 2

    .claude/commands/ is the older single-file format; skills are the current mechanism and support supporting files and richer frontmatter. Both create a /name slash command. There is no commands array in settings files and CLAUDE.md does not define invocable commands.

  3. 3

    Skills can be invoked by a person (/name args) or loaded automatically by Claude when the description matches the conversation. $ARGUMENTS, $0/$1 and ${CLAUDE_SESSION_ID} are substituted into the skill body.

  4. 4

    context: fork runs the skill in an isolated subagent context; the subagent does not see the conversation history and only its result returns. Use it for skills with verbose output (codebase analysis, dependency graphs) or exploratory content (brainstorming alternatives) so they do not pollute the main session.

  5. 5

    allowed-tools in skill frontmatter configures the tools available to the skill during execution; the exam guide treats it as the way to restrict a skill to, for example, file operations so it cannot run destructive shell commands. Current docs also provide disallowed-tools; for an absolute guarantee, add a PreToolUse hook or a deny rule.

  6. 6

    argument-hint (for example [issue-number] or [version-tag]) shows in autocomplete and tells developers what parameter the skill expects when they invoke it without arguments.

  7. 7

    disable-model-invocation: true stops Claude from auto-invoking a skill; only a human typing /name runs it. Use it for side-effecting workflows such as deploy, commit or release. user-invocable: false is the opposite: hidden from the menu, only Claude can load it.

  8. 8

    Skills vs CLAUDE.md: CLAUDE.md is always loaded, so it holds universal standards, project facts and short workflow rules. Skills load on demand, so they hold multi-step procedures, occasional workflows, side-effecting actions and anything long enough to bloat every session.

  9. 9

    Personal customisation: create a variant in ~/.claude/skills/ with a different name (for example review-a11y) so teammates are unaffected and the team's original stays available. A personal skill with the same name shadows the project skill for that user (priority is enterprise, then personal, then project).

  10. 10

    Skill content enters the conversation when invoked and stays across turns, so write it as standing guidance and keep SKILL.md focused, moving detail into supporting files.

Test yourself on 3.2 Create and configure custom slash commands and skills

Ten questions, with the answer and explanation after each one.