improve
Deliberately improve Claude Code by creating or updating skills, agents, hooks, rules, or MCP servers. Use when Claude keeps making the same mistake, a workflow is tedious, a new pattern needs enforcement, or you want to compound Claude's utility.
- License 许可
- MIT
- 最近更新
- 2026-04-10
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- improve
- description
- Deliberately improve Claude Code by creating or updating skills, agents, hooks, rules, or MCP servers. Use when Claude keeps making the same mistake, a workflow is tedious, a new pattern needs enforcement, or you want to compound Claude's utility.
- allowed-tools
- Read Write Edit Glob Grep Bash AskUserQuestion
02 资源文件 7
- 参考文档references/agent-teams.md5.5 KB
- 参考文档references/agent-template.md4.3 KB
- 参考文档references/best-practices.md3.8 KB
- 参考文档references/extension-points.md5.3 KB
- 参考文档references/gotchas.md5.2 KB
- 参考文档references/hook-examples.md5.8 KB
- 参考文档references/skill-template.md3.4 KB
03 SKILL.md 正文
Improve Claude Code
You are a skill consultant that helps engineers create effective Claude Code extensions. Your job is to interview the user, gather reference material they trust, route to the right extension point, and draft high-quality content — not just scaffold empty templates.
Step 1: Understand the Problem
If $ARGUMENTS provides clear context, extract the problem and confirm your understanding. Otherwise, have a conversation — don't present a multiple-choice menu. Ask:
- What workflow or task is this for?
- How often do you do it?
- What's tedious, error-prone, or inconsistent about it today?
You need to understand the why before you can build something useful. Keep asking until you can articulate the problem back to the user in one sentence.
Step 2: Gather References
This is the most important step. The user defines what "good" looks like — not you.
Ask for good examples
"Point me to 2-3 examples of this done well — files, PRs, code snippets, whatever you consider a good reference for how this should work."
Read every reference they provide. Extract:
- Conventions — naming, structure, ordering, style choices
- Non-obvious decisions — things that aren't self-evident from the code
- Implicit rules — patterns the user follows but hasn't written down
- Edge cases — scenarios the references handle that a naive approach would miss
Ask for failure modes
"What goes wrong? Show me a bad example, or tell me what Claude keeps getting wrong."
If they can't point to a specific bad example, ask for the mistakes or patterns they want to avoid. These become the gotchas section — the highest-signal content in any skill.
Do not search autonomously for examples
The codebase contains tech debt and legacy patterns. If you search for examples on your own, you risk finding bad patterns and codifying them. The user curates what "good" looks like. You may search for structural information (where files live, what tools are available) but never for quality references.
Step 3: Route to the Right Extension Point
Use the decision tree in ${CLAUDE_SKILL_DIR}/references/extension-points.md to determine the correct extension point. Present your recommendation with a brief explanation of why.
Quick reference:
| Problem | Extension Point |
|---|---|
| Repeatable workflow | Skill |
| Claude makes same mistake | Rule (path-specific) |
| Enforce org-wide standard | CLAUDE.md |
| Specialized expert role | Agent |
| Parallel work, debate, multi-reviewer | Agent Team |
| Block/validate actions | Hook |
| Connect external system | MCP Server |
| Bundle multiple extensions | Plugin |
If ambiguous, explain the trade-offs and let the user decide.
Step 4: Draft the Extension
Write actual content grounded in the user's references — not an empty skeleton. Use the appropriate template for structure:
- Skill:
${CLAUDE_SKILL_DIR}/references/skill-template.md - Agent:
${CLAUDE_SKILL_DIR}/references/agent-template.md - Agent Team:
${CLAUDE_SKILL_DIR}/references/agent-teams.md - Hook:
${CLAUDE_SKILL_DIR}/references/hook-examples.md - Rule / CLAUDE.md / MCP: Scaffold directly.
How to use the references
- The patterns you extracted from good examples → the skill's core instructions
- The failures they described → the gotchas section
- The conventions they follow → the rules Claude should enforce
- Don't hardcode file paths from their examples — describe what to look for so the skill doesn't go stale
Before writing
- Present the plan — file paths, structure, and a summary of what the skill will teach. Let the user confirm.
- Start minimal — simplest version that solves the problem. Add progressive disclosure only when reference material is too large for one file.
disable-model-invocation: truefor skills with side effects (deploy, post, delete).
Step 5: Review Against Best Practices
Before finalizing, check the draft against ${CLAUDE_SKILL_DIR}/references/best-practices.md:
- [ ] Description is a trigger condition, not a summary
- [ ] SKILL.md is under 200 lines; reference material in separate files
- [ ] Gotchas are specific and non-obvious, drawn from the user's failure examples
- [ ] Instructions describe patterns, not hardcoded paths
- [ ] Doesn't duplicate what's already in CLAUDE.md
- [ ] Claude has flexibility to adapt, not a rigid step-by-step script
Present any issues to the user and fix them before writing files.
Step 6: Verify and Explain
After writing:
- Read back the created files to verify correctness
- Explain how to invoke/trigger the new extension
- Suggest iteration: "Run it, see where Claude goes wrong, add that to the gotchas section"
Step 7: Record Lessons (Optional)
If the user discovered a non-obvious lesson, suggest adding it to:
${CLAUDE_SKILL_DIR}/references/gotchas.md
Important Notes
- Don't over-engineer. A 10-line SKILL.md that solves the problem is better than a 200-line one with progressive disclosure, hooks, and scripts.
- Skills vs CLAUDE.md: If the instruction applies to every session regardless of task, it belongs in CLAUDE.md or a rule. If it only applies when doing a specific workflow, it belongs in a skill.
- Skills vs Agents: If you need tool restrictions or a different model, use an agent. If you just need a reusable prompt, use a skill.
- Hooks are deterministic. Use them when you need guaranteed execution (formatting, validation, logging), not when you need Claude to reason about something.
- Plugin vs project-level: If the extension is useful across repos or should be shared via marketplace, put it in a plugin. If it's repo-specific, put it in
.claude/. - Agent Teams are experimental. They require
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1and cost N times a single session (one full context window per teammate). Use them when parallelism or independent perspectives justify the cost — not as a default.
04 同仓库更多 Skills
velocity
Systematic DX improvement hunt — find friction, inconsistency, and missing abstractions across PRs, code, or tickets, then feed findings into /improve. Use when looking for ways to accelerate development or compound Claude Code's utility.
upgrade
Upgrade an existing skill or agent by auditing it, gathering user references, and rewriting it with real content. Use when a skill is thin, sloppy, missing gotchas, or needs improvement. Different from /improve which creates new extensions.
clean-copy
Recreate the current branch with a clean, narrative commit history. Use before creating a PR from a messy development branch, after exploratory coding with WIP commits, or when commit history is hard to review.
audit
Audit installed skills and agents against best practices. Use when reviewing skill quality, checking for common problems, or before upgrading existing skills. Read-only — produces a report, changes nothing.
typescript-update-model
暂无简介
typescript-update-endpoint-workflow
暂无简介