一键导入
example-skill
Example skill template — replace this description with your skill's one-sentence purpose.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Example skill template — replace this description with your skill's one-sentence purpose.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
TEMPLATE: replace this with a sharp description. State what the skill does and the concrete triggers that should cause it to load. Example triggers: user mentions a specific command, file type, or workflow phrase. Add anti-triggers (skip-when) if the description risks over-matching.
TEMPLATE: replace with a sharp description. This template is for skills that bundle one or more helper scripts (Bash, Python, Node) and orchestrate them as part of a multi-step workflow. Triggers: replace these with the concrete phrases, file types, or commands that should cause the skill to load. Add "Skip when..." anti-triggers if needed to suppress false matches.
| name | example-skill |
| description | Example skill template — replace this description with your skill's one-sentence purpose. |
| invokable | true |
| version | 0.1.0 |
| triggers | ["when the user asks to <verb> a <noun>","when a file matching <glob> is opened","/example-skill"] |
| requires | ["filesystem","github"] |
| tags | ["example","template","scaffold"] |
| author | your-name@example.com |
| last_updated | "2026-05-24T00:00:00.000Z" |
| license | MIT |
Replace this paragraph with a 2–4 sentence description of what your skill does, when it activates, and what the user can expect from it. Be concrete: "Generates a NestJS controller-service-DTO scaffold for a named resource" is far better than "Helps with NestJS scaffolding."
Bullet list of concrete situations where this skill is the right tool. The goal: a model reading this list can decide in one pass whether to invoke.
Just as important. List the look-alike situations where this skill is the wrong answer.
other-skill instead.What the user (or the calling agent) must supply for the skill to do its job. If anything below is missing, the skill should ask one clarifying question, not guess.
| Input | Type | Required | Notes |
|---|---|---|---|
target_path | string (path) | yes | Where to write output. Must exist. |
resource_name | string | yes | PascalCase. The "thing" being scaffolded. |
template_variant | enum (minimal | full) | no (default minimal) | Controls scaffold depth. |
Numbered, deterministic, and brief. Each step should be one verb + one object. If a step needs branching, name the branches inline rather than nesting.
Validate inputs.
target_path exists and is writable.resource_name matches ^[A-Z][A-Za-z0-9]+$.Resolve template.
scripts/example.sh (the helper script).Dry-run preview.
scripts/example.sh --dry-run … and capture stdout.Confirm with user.
--auto-confirm.Execute.
scripts/example.sh ….Verify.
Report.
app.module.ts").A complete invocation, including the user message and the skill's response. This block is load-bearing — it is what the runtime uses to learn the skill's shape. Make it realistic.
User:
Scaffold a Payment resource under src/payments.
Skill (example-skill):
Inputs resolved:
target_path: src/payments
resource_name: Payment
template_variant: minimal
Dry-run preview:
+ src/payments/payment.controller.ts
+ src/payments/payment.service.ts
+ src/payments/payment.module.ts
+ src/payments/dto/create-payment.dto.ts
+ src/payments/dto/update-payment.dto.ts
+ tests/payments/payment.service.spec.ts
Confirm? [y/N]
User: y
Skill:
Created 6 files.
Lint pass: clean.
Next step: import PaymentModule into src/app.module.ts.
What this skill is NOT for. List the misuse cases you have seen or expect. This section saves the most time of any in the file.
refactor-rename.The realistic ways this skill goes wrong, with recovery steps the calling agent can follow.
| Failure | Symptom | Recovery |
|---|---|---|
| Target path does not exist | Step 1 errors with ENOENT | Ask the user to create the directory or pick a different path. |
| Resource name collision | Step 3 dry-run lists a file that already exists | Stop. Ask the user whether to overwrite, suffix, or abort. |
| Lint fails after scaffold | Step 6 reports lint errors | Surface the errors. Do not auto-fix — the user should see what the scaffold produced. |
| Helper script missing | Step 2 cannot read scripts/example.sh | Tell the user the skill is broken-on-disk and stop. |
Cross-link to neighboring skills, related rules, and external docs. Keep this short — link only to things a reader will plausibly want.
refactor-rename skill — for renaming, not creating.add-tests skill — to expand the scaffolded *.spec.ts files.templates/AGENTS.md — for the larger agent-orchestration context.rules/typescript/coding-style.md.Notes for future maintainers — not for the runtime. The runtime stops reading
at ## See Also; everything below is for humans.
# Run the helper in dry-run mode against a scratch directory.
mkdir -p /tmp/skill-test
bash scripts/example.sh --dry-run --target /tmp/skill-test --name Sample
0.x.y): wording changes, internal refactor of the helper script.0.y.0): new optional inputs, new output files, new tags.y.0.0): renamed inputs, removed outputs, changed step order in a
way that downstream callers can observe.