Skip to main content

craft

Creates Claude Code skills or agents from a description. Use when the user wants to create, generate, build, or scaffold a new skill or agent.

跳到安装

来源信息

仓库
gravity9-tech/claude_code_workshop
最近来源活动
2026年3月11日 15:25
检测到的 SKILL.md 语言
英语
星标
1
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
3 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
craft
description
Creates Claude Code skills or agents from a description. Use when the user wants to create, generate, build, or scaffold a new skill or agent.
argument-hint
<skill|agent> <description>
# Craft Create a well-structured Claude Code **skill** or **agent** from a description. ## Arguments - `$0` — artifact type: `skill` or `agent` - Remaining arguments — description of what to create If `$0` is not `skill` or `agent`, infer the type from context or ask the user. ## Process ### 1. Parse Request Extract from `$ARGUMENTS`: - **Type**: skill or agent - **Purpose**: what it should do - **Triggers**: when it should activate - **Scope**: what tools/access it needs ### 2. Research Use WebSearch to find domain best practices relevant to the artifact's purpose. This informs the instructions and tool selection. ### 3. Determine Tools Do NOT blanket-allow all tools. Select tools based on what the artifact actually does: | Artifact needs to... | Grant these tools | |-----------------------|-------------------| | Read/search code | Read, Grep, Glob | | Modify files | Read, Edit, Write | | Run shell commands | Bash (scope with patterns like `Bash(git:*)`) | | Research online | WebSearch, WebFetch | | Spawn subagents | Task | | Nothing external | Omit `allowed-tools` entirely | Principle: **start with zero tools and add only what's justified by the instructions.** If a tool isn't referenced in any instruction step, don't include it. ### 4. Craft the Description The `description` field is the most important metadata — it controls when Claude auto-loads the skill/agent. **Rules:** - **What + When**: first clause says what it does, second says when to trigger - **Include trigger keywords**: verbs and nouns users/Claude would use (e.g., "deploy", "review", "format") - **Include anti-triggers**: use "DO NOT TRIGGER when..." for ambiguous domains - **Under 200 chars** for the summary line; use multi-line for complex trigger logic - **Test mentally**: "If a user says X, would this description match?" — if no, add the keyword **Good examples:** ``` Reviews code for security vulnerabilities. Use when auditing code, checking for OWASP issues, or reviewing auth. ``` ``` Sets up Playwright MCP server. Use when setting up browser automation, web testing, or scraping. ``` **Bad examples:** ``` A helpful skill for doing things with code. # too vague, no triggers Security stuff. # no "when to use" ``` ### 5. Design & Write Read the appropriate reference file for the artifact type: - **Skill**: Read `${CLAUDE_SKILL_DIR}/refs/skill.md` for metadata fields, template, and validation checklist - **Agent**: Read `${CLAUDE_SKILL_DIR}/refs/agent.md` for metadata fields, template, and validation checklist Follow the template structure and validate against the checklist in that file. ### 6. Present & Save 1. Display the complete artifact 2. Show validation checklist results (from the ref file) 3. Ask where to save (default: `.claude/skills/<name>/SKILL.md` or `.claude/agents/<name>.md`) 4. Save using the Write tool 5. Confirm: `/name` for skills, `@name` for agents
在 GitHub 查看