技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
, ≤64 chars), body length (\u003c500 lines), install symlink pattern, AGENTS.md canonicalisation, hooks portability, and the 5 most common breaking mistakes.\n\nValidate any new cross-tool skill against `cross-tool-portability/scripts/verify-skill-portability.sh` before publishing:\n\n```bash\nbash ~/.claude/skills/research-for-skills/cross-tool-portability/scripts/verify-skill-portability.sh \\\n ~/.claude/skills/\u003cname>/SKILL.md\n```\n\nExit 0 = portable. Non-zero = fix the reported issue.\n\nThe sub-skill files:\n\n| File | When to read |\n|---|---|\n| `cross-tool-portability.md` | Top-level rulebook — read first |\n| `frontmatter-rules.md` | Authoring SKILL.md frontmatter |\n| `install-matrix.md` | Setting up symlinks across `~/.claude/`, `~/.codex/` (and agy plugin import) |\n| `agents-md-canonical.md` | Designing AGENTS.md / CLAUDE.md content |\n| `hooks-portability.md` | Authoring hooks (Claude-native; agy equivalent unverified) |\n| `headless-invocation.md` | Translating `claude -p` patterns to `agy -p` and `copilot -p` |\n| `verification-first-boot.md` | Validating a new skill on first install |\n| `common-mistakes.md` | The five most common breaking mistakes |\n| `challenger-concerns.md` | Hook re-entrancy, name collisions, multi-user auth |\n\n## Anti-Patterns\n\n| Don't | Why |\n|-------|-----|\n| Duplicate web-research methodology | Invoke `web-research` — don't reinvent |\n| Create skills without research | Generic advice is harmful; agents follow literally |\n| Skip comparison engine | May create inferior duplicate of existing plugin skill |\n| Scan raw plugin cache | Stale versions cause double-counting; use `installed_plugins.json` |\n| Skip Codex challenger for new skills | Single-model blind spots produce weaker skills |\n| Write prose self-learning notes | Use structured JSONL with failure taxonomy |\n| Deploy without testing | Apply `development-lifecycle` TDD methodology and the testing patterns in `authoring-rules.md` |\n| Summarize workflow in description | Causes Claude to shortcut and skip skill body |\n| Write skills >1200 words inline | Use separate reference files for heavy content |\n| Make a skill depend on Workflow/native teams | Breaks Codex/Copilot and all subagent contexts | HO gate (HO-1..HO-7): optional + feature-detected + fallback-first + host-neutral |\n","licenseDocuments":[]}}
research-for-skills【数据与研究】Use when a skill gap is identified during task planning, when the user asks to create or improve a skill, or when forge detects no matching skill for a domain.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Skill creation pipeline with dual-model review and self-learning. Thin orchestrator — delegates research to web-research, comparison to Codex sidecars, and testing methodology lives inline in authoring-rules.md (TDD enforced via development-lifecycle).
needs_refresh (see improvement-loop.md)If invoked from gap-detection (pre-filled scope in prompt):
Ask (one at a time):
Identify all existing skills that may overlap. See comparison-engine.md for full methodology.
# Custom skills
ls ~/.claude/skills/*/SKILL.md
# Plugin skills — resolve from installed_plugins.json, NOT raw cache
cat ~/.claude/plugins/installed_plugins.json | grep installPath
Critical: Never scan ~/.claude/plugins/cache/ directly — stale versions will double-count.
Extract normalized records for matched skills. Cache to ~/.claude/skills/_meta/inventory.json. See comparison-engine.md for record format and refresh rules.
Shortlist 3-8 relevant skills (direct matches, adjacent domains, exemplars). Dispatch Codex skill_comparator sidecar in parallel:
CODEX_WORK=$(mktemp -d /tmp/codex-XXXXXXXXXX)
codex exec --ephemeral -s read-only \
-o "$CODEX_WORK/skill-comparison.md" \
"Read these skill files [PATHS] and compare: coverage, patterns, gaps, quality for [DOMAIN]"
Delegate to web-research — do NOT duplicate research methodology here.
| Task | web-research Level |
|---|---|
| New skill (broad domain) | LONG — full parallel research + challenger |
| New skill (focused topic) | MEDIUM — 1-2 agents, focused |
| Refresh (outdated sections) | MEDIUM — targeted |
| Quick version check | SHORT — verify current data |
Optional: dispatch Codex docs_verifier sidecar for API/version claims:
Antigravity (agy) for freshness checks: Use a direct agy -p "..." Bash call to verify latest versions, deprecation status, and current best practices. Particularly useful for fast-moving domains where cached knowledge may be stale. agy returns plain text on stdout (parse text, not JSON fields). Complements Codex verification — run both in parallel when accuracy is critical. See the antigravity-cli skill for the invocation pattern.
agy --sandbox -p "Verify current as of 2026: latest stable version, deprecation status, and current best practices for [DOMAIN/LIBRARY]. List sources." < /dev/null
CODEX_WORK=$(mktemp -d /tmp/codex-XXXXXXXXXX)
codex exec --ephemeral -s read-only \
-o "$CODEX_WORK/docs-verify.md" \
"Verify these claims are current as of 2026: [SPECIFIC CLAIMS]"
Merge comparison + research findings. Extract:
Check _meta/creation-log.jsonl for:
Check _meta/gap-events.jsonl for previous attempts at this domain:
Write using rules in authoring-rules.md. Key gates:
<!-- FRESHNESS:v1 ... --> block (NEVER frontmatter — works in SKILL.md AND frontmatter-less references) declaring the tool/date/model you verified against, so the evergreen rot scanner can grade the skill instead of treating it as UNANNOTATED. Validate with python3 ~/.claude/skills/_meta/freshness.py lint <file> (advisory). Convention spec: docs/plans/2026-06-04-evergreening-design.md §6.5. (Same convention applies when the superpowers writing-skills plugin authors a skill — the FRESHNESS block is host-agnostic.)A skill that wants to fan work out across agents/workflows MUST satisfy ALL of these. Full guidance + copy-paste templates: references/harness-orchestration.md.
probe.sh get capabilities.* ONLY (never inline probing, never raw jq on inventory.json); capabilities.* alone NEVER authorizes orchestration — the context conjunct (probe.sh context == main-loop / tool-list check) is mandatory (session files are shared with subagents).schemas/; the companion workflow embeds the SCHEMA-TWIN-annotated literal (G-W2); the schema is REGISTERED (_meta/schemas/registry.v1.json).Agent on Claude Code; see tool-mapping for Codex/Copilot)"); every plan/report artifact is host-neutral data executable serially by any host; only workflow compilation is described as Claude-main-loop-only; the skill DESCRIPTION never names Workflow/native teams (CSO pollution on other hosts).Local checks: frontmatter, word count, description format, anti-patterns table, CSO keywords.
Codex skill_challenger (mandatory for new skills, optional for minor updates):
CODEX_WORK=$(mktemp -d /tmp/codex-XXXXXXXXXX)
codex exec --ephemeral -s read-only \
-o "$CODEX_WORK/skill-challenger.md" \
"Review this skill draft at [PATH]. Check: missing triggers, vague sections,
outdated claims, structural bloat, CSO quality. Output: deploy / revise / rewrite."
Integrate feedback. If "revise": fix and re-run. If "rewrite": return to Step 7.
cp SKILL.md SKILL.md.bak~/.claude/skills/<name>/SKILL.mdmv SKILL.md.bak SKILL.md to restorecreation-log.jsonl.no-codex-symlink sentinel):
if [ ! -e "$HOME/.claude/skills/$SKILL_NAME/.no-codex-symlink" ]; then
ln -sfn "$HOME/.claude/skills/$SKILL_NAME" "$HOME/.codex/skills/$SKILL_NAME"
fi
Symlink gating rule (single source of truth — no hardcoded list to maintain):
symlink every new skill into ~/.codex/skills/ UNLESS the skill dir contains a .no-codex-symlink sentinel file (affordance-advisor precedent — host-gated skills that must not load on other CLIs). To exempt a skill, drop the sentinel: touch ~/.claude/skills/<name>/.no-codex-symlink.
Append to ~/.claude/skills/_meta/creation-log.jsonl:
{"date":"YYYY-MM-DD","skill":"name","action":"created|updated|refreshed","research_level":"SHORT|MEDIUM|LONG","sources":["..."],"comparison_skills":["..."],"codex_reviews":["skill_comparator","skill_challenger"],"patterns_used":["..."]}
See improvement-loop.md for failure tracking and refresh thresholds.
_meta/failure-deltas.jsonlweb-research for specific gaps.no-codex-symlink sentinel present): test -e ~/.claude/skills/<name>/.no-codex-symlink || test -L ~/.codex/skills/<name> || ln -sfn ...creation-log.jsonlWhen forge detects a skill gap:
"This task involves [DOMAIN]. No matching skill found.
A) Research and create a skill first (runs this flow)
B) Proceed without specialized skill
C) Skip — general knowledge is enough"
If A: run Steps 1-10, return to forge with new skill available.
See authoring-rules.md for full guidelines. Key rule: use tool-agnostic language ("Read the file" not "Use the Read tool").
When authoring a skill that must work across multiple AI CLIs (Claude Code, Antigravity CLI (agy), Codex CLI, GitHub Copilot CLI), read cross-tool-portability/cross-tool-portability.md first. It contains strict rules for frontmatter (only name + description), naming (^[a-z0-9-]+$, ≤64 chars), body length (<500 lines), install symlink pattern, AGENTS.md canonicalisation, hooks portability, and the 5 most common breaking mistakes.
Validate any new cross-tool skill against cross-tool-portability/scripts/verify-skill-portability.sh before publishing:
bash ~/.claude/skills/research-for-skills/cross-tool-portability/scripts/verify-skill-portability.sh \
~/.claude/skills/<name>/SKILL.md
Exit 0 = portable. Non-zero = fix the reported issue.
The sub-skill files:
| File | When to read |
|---|---|
cross-tool-portability.md | Top-level rulebook — read first |
frontmatter-rules.md | Authoring SKILL.md frontmatter |
install-matrix.md | Setting up symlinks across ~/.claude/, ~/.codex/ (and agy plugin import) |
agents-md-canonical.md | Designing AGENTS.md / CLAUDE.md content |
hooks-portability.md | Authoring hooks (Claude-native; agy equivalent unverified) |
headless-invocation.md | Translating claude -p patterns to agy -p and copilot -p |
verification-first-boot.md | Validating a new skill on first install |
common-mistakes.md | The five most common breaking mistakes |
challenger-concerns.md | Hook re-entrancy, name collisions, multi-user auth |
| Don't | Why |
|---|---|
| Duplicate web-research methodology | Invoke web-research — don't reinvent |
| Create skills without research | Generic advice is harmful; agents follow literally |
| Skip comparison engine | May create inferior duplicate of existing plugin skill |
| Scan raw plugin cache | Stale versions cause double-counting; use installed_plugins.json |
| Skip Codex challenger for new skills | Single-model blind spots produce weaker skills |
| Write prose self-learning notes | Use structured JSONL with failure taxonomy |
| Deploy without testing | Apply development-lifecycle TDD methodology and the testing patterns in authoring-rules.md |
| Summarize workflow in description | Causes Claude to shortcut and skip skill body |
| Write skills >1200 words inline | Use separate reference files for heavy content |
| Make a skill depend on Workflow/native teams | Breaks Codex/Copilot and all subagent contexts |