Mandatory orchestrator for all LifeOS skill work — creating, editing, adding a workflow or tool, renaming, validating, or canonicalizing any skill. Handrolling
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-createskill-fc540224b84d ,按照其中的说明把「CreateSkill」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Before executing, check for user customizations at:
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/CreateSkill/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification:
curl -s -X POST http://localhost:31337/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the CreateSkill skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow in the **CreateSkill** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Complete skill development lifecycle: structure (create, validate, canonicalize) + effectiveness (test, improve, optimize triggers). Structural workflows ensure skills follow LifeOS conventions. Effectiveness workflows — inspired by Anthropic's skill-creator — ensure skills actually work and trigger reliably.
Before creating ANY skill, READ: ~/.claude/LIFEOS/DOCUMENTATION/Skills/SkillSystem.md
Canonical example to follow: any well-formed public skill in ~/.claude/skills/ (e.g. Research/SKILL.md, Daemon/SKILL.md, CreateSkill/SKILL.md itself).
Skill name encodes its public/private status. There are exactly two valid forms.
| Skill type | Directory format | Example | Allowed content |
|---|---|---|---|
| Public | TitleCase | Blogging, Daemon, CreateSkill | Templated, safe, generic, ready for public release |
| Private | _ALLCAPS (underscore prefix, all uppercase) | _MYSKILL, _MYINBOX, _MYINFRA | Personal-scoped function; body publishable-clean, all sensitive data referenced from LIFEOS/USER/ |
The leading underscore is the public-release boundary. Release tooling skips _* skills entirely — they never leave ~/.claude. Public skills (no underscore) are mirrored into the LifeOS public release and MUST contain only generic, templated content.
Sub-file naming (both public and private skills):
| Component | Format | Example |
|---|---|---|
| Workflow files | TitleCase.md | Create.md, UpdateDaemonInfo.md |
| Reference docs | TitleCase.md | ProsodyGuide.md, ApiReference.md |
| Tool files | TitleCase.ts | ManageServer.ts |
| Help files | TitleCase.help.md | ManageServer.help.md |
Wrong (NEVER use):
createskill, create-skill, CREATE_SKILL (no underscore + caps for public; no kebab/snake for private)create.md, update-info.md, SYNC_REPO.mdAsk: "Could this skill be dropped, as-is, into a stranger's ~/.claude/skills/ and just work?"
TitleCase). Body must be generic; user-specific config layers in via LIFEOS/USER/CUSTOMIZATIONS/SKILLS/<SkillName>/._ALLCAPS).When in doubt, build it private first (_ALLCAPS). Promoting _FOO → Foo later is easy. Discovering a public skill leaks your life is permanent.
Public skills (TitleCase) ship to the world. Private skills (_ALLCAPS) never leave the local repo. Sensitivity is decided by skill name, not by per-file scrubbing at share-time.
Public skill (TitleCase) — content rule:
ONLY templated, safe, public, ready content. Period.
github.com/<org>/<private-repo>)/Users/<name>/..., /home/<name>/...)Private skill (_ALLCAPS) — content rule (2026-07-23 separation directive):
Same publishable-clean standard as public skills. The underscore is still the release boundary (release tooling skips _* — that safety net stays), but it no longer licenses embedding personal content. A private skill's body — SKILL.md, workflows, tools — holds only generic code and instructions; everything sensitive lives under LIFEOS/USER/ and the skill reads it by path:
LIFEOS/USER/CUSTOMIZATIONS/SKILLS/<SkillName>/ — unless a canonical USER home already owns it (GEAR.md, FINANCES/, TELOS/, CONTACTS.md); then point there, never duplicate.Config.md/.yaml in that same CUSTOMIZATIONS dir, loaded by the skill at run time.~/.claude/.env. Never values, never tokens in URLs.~-relative or config-resolved paths only).Why: a private skill in this state is promotable to public with a rename, the whole tree passes one hygiene gate, and a leak of the skills tree leaks no life data. What makes a skill private is that its FUNCTION is personal-scoped (your inbox, your customer, your infra) — not that its files hold your data.
Enforcement: LIFEOS/TOOLS/SkillHygieneGate.ts (deny-list clean, runs inside /ic) + the SystemFileGuard write gate. A new skill is not done while the gate reports violations on it.
When you find yourself wanting to write any of the following into a skill body, that skill MUST be _ALLCAPS:
| If the skill mentions… | Skill must be |
|---|---|
| A specific person's name (yours, your partner's, your team's, a customer's) | _ALLCAPS |
| A specific product name you own or sell | _ALLCAPS |
| A specific customer or client | _ALLCAPS |
| A specific paid API account, billing realm, or subscription | _ALLCAPS |
| A specific private domain, hostname, internal IP, or VPN | _ALLCAPS |
| A specific private repo, dotfile location, or local infra | _ALLCAPS |
| A specific business process tied to your company | _ALLCAPS |
| A specific financial, health, security, or legal context | _ALLCAPS |
| A specific incident or one-off war story | _ALLCAPS |
Anything that would be wrong, embarrassing, or unsafe in someone else's ~/.claude/ | _ALLCAPS |
If none of the above apply and the skill is fully generic — it can be TitleCase (public).
A public skill can be made user-specific at runtime via ~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/<SkillName>/PREFERENCES.md. The skill body stays generic; the user's customization file overlays per-instance context. Use this when a skill is fundamentally generic but benefits from per-user tweaks (preferred voice, default formats, personal taste).
Do not use CUSTOMIZATIONS/SKILLS to smuggle private content into a public skill. If the skill requires private context to function (real customer name, real API account, real internal infra), it is a private skill — name it _ALLCAPS and stop.
~/ paths (~/.claude/skills/, ~/Projects/<tool>/) — resolve per-userlocalhost:31337/notify)<url>, <SESSION_ID>, test@example.com)STRIPE_API_KEY, OPENAI_API_KEYBefore shipping or modifying ANY skill, run the hygiene gate:
bun ~/.claude/LIFEOS/TOOLS/SkillHygieneGate.ts --skill <SkillName>
It scans against the canonical deny-list (LIFEOS/USER/SECURITY/DENY_LIST.txt — the list is identity DATA, so it lives in the USER tree) plus home-path shapes. Exit 0 = clean. Any violation = move the data to LIFEOS/USER/CUSTOMIZATIONS/SKILLS/<SkillName>/ (or its canonical USER home) and reference it by path. Since 2026-07-23 there is no private-skill exemption — _ALLCAPS decides where a skill ships (nowhere), not what its files may contain.
CRITICAL: Keep folder structure FLAT - maximum 2 levels deep.
Maximum depth: skills/SkillName/Category/
skills/SkillName/SKILL.md # Skill root
skills/SkillName/Workflows/Create.md # Workflow - one level deep - GOOD
skills/SkillName/Tools/Manage.ts # Tool - one level deep - GOOD
skills/SkillName/QuickStartGuide.md # Context file - in root - GOOD
skills/SkillName/Examples.md # Context file - in root - GOOD
skills/SkillName/Resources/Guide.md # Context files go in root, NOT Resources/
skills/SkillName/Docs/Examples.md # Context files go in root, NOT Docs/
skills/SkillName/Workflows/Category/File.md # THREE levels - NO
skills/SkillName/Templates/Primitives/File.md # THREE levels - NO
skills/SkillName/Tools/Utils/Helper.ts # THREE levels - NO
These subdirectories are allowed:
Context files (documentation, guides, references) go in the skill ROOT or in References/.
When to use References/: When SKILL.md exceeds ~500 lines and has substantial reference content (API signatures, detailed examples, troubleshooting guides). Keep SKILL.md as a routing guide; move encyclopedic content to References/.
If you need to organize many workflows, use clear filenames instead of subdirectories:
See: ~/.claude/LIFEOS/DOCUMENTATION/Skills/SkillSystem.md (Flat Folder Structure section)
For skills with SKILL.md > 100 lines: Use dynamic loading to reduce context on skill invocation.
Session startup: Only frontmatter loads for routing Skill invocation: Full SKILL.md loads Context files: Load only when workflows reference them
SKILL.md = Minimal (30-50 lines) - loads on skill invocation
Additional .md files = Context files - SOPs for specific aspects (loaded on-demand)
NEVER create Context/ or Docs/ subdirectories.
Additional .md files ARE the context files. They live directly in skill root.
WRONG:
skills/Art/
├── SKILL.md
└── Context/ ❌ NEVER CREATE THIS
└── Aesthetic.md
CORRECT:
skills/Art/
├── SKILL.md
├── Aesthetic.md ✅ Context file in skill root
├── Examples.md ✅ Context file in skill root
└── Tools.md ✅ Context file in skill root
The skill directory IS the context.
skills/Art/
├── SKILL.md # 40 lines - minimal routing
├── Aesthetic.md # Context file - SOP for aesthetic
├── Examples.md # Context file - SOP for examples
├── Tools.md # Context file - SOP for tools
├── Workflows/ # Workflows
│ └── Essay.md
└── Tools/ # CLI tools
└── Generate.ts
---
name: SkillName
description: Create, test, and optimize LifeOS skills — scaffolding, effectiveness testing, description optimization. USE WHEN create skill, new skill, validate skill, test skill, improve skill, optimize description.
---
# SkillName
Brief description.
## Workflow Routing
| Trigger | Workflow |
|---------|----------|
| "trigger" | `Workflows/WorkflowName.md` |
## Quick Reference
**Key points** (3-5 bullet points)
**Full Documentation:**
- Detail 1: `SkillSearch('skillname detail1')` → loads Detail1.md
- Detail 2: `SkillSearch('skillname detail2')` → loads Detail2.md
✅ Use dynamic loading for:
❌ Don't use for:
See: ~/.claude/LIFEOS/DOCUMENTATION/Skills/SkillSystem.md (Dynamic Loading Pattern section)
| Workflow | Trigger | File |
|---|---|---|
| CreateSkill | "create a new skill" | Workflows/CreateSkill.md |
| ValidateSkill | "validate skill", "check skill" | Workflows/ValidateSkill.md |
| UpdateSkill | "update skill", "add workflow" | Workflows/UpdateSkill.md |
| CanonicalizeSkill | "canonicalize", "fix skill structure" | Workflows/CanonicalizeSkill.md |
| Workflow | Trigger | File |
|---|---|---|
| TestSkill | "test skill", "does this skill work", "skill not working" | Workflows/TestSkill.md |
| ImproveSkill | "improve skill", "skill quality", "fix skill instructions" | Workflows/ImproveSkill.md |
| OptimizeDescription | "optimize description", "skill not triggering", "trigger accuracy" | Workflows/OptimizeDescription.md |
Before creating any skill, identify which of the 9 types it is (from Anthropic's internal skill taxonomy, Thariq Shihipar, Mar 2026). The type shapes structure and testing decisions.
| Type | Focus | Key Structure | Example |
|---|---|---|---|
| 1. Library/API Reference | Gotchas, edge cases Claude gets wrong | Lightweight, gotchas-heavy, reference snippets | HonoReference, D1Reference |
| 2. Product Validation | Test/verify code works | State assertions, browser automation, output recording | Browser |
| 3. Data Fetching | Connect to data systems | Credential refs, query patterns, dashboard pointers | USMetrics, a business-metrics skill |
| 4. Business Process | Automate repetitive workflows | Execution logs, consistency tracking | a task-tracker skill, a syndication skill |
| 5. Code Scaffolding | Generate framework boilerplate | Template files, project-aware scripts | CreateCLI, CreateSkill |
| 6. Code Quality | Enforce standards, review | Deterministic scripts, hook integration | /simplify, /code-review |
| 7. CI/CD & Deployment | Deploy with safety patterns | Pre-deploy checks, smoke tests, rollback | (gap — needs Deploy skill) |
| 8. Operations Runbooks | Map phenomena to diagnostics | Phenomenon → tool → query → report | a site-health skill |
| 9. Infrastructure Ops | Maintenance with safety guardrails | Safety gates, audit logging, orphan detection | a system-management skill, a dotfiles skill |
When writing or improving skill instructions, follow these principles from Anthropic's skill-creator methodology and Thariq Shihipar's "Lessons from Building Claude Code" (Mar 2026):
MANDATORY, CRITICAL, "not optional", and a third restatement add volume, not constraint — the model obeys specificity and code, not emphasis. Delete any line whose only content is shouting a rule stated elsewhere. Watch ## Best Practices / ## Tips sections: they collect default-restating filler ("be thorough", "keep it simple", "validate carefully"). Run the delete-test in Prompting/Standards.md § Signal-to-Noise on every line: cut it, and restore only if you can name the specific non-default behavior it forces."NOT FOR web pentesting (use WebAssessment)".Every skill MUST have a ## Gotchas section after the workflow routing table. Thariq: "The highest information density in any Skill comes from gotchas sections."
Populate with:
Gotchas accumulate over time. After every skill failure, add the lesson.
Write every new skill body and workflow ideal-state style: articulate WHAT a done deliverable looks like (as testable outcomes), the CONSTRAINTS, and the TOOLS — then trust the model to find HOW. Numbered step-lists that choreograph the model's reasoning for open-ended cognitive work are BPE-violating scaffolding: they cap a capable model and rot as models improve. Four keep-classes ARE legitimate HOW and belong in skills: safety-gate, verified-gotcha (this is what ## Gotchas is for), tool-contract (exact invocation recipes in Workflows), output-format-contract. Deterministic Tools (*.ts) are exempt. When writing or improving a skill, cut methodology narration and keep only the ideal state, the constraints, the tools, and the four keep-classes. Full standard: LIFEOS/DOCUMENTATION/Skills/SkillSystem.md § Authoring Standard.
Before finalizing any skill, ask: "Would a smarter model make this skill unnecessary?"
Focus skills on knowledge Claude can't derive (failure modes, API quirks), tools Claude can't replicate (API calls, automation), and workflows that benefit from consistency.
Three levels of information loading — use this to manage large skills:
.md files or References/ subdirectory loaded on demand.Tell Claude what files exist; it will read them when appropriate. SKILL.md should be under 500 lines — if over, extract detailed content to reference files.
Three testing levels for skills:
Evaluation-driven development: Define what "this skill working" looks like before building the skill. Iterate on a single challenging task until Claude succeeds, then extract the winning approach.
Skills can include hooks that activate only when invoked, remaining effective for the session:
/careful — Intercept dangerous commands (rm -rf, DROP TABLE, force-push)/freeze — Block edits outside specific directories/audit — Log all tool calls for session reviewAll guidance above derived from Thariq Shihipar's "Lessons from Building Claude Code" (Mar 2026), Anthropic's official skill guide, and platform documentation.
Every skill carries its own version: semver in SKILL.md frontmatter (Major.Feature.Patch — the middle number is Feature, not "minor"), independent of the OS version and of other skills. A new skill scaffolds at version: 1.0.0. A skill change is ALSO an OS change — skills/ is part of the core-file surface the LifeOS version system watches — so editing a skill moves both the skill's own version AND (rolled up) the canonical LIFEOS/VERSION. The two lines are separate: the skill's version: is its own lineage; LIFEOS/VERSION is the umbrella. CreateSkill never edits LIFEOS/VERSION itself.
Classify the change so the bump level is right (the SAME rubric applies to the per-skill bump and the roll-up):
When the per-skill bump fires: at private-sync time, not at edit time. The UpdateKaiRepo ship flow runs BumpSkillVersions.ts — for every skills/<name>/ that changed since the last OS tag it scopes ClassifyChange --path skills/<name> and bumps that skill's version: (major held for confirm), recording each in the SYSTEMUPDATES registry. This catches workflow-body edits that never route through CreateSkill. You do NOT hand-bump version: here; the ship flow owns it. (That ship flow is maintainer machinery and does not ship in the public release — on an installed system without it, hand-bump version: per the semver rubric above as part of your edit.) A skill edit is a private-sync change — never a release cut (staging only) or publish (public repo). Keep those three operations distinct.
Public skills do not carry a separate version line — the release/emit carries each skill's private version: forward unchanged.
(Concrete commands/paths for this install layer in via the Customization block above, if present.)
Example 1: Create a new skill from scratch
User: "Create a skill for managing my recipes"
→ Invokes CreateSkill workflow
→ Reads SkillSystem.md for structure requirements
→ Creates skill directory with TitleCase naming
→ Creates SKILL.md, Workflows/, Tools/
→ Suggests running TestSkill to verify effectiveness
Example 2: Fix an existing skill that's not routing properly
User: "The research skill isn't triggering - validate it"
→ Invokes ValidateSkill workflow
→ Checks SKILL.md against canonical format
→ Verifies TitleCase naming and USE WHEN triggers
→ Reports compliance issues with fixes
Example 3: Test if a skill actually helps
User: "Test the Blogging skill to see if it's effective"
→ Invokes TestSkill workflow
→ Generates 3 realistic test prompts
→ Spawns with-skill and baseline agents in parallel
→ Compares outputs, presents results
→ Iterates with ImproveSkill based on feedback
Example 4: Skill isn't triggering on relevant prompts
User: "The Security skill doesn't trigger when I ask about pentesting"
→ Invokes OptimizeDescription workflow
→ Generates 20 should/shouldn't-trigger queries
→ Tests description accuracy via subagents
→ Rewrites description, re-tests, reports improvement
Example 5: Improve a skill that produces weak output
User: "The research skill output is too verbose — improve it"
→ Invokes ImproveSkill workflow
→ Reads skill + user feedback
→ Diagnoses root cause (over-specified instructions)
→ Rewrites with reasoning instead of rigid MUSTs
→ Suggests TestSkill to verify improvement
## Workflow Routing headers exist in this file — the first (~l.276) is inside the embedded template example, the second (~l.315) is the real one. Header-scanning tools must take the LAST match, not the first.skills/CLAUDE.md requires invoking the skill, not imitating it. The skill that mandates Gotchas sections went without one until 2026-06-13; treat checklist items as applying to this skill too.After completing any workflow, append a single JSONL entry:
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"CreateSkill","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl
Replace WORKFLOW_USED with the workflow executed, 8_WORD_SUMMARY with a brief input description, and SECONDS with approximate wall-clock time. Log status: "error" if the workflow failed.