帮助开发者为 Claude Code 设计、编写和组织斜杠命令。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "command-development" 技能: 1. 下载 https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/plugins/plugin-dev/skills/command-development/SKILL.md 2. 保存为 ~/.claude/skills/command-development/SKILL.md 3. 装好后重载技能,告诉我可以用了
帮我为 Claude Code 创建一个 /review 命令,使用 Markdown 文件格式,内容要指示 Claude 检查安全漏洞、性能问题和可维护性,并给出 YAML frontmatter 示例。
返回一个可用的命令草稿,包含命令内容结构和 frontmatter 示例。
帮我写一个 Claude Code 斜杠命令,支持动态参数和文件引用,用于分析指定文件的测试覆盖情况,并说明参数该怎么组织。
返回带动态参数设计思路的命令模板,并说明文件引用的使用方式。
请为 Claude Code 设计一个交互式命令,使用 AskUserQuestion 在执行前询问部署环境和版本号,并给出最佳实践建议。
返回一个交互式命令示例,展示提问流程、命令结构和编写建议。
开发者在 Claude Code 中反复执行代码审查、测试或部署类任务时,可以把提示词写成斜杠命令,提升复用性与一致性。
团队在项目内共享 Claude Code 工作流时,可以用该技能规划命令文件位置、命名空间和 frontmatter 字段,便于统一维护。
当命令需要接收动态参数、引用文件或在执行前向用户提问时,该技能可帮助设计更灵活的命令结构与交互模式。
文档介绍了 Claude Code 斜杠命令的用途与编写方法,说明命令本质是供 Claude 执行的 Markdown 指令,而不是写给用户看的说明。内容涵盖命令文件位置、YAML frontmatter、动态参数、文件引用、bash 执行、组织方式以及团队共享和复用工作流的基本原则,并提示旧版 commands 目录与新版 skills 目录的关系。
Note: The
.claude/commands/directory is a legacy format. For new skills, use the.claude/skills/<name>/SKILL.mddirectory format. Both are loaded identically — the only difference is file layout. See theskill-developmentskill for the preferred format.
Slash commands are frequently-used prompts defined as Markdown files that Claude executes during interactive sessions. Understanding command structure, frontmatter options, and dynamic features enables creating powerful, reusable workflows.
Key concepts:
A slash command is a Markdown file containing a prompt that Claude executes when invoked. Commands provide:
Commands are written for agent consumption, not human consumption.
When a user invokes /command-name, the command content becomes Claude's instructions. Write commands as directives TO Claude about what to do, not as messages TO the user.
Correct approach (instructions for Claude):
Review this code for security vulnerabilities including:
- SQL injection
- XSS attacks
- Authentication issues
Provide specific line numbers and severity ratings.
Incorrect approach (messages to user):
This command will review your code for security issues.
You'll receive a report with vulnerability details.
The first example tells Claude what to do. The second tells the user what will happen but doesn't instruct Claude. Always use the first approach.
Project commands (shared with team):
.claude/commands//helpPersonal commands (available everywhere):
~/.claude/commands//helpPlugin commands (bundled with plugins):
plugin-name/commands//helpCommands are Markdown files with .md extension:
.claude/commands/
├── review.md # /review command
├── test.md # /test command
└── deploy.md # /deploy command
Simple command:
Review this code for security vulnerabilities including:
- SQL injection
- XSS attacks
- Authentication bypass
- Insecure data handling
No frontmatter needed for basic commands.
Add configuration using YAML frontmatter:
---
description: Review code for security issues
allowed-tools: Read, Grep, Bash(git:*)
model: sonnet
---
Review this code for security vulnerabilities...
Purpose: Brief description shown in /help
Type: String
Default: First line of command prompt
---
description: Review pull request for code quality
---
Best practice: Clear, actionable description (under 60 characters)
Purpose: Specify which tools command can use Type: String or Array Default: Inherits from conversation
---
allowed-tools: Read, Write, Edit, Bash(git:*)
---
Patterns:
Read, Write, Edit - Specific toolsBash(git:*) - Bash with git commands only* - All tools (rarely needed)Use when: Command requires specific tool access
…
它用于为 Claude Code 创建和组织斜杠命令,包括命令结构、YAML frontmatter、动态参数、文件引用、bash 执行和交互模式等内容。
文档说明斜杠命令是 Markdown 文件,通常使用 .md 扩展名。命令内容在调用时会作为对 Claude 的指令执行。
文档列出了项目命令、个人命令和插件命令的位置,例如 `.claude/commands/` 与 `~/.claude/commands/`。同时提到 `.claude/commands/` 是旧格式;新技能更推荐使用 `.claude/skills/<name>/SKILL.md`,详情见源码仓库。
帮助开发者把本地 MCP 服务打包成自带运行时的 .mcpb 安装包。
浏览 Anthropic 官方精选的 Claude Code 插件目录并快速发现可用工具
帮助开发者为 Claude Code 插件创建事件驱动 Hook,并校验工具调用与自动化流程。
帮助开发者梳理需求并规划合适的 MCP 服务器构建方案
生成可视化交互式单文件 HTML playground,便于探索配置并复制提示词
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
提供适用于 Claude 与 Codex 的斜杠命令,帮助更高效调用常用开发指令。
为 AI 编码助手生成并管理斜杠命令,提升开发流程自动化与复用效率。
提供 Claude Code 的安装配置、命令用法与进阶工作流指导
帮助开发者批量生成并部署 Claude 技能、命令与提示模板
帮助你基于接口文档或脚本快速生成可组合的命令行工具
为多种编程代理提供海量可复用技能、命令与脚本,提升开发与协作效率。