write-a-skill

A guide for creating, reviewing, and maintaining agent skills, commands, rules, hooks, and project instruction files.

In plain words
What is it for?
It is for designing skill workflows, deciding between instruction carriers, defining inputs and outputs, controlling supporting material, and checking skill quality.
Why use it?
It helps choose the smallest suitable place for reusable instructions and exposes missing requirements before new guidance is written.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lianues/lim-code/write-a-skill
Any agent
npx skills add Lianues/Lim-Code --skill write-a-skill
Clone the repo
git clone --depth 1 https://github.com/Lianues/Lim-Code

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.01750
Opus 5 $0.00022 $0.00875
Sonnet 5 $0.00009 $0.00350
Haiku 4.5 $0.00004 $0.00175

Measured yesterday against content hash 97e2c3c8e854, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-a-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

resources/skills/write-a-skill/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

编写 Skill

来源层级

  • 【官方规范】: 目标平台要求,或被广泛记录的 Skill 行为。
  • 【本地质量门槛】: 这个 LimCode Skill 采用的更严格默认标准。
  • 【社区验证实践】: 来自真实用户反馈和开源实践验证的推荐模式。
  • 【本设计扩展】: 用于提高可靠性的扩展,不是官方强制要求。

操作原则

创建能解决用户真实重复失败的最小可靠指令载体。可靠不是越完整越好;如果安全清单、eval、维护记录或额外目录会分散 agent 对任务本身的注意力,就降级、合并或删除。

工作流

  1. 先选择载体【社区验证实践】。

    • AGENTS.md/rule:一两条长期成立的约定。
    • Command:用户手动触发的原子操作。
    • CLI/script/hook/CI:确定性、脆弱、重复或必须强制执行的操作。
    • Skill:需要可选引用材料的复杂可复用多步骤工作流。
    • 闸门:写文件前说明选择的载体,以及为什么更窄的载体不够。
    • 完整决策树见 references/carrier-decision-tree.md
  2. 写作前澄清结构边界【本设计扩展】。

    • 填写“已知/缺失/假设”矩阵:真实失败场景、目标用户、触发词、负例、输入、输出、工具、成功证据。
    • 检查结构属性:当前 prompt 外是否有必要上下文;输出是否会被当前回复之外的人、agent、工具或未来会话读取;是否会产生多份独立产物;是否触发 scripts、外部内容、secrets、网络/文件访问、破坏性或外部可见操作。
    • 如果关键事实缺失,只问缺失问题;如果上下文足够,先声明假设再继续。
  3. 设计渐进披露和注意力预算

    • 【官方规范】: 保持 SKILL.md 简洁,把详细或条件性材料放入支持文件,并在 SKILL.md 中引用。
    • 【本地质量门槛】: 除非用户明确接受更大的本地 Skill,否则 SKILL.md 控制在 100 行以内。
    • 【本设计扩展】: 每新增一个目录、章节、eval 或维护字段,都说明它会在实际执行中被谁读取、何时读取、解决什么失败。
    • 如果某部分只是“看起来完整”,但不会改善执行,删除它。
    • 若输出会被当前回复之外的消费者读取,或会产生多份独立产物,读取 references/distributed-context-boundary.md,设计外部化上下文、主题化信息库和无相对指代 prompt。
  4. 编写合规 frontmatter

    • 【官方规范】: name 必须匹配父目录,只使用小写字母、数字和连字符,长度不超过 64 字符,并避开禁用标记或平台保留词。
    • 【官方规范】: description 必须非空,低于目标平台限制,并说明 Skill 做什么以及何时使用。
    • 【本地写作规范】: 优先使用第三人称、关键词友好的描述;相似工作流容易混淆时,推荐写出负边界。
    • 结构细则见 references/skill-anatomy.md
  5. 正文写成任务流程,而不是治理流程【社区验证实践】。

    • 使用编号步骤、检查点、验证证据、陷阱提示和反合理化说明。
    • 优先写“agent 此刻该关注什么、忽略什么、产出什么”。
    • 避免把一个边界环境中的限制写成所有场景的默认限制。
    • 不要只写“永远不要做 X”;应写“不要做 X,改做 Y”。
  6. 只打包真正需要的资源

    • 【官方规范】: 只有在明显改善执行效果时,才创建 references/scripts/assets/
    • 【官方规范】: scripts 用于确定性工作,并必须输出可执行的错误信息。
    • 【本设计扩展】: evals/MAINTENANCE.md、安全清单是风险触发项,不是每个 Skill 的默认配置。
  7. 按风险选择评估和审查深度【社区验证实践】。

    • 简单本地 Skill:可只做正/负触发和人工试用。
    • 共享或高影响 Skill:加入 A/B、逻辑模拟、边界攻击、跨模型或跨 surface 测试。
    • 有 scripts、外部内容、secrets、破坏性操作或共享安装时,再读取 references/security-and-maintenance.md
    • 发布评估结论前读取 references/evaluation-and-verification.md
  8. 用结构属性审查,而不是用场景标签审查【本设计扩展】。

    • 当前 prompt 外有必要上下文:审查是否提供文件路径或内联摘要。
    • 当前回复之外有人、agent、工具或未来会话会消费输出:审查是否禁止相对指代,并提供可定位上下文。
    • 产生多份独立产物、报告或审查结论:审查是否按主题组织状态、决策、证据、阻断项和报告。
    • 触发 scripts、外部内容、secrets、网络/文件访问、破坏性或外部可见操作:读取 references/security-and-maintenance.md,安全清单不可降级。
    • 每个额外产物都必须说明读取者、读取时机和解决的失败;否则删除。

Read the full file on GitHub · 94 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 94 lines · 44 tokens per session scan A 97e2c3c8e854

Subscribe to this mod's changes

write-a-skill is a skill published in the GitHub repository Lianues/Lim-Code (149 stars, last pushed 3mo ago), licensed MIT. It adds 44 tokens to every session and 1,750 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mailbox-bridge

Use this skill when external coding agents (Claude Code, Aider, custom scripts) need to participate in the project's shared WrongStack mailbox, or when a user asks to "expose the mailbox", "let Claude Code read the mailbox", "external agent mailbox", "mailbox bridge", or "HTTP mailbox bridge". Starts a loopback HTTP…

WrongStack/WrongStack · 111 tokens

shadow-agent

Use this skill when you need a background monitoring agent that watches the fleet, detects anomalies, and can intervene on command. Triggers: user says "shadow", "monitoring agent", "fleet watcher", "hoop command", "spike detection".

WrongStack/WrongStack · 55 tokens

backseat-driver-internals

Backseat Driver extension internals — Ex framework contracts, app-db state architecture, MCP socket server lifecycle, enrichment system, Datascript output log, activation sequences, and namespace reference. Use when: modifying core extension code, debugging state issues, working with app-db or Ex framework…

BetterThanTomorrow/calva-backseat-driver · 82 tokens

e2e-testing

E2E test authoring for Backseat Driver. Use when: writing, modifying, or debugging e2e tests under e2e-test-ws/, adding new MCP test scenarios, investigating test failures, understanding test infrastructure, or working with files matching test.cljs in the e2e workspace.

BetterThanTomorrow/calva-backseat-driver · 66 tokens

author

Scaffold a conforming AI-layer artifact — a rule, skill, hook, agent, or output style — that already passes the format checks, then verify it. Use when adding any new .claude/ artifact, so it matches the existing shape instead of drifting.

Ashkaan/contextium · 56 tokens

close

The "wrap" verb of the loop — end the session by writing the journal entry, updating touched project READMEs, committing, and pushing. Auto-invoked as the tail of /spec and /implement (the producer verbs) on clean completion, so "wrap" is not a verb the user types; also runnable directly. Dispatches /implement-audit…

Ashkaan/contextium · 121 tokens