用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill instruction-generator命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | instruction-generator |
| description | >- Use when this capability is needed. |
Produces clear, scoped, non-contradictory instruction files that Claude loads and follows automatically.
Instructions are always-on: they apply whenever Claude processes matching files or contexts. Keep them concise. Every word in an instruction file costs context tokens on every invocation.
| Need | File | Location |
|---|---|---|
| Applies to the whole workspace / all files | copilot-instructions.md or AGENTS.md | .github/ or root |
| Applies to specific file types or folders | <name>.instructions.md | .github/instructions/ |
| Applies to user (cross-workspace) | <name>.instructions.md | {{VSCODE_USER_PROMPTS_FOLDER}}/ |
applyTo patterns:
"**" — matches all files"**/*.ts" — TypeScript files"src/**" — everything under src/"**/*.{ts,tsx}" — multiple extensionsapplyTo absent for on-demand instructions (not auto-applied)Follow these steps in order. Mark each ✓ when done.
Answer before writing:
| Variant | Use when | Target length |
|---|---|---|
| Concise rules | Simple preferences (naming, style, imports) | ≤ 20 lines |
| Extended rules | Fragile workflows, multi-step processes, error-prone areas | 20-60 lines |
| Reference-based | Large rule sets; use progressive disclosure | SKILL body → details.md |
If the instruction body would exceed 60 lines, split it:
*.md file: extended rules, examples, edge cases---
applyTo: "<glob>"
description: "<optional: use for on-demand instructions>"
---
# <Short title>
<Context sentence: what this file covers and why>
## Rules
- <Rule 1: imperative, specific, verifiable>
- <Rule 2: imperative, specific, verifiable>
- <Rule n>
## Do not
- <Prohibited action 1>
- <Prohibited action 2>
See templates/instructions-concise.md and templates/instructions-extended.md.
To scaffold a stub from the command line:
python skills/instruction-generator/scripts/generate_instruction_stub.py \
--apply-to "**/*.ts" --title "TypeScript rules" [--variant concise|extended]
Run each rule through this test: "Can Claude determine pass/fail without judgment?"
| Vague (reject) | Specific (accept) |
|---|---|
| "Write good code" | "Prefer pure functions; avoid side effects in utility modules" |
| "Be concise" | "Keep function bodies under 40 lines; extract helpers if exceeded" |
| "Handle errors properly" | "Wrap async calls in try/catch; surface errors to the caller — never swallow" |
| "Use modern syntax" | "Use ES2022+; prefer ?. and ?? over manual null checks" |
.github/copilot-instructions.md?applyTo patterns precise enough? (Overly broad patterns → high context cost)applyTo pattern is correct glob syntax — validated against target file paths.Run the validator to catch soft rules and frontmatter issues automatically:
python skills/instruction-generator/scripts/validate_instruction_output.py <path>
# or via poe:
poe validate-instructions <path>
applyTo: without a glob, the file is on-demand only; teams expecting auto-apply will be confused.Deliver the full instruction file (frontmatter + body) and note:
See examples/ for language-specific and workflow-specific patterns. Concise template: templates/instructions-concise.md Extended template: templates/instructions-extended.md
Source: Anselmoo/universal-creator — distributed by TomeVault.