CertSafari
    Anthropic Claude Certified Architect – Foundations (CCAR-F)· Lessons

    Domain 3 · Lesson 14/30

    Slash Commands and Skills: Project vs Personal Scope

    Create and configure custom slash commands and skills

    13 min read
    3.33% of exam
    4 sources
    Published 4 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Tell the older .claude/commands/ file format apart from a .claude/skills/<name>/SKILL.md skill, and work out the command name each one produces
    • Decide whether a command or skill belongs in the project's .claude/ directory (shared through version control) or in ~/.claude/ (personal)
    • Create a project-scoped slash command in .claude/commands/ and commit it so the whole team can invoke it
    • Predict which definition runs when the same skill name exists at more than one level, and make a personal variant without changing what teammates run
    • Choose between a skill and CLAUDE.md for a given instruction
    • Configure a SKILL.md with context: fork, allowed-tools and argument-hint, and say what each field does and does not do

    Key concept

    Location sets the audience — A custom command or skill is just a file, and the directory it lives in decides who gets it. Files in the repository's .claude/ directory reach the whole team once committed. Files in ~/.claude/ stay with you, on your machine.

    1.Two file formats, one mechanism

    Claude Code gives you two ways to write a prompt you can invoke as /name. The older way is a single Markdown file in a commands/ directory. Its file name, minus the extension, becomes the command, so .claude/commands/deploy.md is invoked as /deploy. Subdirectories turn into colon-separated prefixes, so .claude/commands/frontend/component.md becomes /frontend:component. The documentation says this format still works and describes it as the same mechanism as skills, packaged as a single-file prompt.

    The newer way is a skill: a directory containing a SKILL.md file. Its command name comes from the frontmatter name field, or from the directory name if there is no name field. A command file accepts the same frontmatter as a skill except name and paths. The real difference is what else you can include. A skill directory can hold supporting files next to SKILL.md, and that is why the docs tell you to use skills for new work.

    Command files vs skill directories
    Aspectcommands/*.mdskills/<name>/SKILL.md
    ShapeOne Markdown fileA directory with SKILL.md plus optional supporting files
    Command nameFile name without extension; subfolders become name:prefixFrontmatter name, or the directory name
    FrontmatterThe skill fields except name and pathsFull set, including name and paths
    StatusOlder format, still worksPreferred for new work
    Same name as the other formatLosesWins

    Checkpoint 1 of 6· Check yourself

    A team already has .claude/commands/review.md. Someone adds .claude/skills/review/SKILL.md to the same repository. What happens when a developer types /review?

    Sources12

    2.Project scope travels with the repo; personal scope stays on your machine

    Commands and skills both come in two main scopes. The project scope is the repository's own .claude/ directory: .claude/commands/ for command files and .claude/skills/ for skills. The personal scope is the same layout under your home directory: ~/.claude/commands/ and ~/.claude/skills/. The .claude directory reference lists both commands/*.md and skills/<name>/SKILL.md as available at project and global level, and both are marked as files you commit.

    Creating a project-scoped slash command takes two steps. First, write the prompt as a Markdown file in the repository's .claude/commands/ directory. The file name becomes the command, so .claude/commands/deploy.md is invoked as /deploy, and a file in a subfolder such as .claude/commands/frontend/component.md becomes /frontend:component. Second, commit the file. Version control is what gives the command team-wide availability: once deploy.md is committed and pushed, anyone who clones or pulls the repository gets /deploy in their sessions in that repository, without setting anything up themselves. A skill works the same way: create .claude/skills/deploy/SKILL.md and commit it. For new work the docs prefer the skill form, but the commands/ file is still a valid team-wide slash command.

    A file in ~/.claude/ is never in the repository, so it follows you across your projects and nobody else sees it. If a teammate should have a command, it has to be in the project's .claude/ directory and committed. Putting it in your personal directory and telling people about it doesn't share it.

    Where a skill can live and who gets it
    LocationPathLoads in
    Personal~/.claude/skills/<skill-name>/SKILL.mdAll your projects on this machine, but not Cowork or cloud sessions
    Project.claude/skills/<skill-name>/SKILL.mdSessions in this repository; commit it so your team gets it too
    Nested<subdir>/.claude/skills/<skill-name>/SKILL.mdSessions started in or below <subdir>
    Enterprise.claude/skills/<skill-name>/SKILL.md in the managed settings directoryAll users on machines where your organization deploys it
    Plugin<plugin>/skills/<skill-name>/SKILL.mdWherever the plugin is enabled, as /plugin-name:skill-name
    Creating a personal skill directory, which is available in all your projects and only to youbash
    mkdir -p ~/.claude/skills/summarize-changes

    Checkpoint 2 of 6· Match them up

    Match each location to who ends up with the command or skill

    Tap a term, then the definition that fits it.

    Sources13

    3.Name collisions and personal variants

    CLAUDE.md files at different levels all add to Claude's context at once. Skills don't work that way: they override by name. When the same name exists at more than one level, one definition wins. Enterprise beats personal, and personal beats project. Plugin skills are the exception, because they are namespaced as /plugin-name:skill-name and so load alongside a local skill with the same short name.

    This matters when you want to change a team skill to suit yourself. You have two bad options. If you edit the committed project file, you change it for everyone once that change is committed. If you copy it to ~/.claude/skills/ under the same name, your copy silently replaces the team version in your own sessions. From then on, your /deploy is no longer the /deploy your teammates run, and nothing warns you. The clean approach is a personal variant with a different name, for example ~/.claude/skills/deploy-verbose/. The team skill stays as it is, and you can still invoke it, and your variant exists only on your machine.

    Checkpoint 3 of 6· Check yourself

    A developer wants a version of the team's committed /review skill that also checks their personal naming preferences. Teammates should keep getting the standard review. What should they do?

    Sources41

    4.Skill or CLAUDE.md?

    The scoping rules above decide who gets a skill. A different question is whether the instruction should be a skill at all, or whether it belongs in CLAUDE.md. The deciding factor is when it loads. CLAUDE.md is persistent context loaded in every conversation, which suits rules that always apply, such as which package manager to use or running tests before committing. A skill loads on demand. Only its description sits in context each session, and the full content loads when you type /name or when Claude matches the description to your task.

    So universal standards go in CLAUDE.md, and task-specific workflows go in skills. The features overview gives practical triggers. If you keep typing the same prompt to start a task, save it as a user-invocable skill. If you paste the same playbook into chat for the third time, capture it as a skill. The two can also work together: CLAUDE.md says to follow the API conventions, and a skill holds the full style guide.

    CLAUDE.md compared with a skill
    AspectCLAUDE.mdSkill
    LoadsEvery session, automaticallyOn demand
    Can include filesYes, with @path importsYes, with @path imports
    Can trigger workflowsNoYes, with /<name>
    Best for"Always do X" rulesReference material, invocable workflows

    Checkpoint 4 of 6· Check yourself

    A team has a 60-step release checklist that is only used on release day. Where does it belong?

    Sources4

    5.Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint

    A skill in .claude/skills/<name>/ is configured by the YAML frontmatter at the top of its SKILL.md file, between the two --- lines. Every field is optional, and description is the recommended one. Three fields come up often when you build team skills.

    context: fork runs the skill in an isolated subagent context. Set it to fork and the skill no longer runs in your main conversation. Claude Code creates a new isolated context, the subagent receives the skill content as its prompt, and the optional agent field chooses which subagent type runs it (for example Explore), which sets the model, tools and permissions. When the subagent finishes, it summarizes its results and returns them to your main conversation. The files it read and the intermediate tool output stay in the subagent's own context window. This makes fork the right choice for skills that produce a lot of output or exploratory context you won't refer to again, such as a codebase analysis or brainstorming alternatives, because only the summary reaches your main session. By default a forked skill runs in the background. Set background: false to wait for its result in the same turn.

    allowed-tools lists the tools Claude can use without asking permission during the turn that invokes the skill. It takes a space- or comma-separated string or a YAML list, and accepts permission-rule patterns such as Bash(gh *). The grant clears when you send your next message. allowed-tools is a pre-approval, not an allowlist: tools that aren't listed are still available and go through the normal permission flow. To actually take tools away while a skill runs, for example so an autonomous skill can never call a destructive tool, use disallowed-tools, which removes the listed tools from Claude's available pool while the skill is active.

    argument-hint is the hint shown during autocomplete to indicate the arguments the skill expects, for example [issue-number] or [filename] [format]. It tells a developer who types /name what parameters to supply, and the skill body reads them through $ARGUMENTS, $0, $1 and so on. argument-hint is a Claude Code field. A claude.ai upload or the Skills API accepts only name, description, license, compatibility, metadata and allowed-tools, and rejects argument-hint as an unexpected key.

    A skill that forks into an Explore subagent and pre-approves gh commandsmarkdown
    ---
    name: pr-summary
    description: Summarize changes in a pull request
    context: fork
    agent: Explore
    allowed-tools: Bash(gh *)
    ---
    
    ## Pull request context
    - PR diff: !`gh pr diff`
    - PR comments: !`gh pr view --comments`
    - Changed files: !`gh pr diff --name-only`
    
    ## Your task
    Summarize this pull request...
    SKILL.md frontmatter fields for isolation, tool access and arguments
    FieldWhat it doesTypical use
    contextSet to fork to run in a forked subagent contextVerbose analysis or exploratory work that should return only a summary
    agentWhich subagent type to use when context: fork is setExplore for read-heavy research
    backgroundOnly with context: fork; false waits for the result in the invoking turnDefault true runs the fork in the background
    allowed-toolsTools Claude can use without asking permission during the invoking turnPre-approving Bash(gh *) for a PR summary skill
    disallowed-toolsTools removed from Claude's available pool while the skill is activeKeeping an autonomous skill away from specific tools
    argument-hintHint shown during autocomplete for expected arguments[issue-number] or [filename] [format]

    Checkpoint 5 of 6· Fill the gap

    Complete the frontmatter so this research skill runs in an isolated subagent and only its summary returns to the main conversation.

    ---
    name: deep-research
    description: Research a topic thoroughly
    context:  ? 
    agent: Explore
    ---

    Checkpoint 6 of 6· Check yourself

    A team skill's SKILL.md sets allowed-tools: Read Grep. What does that field do when someone invokes the skill?

    Sources14

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.When a skill name exists in both the project and ~/.claude/skills/, the project's committed version wins.Why is that wrong?

      For skills, personal beats project, and enterprise beats both. A same-named personal copy replaces the team skill in your sessions without any warning.

      Covered in Name collisions and personal variants

    2. 2.Putting a long, task-specific procedure in CLAUDE.md is fine because Claude only reads it when relevant.Why is that wrong?

      CLAUDE.md loads in every session. Only a skill defers its full content until it is invoked or matched to the task.

      Covered in Skill or CLAUDE.md?

    3. 3.Listing tools in a skill's allowed-tools restricts Claude to only those tools while the skill runs.Why is that wrong?

      allowed-tools only pre-approves the listed tools for the invoking turn. Unlisted tools stay available. To remove tools while a skill is active, use disallowed-tools.

      Covered in Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “a Markdown file in .claude/commands/ is the older format and still works.”
      ↩︎ Two file formats, one mechanism
      “It supports the same frontmatter except name and paths.”
      ↩︎ Two file formats, one mechanism
      “All your projects on this machine, but not Cowork or cloud sessions”
      ↩︎ Project scope travels with the repo; personal scope stays on your machine
      “Sessions in this repository. Commit it so your team gets it too”
      ↩︎ Project scope travels with the repo; personal scope stays on your machine
      “With deploy in both ~/.claude/skills/ and the project’s .claude/skills/, /deploy runs the personal one”
      ↩︎ Name collisions and personal variants
      “The subagent summarizes its results and returns them to your main conversation when it finishes”
      ↩︎ Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint
      “Tools Claude can use without asking permission during the turn that invokes this skill. The grant clears when you send your next message.”
      ↩︎ Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint
      “Hint shown during autocomplete to indicate expected arguments. Example: [issue-number] or [filename] [format].”
      ↩︎ Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint
      “Commit it so your team gets it too”
      ↩︎ Key concept
      “Enterprise over personal, and personal over project.”
      ↩︎ Exam trap 1
      “Tools removed from Claude’s available pool while this skill is active.”
      ↩︎ Exam trap 3
      “Prefer a skill for new work, since skills also support supporting files.”
      ↩︎ Checkpoint
      “Enterprise over personal, and personal over project.”
      ↩︎ Checkpoint
      “Tools Claude can use without asking permission during the turn that invokes this skill.”
      ↩︎ Checkpoint
    2. 2.
      “Single-file prompts; same mechanism as skills”
      ↩︎ Two file formats, one mechanism
    3. 3.
      “Project skills: .claude/skills/, available only in the current project”
      ↩︎ Project scope travels with the repo; personal scope stays on your machine
      “Personal skills: ~/.claude/skills/, available across all your projects”
      ↩︎ Checkpoint
    4. 4.
      “Skills and subagents override by name”
      ↩︎ Name collisions and personal variants
      “CLAUDE.md holds always-on rules; skills hold reference material loaded on demand”
      ↩︎ Skill or CLAUDE.md?
      “You paste the same playbook or multi-step procedure into chat for the third time”
      ↩︎ Skill or CLAUDE.md?
      “Context isolation. Work happens separately, only summary returns”
      ↩︎ Configuring a skill with SKILL.md frontmatter: context: fork, allowed-tools, argument-hint
      “Persistent context loaded every conversation”
      ↩︎ Exam trap 2
      “Description loads each session; full content loads when used”
      ↩︎ Checkpoint

    Continue to page 2 of 2

    SKILL.md Frontmatter: argument-hint, allowed-tools, context: fork

    Spotted a mistake, or was something unclear? Tell us.