NEW Browse AI tools across categories — updated daily. See what's new →

Reports

A comparison of the three extension mechanisms in Claude Code: subagents, commands, and skills. <table width="100%"> <tr> <td><a href="../">← Back to Claude Code Best Practice</a></td> <td align="r...

Version1.0.0
LicenseMIT
Token count~1,224
UpdatedJun 5, 2026

A comparison of the three extension mechanisms in Claude Code: subagents, commands, and skills. <table width="100%"> <tr> <td><a href="../">← Back to Claude Code Best Practice</a></td> <td align="right"><img src="../!/claude-jumping.svg" alt="Claude" width="60" /></td> </tr> </table> ![Slash menu showing time-skill, time-command, and time-agent](assets/agent-command-skill-1.jpg) ---

Install

Quick install

via npx skills · works with 57+ agents
npx skills add https://github.com/shanraisshan/claude-code-best-practice
Or pick agent:
npx skills add shanraisshan/claude-code-best-practice --agent claude-code
npx skills add shanraisshan/claude-code-best-practice --agent cursor
npx skills add shanraisshan/claude-code-best-practice --agent codex
npx skills add shanraisshan/claude-code-best-practice --agent opencode
npx skills add shanraisshan/claude-code-best-practice --agent github-copilot
npx skills add shanraisshan/claude-code-best-practice --agent windsurf
More install options

Shorthand — useful for multi-skill repos:

npx skills add shanraisshan/claude-code-best-practice

Manual — clone the repo and drop the folder into your agent's skills directory:

git clone https://github.com/shanraisshan/claude-code-best-practice.git
cp -r claude-code-best-practice ~/.claude/skills/
How to use: Once installed, ask your agent to "use the Reports skill" or describe what you want (e.g. "A comparison of the three extension mechanisms in Claude Code: subagents, comman"). Requires Node.js 18+.

Reports

A comparison of the three extension mechanisms in Claude Code: subagents, commands, and skills. <table width="100%"> <tr> <td><a href="../">← Back to Claude Code Best Practice</a></td> <td align="right"><img src="../!/claude-jumping.svg" alt="Claude" width="60" /></td> </tr> </table> ![Slash menu showing time-skill, time-command, and time-agent](assets/agent-command-skill-1.jpg) ---

---
name: my-agent
description: Use this agent PROACTIVELY when...
tools: Read, Write, Edit, Bash
model: sonnet
maxTurns: 10
permissionMode: acceptEdits
memory: user
skills:


  • my-skill


---

### Command Frontmatter
yaml
---
description: Do something useful
argument-hint: [issue-number]
allowed-tools: Read, Edit, Bash(gh *)
model: sonnet
---

### Skill Frontmatter
yaml
---
name: my-skill
description: Do something when the user asks for...
argument-hint: [file-path]
disable-model-invocation: false
user-invocable: true
allowed-tools: Read, Grep, Glob
model: sonnet
context: fork
agent: general-purpose
---

---

## Key Distinctions

### Auto-invocation

| Mechanism | Can Claude auto-invoke? | How to prevent |
|-----------|------------------------|----------------|
| Agent | Yes — via `description` (use "PROACTIVELY" to encourage it) | Remove or soften the description |
| Command | No — always user-initiated via `/` | N/A |
| Skill | Yes — via `description` | Set `disable-model-invocation: true` |

### Visibility in `/` menu

| Mechanism | Appears in `/` menu? | How to hide |
|-----------|---------------------|-------------|
| Agent | No | N/A |
| Command | Yes — always | Cannot be hidden |
| Skill | Yes — by default | Set `user-invocable: false` |

### Context isolation

| Mechanism | Runs in own context? | How to configure |
|-----------|---------------------|-----------------|
| Agent | Always | Built-in behavior |
| Command | Never | N/A |
| Skill | Optional | Set `context: fork` |

---

## Worked Example: "What is the current time?"

This repository has all three mechanisms defined for the same task — displaying the current time in PKT. Here's what happens when a user types **"What is the current time?"** without explicitly invoking any `/` command:

| Mechanism | Will it fire? | Why / Why not |
|-----------|--------------|---------------|
| `time-command` | No | Commands are **never auto-invoked**. The user would need to explicitly type `/time-command` for it to run. Commands have no auto-discovery pathway — they are strictly user-initiated. |
| `time-agent` | **Yes** (possible) | The agent's `description` says *"Use this agent to display the current time in Pakistan Standard Time"*. Claude matches this against the user's intent and may spawn it via the Agent tool. However, agents run in a **separate context window**, making them heavier than necessary for this simple task. |
| `time-skill` | **Yes** (most likely) | The skill's `description` says *"Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT."* Claude matches this and invokes it via the Skill tool. Since it runs **inline** with no context overhead, it's the most efficient match. |

### Resolution order

When multiple mechanisms match the same intent, Claude prefers the **lightest-weight option** that satisfies the request:


  1. Skill (inline, no context overhead) ← preferred

  2. Agent (separate context, autonomous) ← used if skill is unavailable or task is complex

  3. Command (never — requires explicit /) ← only if user types /time-command


``

What if disable-model-invocation: true were set on the skill?

Then Claude cannot auto-invoke the skill. The agent becomes the only auto-invocable option, so Claude would spawn time-agent instead — at the cost of a separate context window for a one-liner bash command.

What if both skill and agent had auto-invocation disabled?

Then nothing fires automatically. Claude would fall back to its own general knowledge and likely just run TZ='Asia/Karachi' date directly — no extension mechanism involved. The user would need to explicitly type /time-command or /time-skill` to use one.

![Claude auto-invoking time-skill when user asks "What is the current time?"](assets/agent-command-skill-2.png)

---

Sources

---

Source: https://github.com/shanraisshan/claude-code-best-practice
Author: shanraisshan
Discovered via: skillsdirectory.com
Genre: ai-agents

SKILL.md source

---
name: Reports
description: A comparison of the three extension mechanisms in Claude Code: subagents, commands, and skills. <table width="100%"> <tr> <td><a href="../">← Back to Claude Code Best Practice</a></td> <td align="r...
---

# Reports

A comparison of the three extension mechanisms in Claude Code: subagents, commands, and skills. <table width="100%"> <tr> <td><a href="../">← Back to Claude Code Best Practice</a></td> <td align="right"><img src="../!/claude-jumping.svg" alt="Claude" width="60" /></td> </tr> </table> ![Slash menu showing time-skill, time-command, and time-agent](assets/agent-command-skill-1.jpg) ---

---
name: my-agent
description: Use this agent PROACTIVELY when...
tools: Read, Write, Edit, Bash
model: sonnet
maxTurns: 10
permissionMode: acceptEdits
memory: user
skills:
  - my-skill
---
```

### Command Frontmatter

```yaml
---
description: Do something useful
argument-hint: [issue-number]
allowed-tools: Read, Edit, Bash(gh *)
model: sonnet
---
```

### Skill Frontmatter

```yaml
---
name: my-skill
description: Do something when the user asks for...
argument-hint: [file-path]
disable-model-invocation: false
user-invocable: true
allowed-tools: Read, Grep, Glob
model: sonnet
context: fork
agent: general-purpose
---
```

---

## Key Distinctions

### Auto-invocation

| Mechanism | Can Claude auto-invoke? | How to prevent |
|-----------|------------------------|----------------|
| Agent | Yes — via `description` (use "PROACTIVELY" to encourage it) | Remove or soften the description |
| Command | No — always user-initiated via `/` | N/A |
| Skill | Yes — via `description` | Set `disable-model-invocation: true` |

### Visibility in `/` menu

| Mechanism | Appears in `/` menu? | How to hide |
|-----------|---------------------|-------------|
| Agent | No | N/A |
| Command | Yes — always | Cannot be hidden |
| Skill | Yes — by default | Set `user-invocable: false` |

### Context isolation

| Mechanism | Runs in own context? | How to configure |
|-----------|---------------------|-----------------|
| Agent | Always | Built-in behavior |
| Command | Never | N/A |
| Skill | Optional | Set `context: fork` |

---

## Worked Example: "What is the current time?"

This repository has all three mechanisms defined for the same task — displaying the current time in PKT. Here's what happens when a user types **"What is the current time?"** without explicitly invoking any `/` command:

| Mechanism | Will it fire? | Why / Why not |
|-----------|--------------|---------------|
| `time-command` | No | Commands are **never auto-invoked**. The user would need to explicitly type `/time-command` for it to run. Commands have no auto-discovery pathway — they are strictly user-initiated. |
| `time-agent` | **Yes** (possible) | The agent's `description` says *"Use this agent to display the current time in Pakistan Standard Time"*. Claude matches this against the user's intent and may spawn it via the Agent tool. However, agents run in a **separate context window**, making them heavier than necessary for this simple task. |
| `time-skill` | **Yes** (most likely) | The skill's `description` says *"Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT."* Claude matches this and invokes it via the Skill tool. Since it runs **inline** with no context overhead, it's the most efficient match. |

### Resolution order

When multiple mechanisms match the same intent, Claude prefers the **lightest-weight option** that satisfies the request:

```
1. Skill (inline, no context overhead)     ← preferred
2. Agent (separate context, autonomous)    ← used if skill is unavailable or task is complex
3. Command (never — requires explicit /)   ← only if user types /time-command
```

### What if `disable-model-invocation: true` were set on the skill?

Then Claude **cannot** auto-invoke the skill. The agent becomes the only auto-invocable option, so Claude would spawn `time-agent` instead — at the cost of a separate context window for a one-liner bash command.

### What if both skill and agent had auto-invocation disabled?

Then **nothing fires automatically**. Claude would fall back to its own general knowledge and likely just run `TZ='Asia/Karachi' date` directly — no extension mechanism involved. The user would need to explicitly type `/time-command` or `/time-skill` to use one.

![Claude auto-invoking time-skill when user asks "What is the current time?"](assets/agent-command-skill-2.png)

---

## Sources

- [Claude Code Skills — Docs](https://code.claude.com/docs/en/skills)
- [Claude Code Sub-agents — Docs](https://code.claude.com/docs/en/sub-agents)
- [Claude Code Slash Commands — Docs](https://code.claude.com/docs/en/slash-commands)
- [Skills Best Practice](../best-practice/claude-skills.md)
- [Commands Best Practice](../best-practice/claude-commands.md)
- [Sub-agents Best Practice](../best-practice/claude-subagents.md)


---

**Source**: https://github.com/shanraisshan/claude-code-best-practice
**Author**: shanraisshan
**Discovered via**: skillsdirectory.com
**Genre**: ai-agents

Related skills 6

running-claude-code-via-litellm-copilot

★ Featured

Use when routing Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic spend, configuring ANTHROPIC_BASE_URL or ANTHROPIC_MODEL overrides, or troubleshooting Copilot proxy setup failures such as model-not-found, no localhost traffic, or GitHub 401/403 auth errors.

xixu-me 155k
AI & ML

skills-cli

★ Featured

Use when users ask to discover, install, list, check, update, remove, back up, restore, sync, or initialize Agent Skills, mention `bunx skills`, `npx skills`, `skills.sh`, or `skills-lock.json`, ask "find a skill for X", or want help extending agent capabilities with installable skills.

xixu-me 155k
AI & ML

repo-intake-and-plan

★ Featured

Narrow RigorPilot helper for README-first deep learning repo reproduction. Use when the task is specifically to scan a repository, read the README and common project files, extract documented commands, classify inference, evaluation, and training candidates, and return the smallest trustworthy reproduction plan to the main orchestrator. Do not use for environment setup, asset download, command execution, final reporting, paper lookup, or end-to-end orchestration.

lllllllama 127k
AI & ML

image-to-video

★ Featured

Animate any still image on RunComfy — this skill is a smart router that matches the user's intent to the right i2v model in the RunComfy catalog. Picks HappyHorse 1.0 I2V (Arena #1, native audio, identity preservation) for general animations, Wan 2.7 with `audio_url` for custom-voiceover lip-sync, or Seedance 2.0 Pro for multi-modal animation from image + reference video + reference audio. Bundles each model's documented prompting patterns so the caller gets sharper output without burning ite...

agentspace-so 121k
AI & ML

video-edit

★ Featured

Edit existing video on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Wan 2.7 Edit-Video (general restyle / background swap / packaging swap, identity + motion preservation), Kling 2.6 Pro Motion Control (transfer precise motion from a reference video to a target character), or Lucy Edit Restyle (lightweight identity-stable restyle / outfit swap). Bundles each model's documented prompting patterns so the skill gets...

agentspace-so 121k
AI & ML

nano-banana-2

★ Featured

Generate images with Google Nano Banana 2 (Gemini-family flash-tier text-to-image) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Nano Banana 2's strengths (rapid iteration, in-image typography rendering, predictable framing, optional web-grounded context), the resolution-tier pricing, the safety-tolerance dial, and when to route to Nano Banana Pro / GPT Image 2 / Flux 2 / Seedream in...

agentspace-so 121k
AI & ML