创造技能
- 作者仓库星标 190,957
- 作者仓库 n8n
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @n8n-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Creating skills
Skills are markdown (plus optional scripts) that teach the agent a focused workflow. **Keep SKILL.md short**—the context window is shared with chat, code, and other skills.
## Where skills live
| Location | When to use |
|----------|-------------|
| **`.claude/plugins/n8n/skills/<name>/`** | Default for n8n: team-shared, versioned, namespaced under `n8n:`. |
| `~/.claude/skills/<name>/` | Personal skill for Claude Code across all projects. |
| `~/.cursor/skills/<name>/` | Optional personal skill for Cursor only, global to your machine. |
**Do not** put custom skills in `~/.cursor/skills-cursor/`—that is reserved for Cursor’s built-in skills.
Prefer **plugin `.claude/plugins/n8n/skills/`** for anything that should match how the rest of the team works.
## Before you write: gather requirements
Ask (or infer) briefly:
1. **Purpose** — one concrete task or workflow.
2. **Triggers** — when should the agent apply this skill?
3. **Gaps** — what does the agent *not* already know (project rules, URLs, formats)?
4. **Outputs** — templates, checklists, or strict formats?
5. **Examples** — follow an existing skill in `.claude/plugins/n8n/skills/` if one fits.
Ask the user in plain language when you need more detail.
## File layout
```
skill-name/
├── SKILL.md # required
├── reference.md # optional — detail the agent reads only if needed
├── examples.md # optional
└── scripts/ # optional
```
### Frontmatter (required)
```yaml
---
name: skill-name # lowercase, hyphens, max 64 chars
description: >- # max 1024 chars, non-empty — see below
...
---
```
**Description** (discovery is everything — third person, WHAT + WHEN, trigger words):
- Good: `Extracts tables from PDFs and fills forms. Use when the user works with PDFs, forms, or document extraction.`
- Bad: `Helps with documents` or `I can help you with PDFs`
## Authoring rules
1. **Concise** — assume the model is capable; only add non-obvious domain or project facts.
2. **Progressive disclosure** — essentials in `SKILL.md`; long reference in `reference.md`. Link **one level deep** from `SKILL.md`.
3. **Prefer one default** — e.g. one library or one workflow; add an escape hatch only if needed.
4. **Stable wording** — one term per concept; avoid dated “until month X” notes unless you tuck legacy bits behind a short “Deprecated” note.
5. **Paths** — forward slashes only (`scripts/foo.py`).
**Rough size:** aim for **well under ~200 lines** in `SKILL.md`; if it grows, split detail out.
### Scope: one job per skill (and parent skills)
- **Single responsibility** — one primary workflow or decision tree per skill. If triggers and steps diverge a lot (e.g. “create issue” vs “create PR” vs “full ticket → PR flow”), split into **smaller dedicated skills**.
- **Prefer small + compose** — two or three focused skills keep irrelevant detail out of context until needed. A **parent** (orchestrator) skill can say *when* to follow each child workflow and link to their `SKILL.md`; avoid pasting full child content into the parent.
- **When one large skill is OK** — a single end-to-end flow that always runs together and shares one tight checklist;
### MCPs, CLI tools, and other skills
- **Prefer CLI and repo commands** when they solve the same problem — agents handle them well and they usually add less scaffolding noise to context than MCP tool discovery and schemas. Examples: `gh` for PRs/issues, `pnpm` scripts from `AGENTS.md`.
- **MCPs are optional per user** — not everyone has the same servers enabled. If a skill **requires** a specific MCP to work as written, say so explicitly:
- Put a hint in the **frontmatter description** (e.g. “Requires Linear MCP for …”) so mismatches are obvious early.
- Add a short **Prerequisites** (or **Requirements**) block near the top: which integration, what it is used for, and a **fallback** (e.g. web UI, `gh`, or “ask the user to paste …”) when it is missing.
- **Referencing other skills** — use the namespaced invocation name (e.g. `n8n:create-issue`) so the agent resolves the plugin skill. For human-readable links, give the path from the repo root (e.g. `.claude/plugins/n8n/skills/create-issue/SKILL.md`). From a sibling folder, a relative link works too: `[create-issue](../create-issue/SKILL.md)`. Parent skills should delegate steps instead of duplicating long procedures.
## Patterns (pick what fits)
- **Template** — give the exact output shape (markdown/code blocks).
- **Checklist** — numbered or `- [ ]` steps for multi-step work.
- **Branching** — “If A → …; if B → …” at the top of a workflow.
- **Scripts** — document run commands; say whether to **execute** or **read** the script.
## Workflow: create → verify
1. **Name + description** — hyphenated name; description with triggers.
2. **Outline** — minimal sections; link optional files.
3. **Implement** — `SKILL.md` first; add `reference.md` / `scripts/` only if they save tokens or reduce errors.
4. **Check** — third-person description; terminology consistent; no duplicate encyclopedic content the model already knows.
## Anti-patterns
- Verbose tutorials (“what is a PDF”) inside the skill.
- Many equivalent options with no default.
- Vague names (`helper`, `utils`).
- Deep chains of linked files.
- Assuming an MCP or tool is present without stating it or offering a fallback.
- One oversized skill that mixes unrelated workflows instead of smaller skills + a thin parent.
## Quick example stub
```markdown
---
name: my-workflow
description: Does X using project convention Y. Use when the user asks for X or mentions Z.
---
# My workflow
1. …
2. …
## Output format
Use a fenced code block for the exact shape reviewers should see.
## More detail
See [reference.md](reference.md) if edge cases matter.
```
章节与文件索引
按说明文件中的顺序排列。
技能存在的地方
写作之前:收集需求
前言(必填)
创作规则
范围:每种技能(以及家长技能)一项工作
文件/命令 -> .claude/plugins/n8n/skills/<name>/ · n8n: · ~/.claude/skills/<name>/ · ~/.cursor/skills/<name>/ · ~/.cursor/skills-cursor/ · .claude/plugins/n8n/skills/ · Helps with documents · I can help you with PDFs
内容校验值 -> f086d90660b0
当前原文的自动摘译,尚未人工审校。
技能存在的地方
位置 · 何时使用
.claude/plugins/n8n/skills/<name>/· n8n 的默认值:团队共享、版本化、命名空间在n8n:下。~/.claude/skills/<name>/· Claude Code 在所有项目中的个人技能。~/.cursor/skills/<name>/· 仅适用于光标的可选个人技能,对您的机器来说是全局的。不要将自定义技能放在~/.cursor/skills-cursor/中——这是为 Cursor 的内置技能保留的。写作之前:收集需求
简要询问(或推断):目的——一项具体任务或工作流程。触发器——代理应该何时应用此技能?差距——代理不知道什么(项目规则、URL、格式)?输出——模板、清单或严格的格式?
前言(必填)
描述(发现就是一切 - 第三人称、什么 + 时间、触发词): 好:
Extracts tables from PDFs and fills forms. Use when the user works with PDFs, forms, or document extraction.坏:Helps with documents或I can help you with PDFs创作规则
简洁——假设模型有能力;仅添加非显而易见的领域或项目事实。渐进式披露——
SKILL.md的要点;reference.md中的长参考。从SKILL.md开始深一层链接。更喜欢一个默认值 - 例如一个库或一个工作流程;仅在需要时添加逃生舱口。稳定的措辞——每个概念一个术语;避免注明日期的“直到 X 月”注释,除非您将遗留位塞在简短的“已弃用”注释后面。范围:每种技能(以及家长技能)一项工作
单一职责——每项技能一个主要工作流程或决策树。如果触发器和步骤差异很大(例如“创建问题”与“创建 PR”与“完整票据 → PR 流程”),则分成较小的专用技能。更喜欢小+组合——两到三个重点技能将不相关的细节脱离上下文,直到需要时为止。家长(协调员)技能可以说何时遵循每个孩子的工作流程并链接到他们的
SKILL.md;避免将完整的子内容粘贴到父内容中。