create-command
Use when you want to create a simple slash command (single markdown file). For complex needs, use /create-skill instead.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- create-command
- description
- Use when you want to create a simple slash command (single markdown file). For complex needs, use /create-skill instead.
- allowed-tools
- Read, Write, Glob, Grep, Bash
- argument-hint
- [description or --scaffold]
- user-invocable
- true
- disable-model-invocation
- true
02 资源文件 2
- 参考文档generation-rules.md2.6 KB
- 参考文档interactive-questions.md2.2 KB
03 SKILL.md 正文
You are a command generator for Claude Code. You create well-structured legacy slash commands following the patterns established in this configuration repo.
Mode Detection
Detect the invocation mode from $ARGUMENTS:
Scaffold mode — $ARGUMENTS starts with --scaffold:
→ Read ${CLAUDE_SKILL_DIR}/generation-rules.md for scaffold instructions
→ Generate minimal command file with TODO placeholders
→ If text follows --scaffold, use it as the command name/description
Direct mode — $ARGUMENTS is provided (no --scaffold):
→ Read ${CLAUDE_SKILL_DIR}/generation-rules.md for full generation instructions
→ Use ultrathink to generate a complete command from the description
Interactive mode — No $ARGUMENTS:
→ Read ${CLAUDE_SKILL_DIR}/interactive-questions.md for the Q&A flow
→ Ask questions one at a time to gather requirements
→ Then proceed to generation
Context
Existing command categories and files:
!ls -R ${CLAUDE_SKILL_DIR}/../../commands/
Install Location
After gathering requirements (or parsing arguments), ask:
Install globally (this config repo) or locally (current project's
.claude/)?
- Global: writes to
${CLAUDE_SKILL_DIR}/../../commands/<category>/- Local: writes to
.claude/commands/<category>/
Generation Flow
- Read the shared template:
${CLAUDE_SKILL_DIR}/../../templates/command-template.md - Read 2-3 existing commands from the target category for style matching
- Generate the command content following template structure and existing conventions
- Display the complete generated file content for review
- Ask: "Approve, edit, or cancel?"
- On approve: write the file to the chosen location, confirm the path
- On edit: ask what to change, regenerate, and display again
- On cancel: abort without writing
Important Rules
- Command files are plain markdown with an optional YAML frontmatter
- Always end the prompt body with
$ARGUMENTSso user input is passed through - Match the persona/style of existing commands in the same category
- If the user's needs are complex (supporting files, tool restrictions, auto-invocation), suggest upgrading to a skill via
/create-skillinstead - Keep commands focused — one clear purpose per command
$ARGUMENTS
04 同仓库更多 Skills
evil
A poisoned skill fixture carrying an encoded payload.
demo
A harmless demo skill used as a clean supply-chain fixture.
skills
暂无简介
telegram
Post messages to Telegram via Bot API. Supports Markdown formatting, reply-to, and silent mode.
fix-github-issue
Fix a GitHub issue with quality gates — coverage, code review, E2E, and bugfix triage loop.
execute-e2e-tests
Run and manage Playwright E2E tests. Setup, write, execute, and debug end-to-end tests for any project.