mcpField
E
example-command

example-command

github.com/anthropicsAgent workflows45.1k48 installsUpdated 1d ago
Repository

About example-command

A sample user-invoked slash-command skill that parses supplied arguments, performs an action with allowed tools, and reports the result. It also documents supported skill frontmatter fields and the layout’s equivalence to the legacy command format.

Key features

  1. 01Parse invocation arguments
  2. 02Act using allowed tools
  3. 03Report results
  4. 04Document skill frontmatter fields

Use cases

  1. 01Demonstrate a user-invoked slash command
  2. 02Show the skills directory layout
  3. 03Explain arguments and allowed-tools configuration

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/anthropics/claude-plugins-official --skill example-command

After installing, type/example-commandin Claude Code to confirm it loaded.

Details

From the project README

Example Command (Skill Format)

This demonstrates the skills/<name>/SKILL.md layout for user-invoked slash commands. It is functionally identical to the legacy commands/example-command.md format — both are loaded the same way; only the file layout differs.

Arguments

The user invoked this with: $ARGUMENTS

Instructions

When this skill is invoked:

  1. Parse the arguments provided by the user
  2. Perform the requested action using allowed tools
  3. Report results back to the user

Frontmatter Options Reference

Skills in this layout support these frontmatter fields:

  • name: Skill identifier (matches directory name)
  • description: Short description shown in /help
  • argument-hint: Hints for command arguments shown to user
  • allowed-tools: Pre-approved tools for this skill (reduces permission prompts)
  • model: Override the model (e.g., "haiku", "sonnet", "opus")

Example Usage

/example-command my-argument
/example-command arg1 arg2

Comments

Markdown supported