Guides

Claude Code

CLI reference for Claude Code — skills, plugins, configuration, and slash commands.

3 min read

Skills

Skills are reusable prompt files that teach Claude how to perform a specific task. They live as SKILL.md files and are invoked via slash commands.

File Locations

ScopePath
Personal (all projects)~/.claude/skills/<name>/SKILL.md
Project.claude/skills/<name>/SKILL.md

SKILL.md Structure

.claude/skills/deploy/SKILL.md
---
name: deploy
description: Deploy the app to production
disable-model-invocation: true # only user can invoke, not Claude automatically
allowed-tools: Bash(npm *) # tools Claude can use without asking
---

Instructions for Claude go here. This is plain markdown.

Frontmatter Fields

FieldDescription
nameSlug used as /name slash command
descriptionShown in /help; also used by Claude to decide when to auto-invoke
disable-model-invocation: truePrevents Claude from invoking the skill automatically
user-invocable: falseHides from slash commands; Claude-only
allowed-toolsTools usable without per-call approval (e.g. Read, Grep, Bash(git *))
argument-hintText shown in autocomplete, e.g. [filename] [style]
context: forkRun skill in an isolated subagent
agentSubagent type to use when context: fork is set

String Substitutions

VariableValue
$ARGUMENTSAll arguments passed to the slash command
$0, $1, $2Positional arguments
${CLAUDE_SKILL_DIR}Absolute path to the skill's directory
${CLAUDE_SESSION_ID}Current session ID

Dynamic Context Injection

Use !`command` to run a shell command and inline the output before Claude reads the skill:

## Changes to review

!`git diff HEAD~1`

Check for security issues and performance problems.

Invocation

/skill-name
/skill-name arg1 arg2

Claude can also invoke skills automatically when the task matches the skill's description, unless disable-model-invocation: true is set.

Plugins

Plugins are packaged collections of skills, agents, hooks, and MCP servers — distributed and versioned for sharing across projects and teams.

Structure

my-plugin/
├── .claude-plugin/
│   └── plugin.json     # required manifest
├── skills/
│   └── my-skill/
│       └── SKILL.md
├── agents/
├── hooks/
│   └── hooks.json
└── .mcp.json

Manifest (plugin.json)

.claude-plugin/plugin.json
{
  "name": "my-plugin",
  "description": "What this plugin does",
  "version": "1.0.0",
  "author": { "name": "Your Name" }
}

Required fields: name, description, version. The name becomes the namespace prefix for all skills.

Invoking Plugin Skills

Plugin skills are namespaced to avoid conflicts:

/my-plugin:skill-name

Installation

# Browse and install via the plugin UI
/plugin

# Load a local plugin during development
claude --plugin-dir ./my-plugin

Skills vs. Plugins

SkillsPlugins
Slash command/skill-name/plugin-name:skill-name
Stored in.claude/skills/Directory with plugin.json
VersionedNoYes (semver)
Can bundle MCP serversNoYes
Best forSingle-project extensionsSharing across teams