技能作家

文档 社区

技能解读

当前原文的自动摘译,尚未人工审校。

心智模型

技能是一张地图和一份地雷列表,而不是一本百科全书。它向代理指出正确的代码和文档,并对阅读中不明显的事情发出警告。如果事实已经在源代码或docs/中,则该技能应该链接,而不是重述。想想路标,而不是解释:一个短指针加上一个方向(“接线位于 X;注意 Y”),而不是冗长的演练或代码转储。简洁是一种特性,而不是一种妥协——每一行都会在每次加载时重新读入上下文,因此解释较少但要点准确的技能比彻底的技能更好地完成其工作。

权威来源(请勿重复)

在编写任何内容之前,请确定基本事实已经存在的位置:源代码 - 类大纲、属性列表、方法签名、调用站点。 docs/ GitBook 树 — 面向用户的行为、布局规则、控制 API、教程。如果某个主题有文档页面,请链接到该页面。其他技能——交叉引用而不是复制。 (例如,gum-layout和gum-layout-engine,故意区分浅层和深层。)

工艺流程

阅读相关源文件。检查docs/SUMMARY.md 是否有关于该主题的现有面向用户的页面。浏览.claude/skills/中的一些现有技能以匹配风格和深度。只写不明显的蒸馏。

技能档案规则

长度:目标在 100 行以下。硬上限 500。每个负载的代理上下文膨胀成本。命名: kebab-case 名词短语(例如,gum-tool-undo)。前言:name和description。该描述被加载到每个会话的技能列表中——它永远在上下文令牌中收回成本。保持简短。请参阅下面的“编写描述”。结构:##部分。文件映射表。关于人际关系和陷阱的散文。

编写描述

描述的唯一作用是告诉未来的克劳德何时该技能相关。这是一个触发因素,而不是一个总结。硬性规定:一句话。大约 250 个字符以下。最好低于 200。技能体涵盖了其余部分。删除样板。没有“……的参考指南”,没有“在处理……时加载此内容”,没有“涵盖口香糖的……”。事实上,这是一项隐含的技能——这些短语对每个条目来说都是沉重的负担。引导主题,然后触发标识符。格式:<Topic> — <one-line hook>. Triggers: <distinctive identifiers, file paths, or scenarios>.

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
文档
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@vchelaru · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Skills Writer

## Mental Model

A skill is **a map and a list of landmines** — not an encyclopedia. It points an agent at the right code and docs, and warns about things that are not obvious from reading either. If a fact is already in source or in `docs/`, the skill should *link*, not restate.

Think **signpost, not explanation**: a short pointer plus a direction ("the wiring lives in X; watch out for Y"), never a lengthy walkthrough or a code dump. Brevity is a feature, not a compromise — every line is re-read into context on every load, so a skill that explains *less* but points *accurately* is doing its job better than a thorough one.

## Authoritative Sources (do not duplicate)

Before writing anything, identify where the ground truth already lives:

- **Source code** — class outlines, property lists, method signatures, call sites.
- **`docs/` GitBook tree** — user-facing behavior, layout rules, control APIs, tutorials. If a topic has a docs page, link to it.
- **Other skills** — cross-reference instead of copying. (`gum-layout` and `gum-layout-engine`, for example, deliberately split shallow vs. deep.)

A skill earns its place by covering what these sources *don't*: internal architecture, why pieces fit together, and gotchas.

## Process

1. Read the relevant source files.
2. Check `docs/SUMMARY.md` for existing user-facing pages on the topic.
3. Skim a few existing skills in `.claude/skills/` to match style and depth.
4. Write only the non-obvious distillation.

## Skill File Rules

- **Length**: aim under 100 lines. Hard ceiling 500. Bloat costs agent context on every load.
- **Naming**: kebab-case noun phrases (e.g., `gum-tool-undo`).
- **Frontmatter**: `name` and `description`. **The description is loaded into every session's skill listing** — it pays for itself in context tokens forever. Keep it brutally short. See "Writing the description" below.
- **Structure**: `##` sections. Tables for file maps. Prose for relationships and gotchas.
- **Progressive disclosure**: keep SKILL.md to high-level architecture; spill advanced content into sibling files (e.g., `[xnafiddle.md](xnafiddle.md)`) only when it's bulky enough to justify a second file.

## Writing the description

The description's **only job** is to tell future-Claude *when this skill is relevant*. It is a trigger, not a summary.

**Hard rules:**
- **One sentence. Under ~250 chars.** Ideally under 200. The skill body covers the rest.
- **Drop boilerplate.** No "Reference guide for…", no "Load this when working on…", no "Covers Gum's…". The fact that this is a skill is implicit — these phrases are dead weight on every entry.
- **Lead with the topic, then trigger identifiers.** Format: `<Topic> — <one-line hook>. Triggers: <distinctive identifiers, file paths, or scenarios>.`
- **Pick the 3–8 most distinctive triggers, not all of them.** Generic words ("file", "system", "behavior") don't help; specific class names, file paths, and method names do. The rest belong inside the file.
- **No multi-line YAML (`description: >`).** Keep it on one line. It folds anyway, and one line is easier to scan when auditing.

**Example.** Same triggers, ~40% fewer tokens:

Good:
```
description: Gum's undo/redo. Triggers: History tab, UndoManager, UndoPlugin, UndoSnapshot, stale references after undo.
```

Bad (boilerplate, padded):
```
description: Reference guide for Gum's undo/redo system. Load this when working on undo/redo behavior, the History tab, UndoManager, UndoPlugin, UndoSnapshot, or stale reference issues after undo.
```

Multiply by every skill, every session. It adds up.

## Include

- Architecture: how major pieces fit together and why.
- Gotchas: surprising behavior, ordering dependencies, naming mismatches, "looks like X but actually Y."
- Key file map: one-line table of file → purpose.
- Pointers: links to relevant `docs/` pages, key source files, and related skills.
- Specific identifiers only when the name itself is misleading or the behavior is surprising.

## Exclude

- Anything already in `docs/` — link instead of restating.
- Full class outlines or property lists — read source directly.
- Code examples unless the snippet captures an irreplaceable pattern.
- Time-sensitive info (versions, dates, migration notes).
- Anything Claude already knows from general C# or .NET knowledge.

## Output

Write to `.claude/skills/<skill-name>/SKILL.md`. Create the directory if needed. Add sibling detail files only when content is too large for the main file.

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。