Claude Code 技能目录用法:按需加载 SKILL.md
把重复指令拆成 .claude/skills 下的 SKILL.md,只在描述匹配时加载正文,并用 Jev 在毫秒级分流无需大模型的微决策。
THIS IS A PURE F*CKING GOLDMINE Anthropic just shared one of the best tricks for Claude Code. The idea: a skill is one folder with one markdown file, and Claude only reads it when your request actually matches it. You stop pasting the same instructions into every session, and you pay one line of context instead of the whole document. You just make one folder: .claude/skills/review-pr/SKILL.md here's the split: → the description is the only thing sitting in context, roughly one line per skill → the full body loads the second a request matches that description → scripts in the folder get executed, never read into context → commit the folder and every person in the repo has the skill three frontmatter lines do the heavy lifting: → allowed-tools pre-approves the tools, so it runs without a permission prompt → context: fork hands the skill to a subagent that never sees your chat → paths limits it to the files it actually belongs to Description matches. Body loads. Scripts run. JEV engineering is the same move one layer down: the forks that need no thinker (which skill, which tool, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split the full tree > .claude/skills/<name>/SKILL.md for the repo, ~/.claude/skills/ for your own > only descriptions sit in context, the body loads on match > keep SKILL.md under 500 lines, every line is a recurring cost once loaded > description plus when_to_use is cut at 1,536 characters, put the trigger first > context: fork runs it in a subagent with no conversation history > JEV routes micro-forks in milliseconds paste the tree and this prompt into Claude Code ↓ "Set up skills in this repo from the tree above: 1. Create .claude/skills/ and move the repeated instructions out of CLAUDE.md into one skill per job. 2. Write every description as a trigger sentence first, since the listing is cut at 1,536 characters. 3. Put anything deterministic into scripts/ and pre-approve it with allowed-tools so it runs without a prompt. 4. Route fast deterministic forks (which skill, which tool, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/skills save it, it'll come in handy.
这条是引用着另一条写的:x.com/n01ennn/status/2110319993128706208