obra/superpowers

writing-skills

先观察Agent的真实失败,再写能改变行为的Skill

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

writing-skills 是什么?

writing-skills 将测试驱动的方法应用到Skill说明:先在没有Skill的情况下观察Agent怎样失败,再针对真实失败写最小指导,以同类任务验证效果并修订。它区分纪律规则、操作方法、思维模式和参考资料,避免只凭作者读起来顺畅就认定有效。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 创建或修改可跨任务复用的Skill,尤其需要确认Agent能发现、正确使用并遵守关键要求。

这些情况不适合

  • 把一次任务经过写成通用Skill,或把仅适用于单个项目的约定搬成全局技能;可机械强制的约束更适合脚本。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 writing-skills,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 writing-skills

请在 Codex 的当前工作环境中安装并检查 writing-skills 这个 Skill。

项目身份:obra/superpowers / writing-skills
来源:https://github.com/obra/superpowers/blob/22f0b463e7a5e579904dd6211a520321035526f7/skills/writing-skills/SKILL.md
已定位的源文件:skills/writing-skills/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 先理解测试驱动的红、绿、重构过程,准备代表性任务与可观察的失败条件,并确认当前Agent运行时的真实Skill目录和工具。

会得到什么

  • SKILL.md及必要支持文件、无Skill基线与有Skill结果、逐次修订理由,以及明确的运行时接入方式。

实际使用顺序

  1. 先在没有新指导的基线条件下运行场景,记录实际行为、错误结果及失败理由;没有发生目标失败就不先写大量假设性规则。
  2. 按失败类型选择写法:纪律违反用明确规则,产物形状错误用正向结构,缺字段用固定槽位,条件行为写可观察条件。
  3. 只写解决已观察问题所需的最小Skill;description说明何时使用,重参考资料与可复用脚本分文件,脚本按真实解释器调用。
  4. 在相同及变体任务中测试有Skill后的行为,阅读实际产物,修补真实漏洞并再测。纪律型Skill还需压力场景,不能只用文字自审替代。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

用 writing-skills 改进一个“生成发布说明”的Skill。先在不加载新规则的条件下,让测试Agent根据给定提交生成发布说明,观察是否混淆用户影响和内部实现;记录实际产物。只有出现目标问题才写最小指导,再用同一输入和变体验证。保留现有文件,不因源文的重做措辞删除用户工作。
预期结果

预期得到针对已观察失败的指导与前后测试证据,不能把一份写好的说明当成效果已验证。本站未执行本例。

使用前先看这些限制

使用条件与边界

  • 来源中的“先写后删重来”是作者的测试纪律说明,不构成本站或Agent删除现有用户文件的授权。
  • 自动匹配会把模板引用和反例也算命中;来源要求人工阅读标记项,词频统计不能单独证明Agent已遵循。
针对这个 Skill 的疑问

常见问题

文档读起来没有歧义,还要测试吗?

要。来源关注真实Agent在竞争目标和压力下的行为,作者自读无法证明检索、理解和执行都正确。

为什么description不写整套操作步骤?

来源认为Agent可能只遵循简短描述而不读正文,所以description用于发现适用场景,完整流程放正文并通过真实任务验证。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T19:31:50.806Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/writing-skills/SKILL.md · 抓取时间 2026-11-17T19:31:50.806Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Use when creating new skills, editing existing skills, or verifying skills work before deployment

查看源文件章节 / Source sections
  • 原文:Writing Skills
  • 原文:Overview
  • 原文:What is a Skill?
  • 原文:TDD Mapping for Skills
  • 原文:When to Create a Skill
  • 原文:Skill Types
  • 原文:Technique
  • 原文:Pattern
  • 参考 / Reference
  • 原文:Directory Structure
  • 原文:Writing SKILL.md
  • 原文:Flowcharts
  • 原文:Code Examples
  • 原文:File Organization
  • 原文:Self-Contained Skill
  • 原文:Skill with Reusable Tool
  • 原文:Skill with Heavy Reference
  • 原文:The Iron Law (Same as TDD)
  • 原文:Testing All Skill Types
  • 原文:Discipline-Enforcing Skills (rules/requirements)
  • 原文:Technique Skills (how-to guides)
  • 原文:Pattern Skills (mental models)
  • 原文:Reference Skills (documentation/APIs)
  • 原文:Common Rationalizations for Skipping Testing
  • 原文:Match the Form to the Failure
  • 原文:Bulletproofing Against Rationalization
  • 原文:RED-GREEN-REFACTOR for Skills
  • 原文:RED: Write Failing Test (Baseline)
  • 原文:GREEN: Write Minimal Skill
  • 原文:REFACTOR: Close Loopholes
原文:Overview

**Writing skills IS Test-Driven Development applied to process documentation.** **Personal skills live in your runtime's skills directory** (`~/.claude/skills/` on Claude Code) — see [codex-tools.md](../using-superpowers/references/codex-tools.md) or [gemini-tools.md](../using-superpowers/references/gemini-tools.md) for the path on those runtimes. Codex, Copilot CLI, and Gemini CLI all also recognize `~/.agents/skills/` as a cross-runtime alias. You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes). **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing. **REQUIRED BACKGROUND:** You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation. **Official guidance:** For Anthropic's official skill authoring best practices, see references/anthropic-best-practices.md. This document provides additional patterns and guidelines that complement the TDD-focused approach in this skill.

原文:What is a Skill?

A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future agents find and apply effective approaches. **Skills are:** Reusable techniques, patterns, tools, reference guides **Skills are NOT:** Narratives about how you solved a problem once

原文:TDD Mapping for Skills

| TDD Concept | Skill Creation | |-------------|----------------| | **Test case** | Pressure scenario with subagent | | **Production code** | Skill document (SKILL.md) | | **Test fails (RED)** | Agent violates rule without skill (baseline) | | **Test passes (GREEN)** | Agent complies with skill present | | **Refactor** | Close loopholes while maintaining compliance | | **Write test first** | Run baseline scenario BEFORE writing skill | | **Watch it fail** | Document exact rationalizations agent uses | | **Minimal code** | Write skill addressing those specific violations | | **Watch it pass** | Verify agent now complies | | **Refactor cycle** | Find new rationalizations → plug → re-verify | The entire skill creation process follows RED-GREEN-REFACTOR.

原文:When to Create a Skill

**Create when:** - Technique wasn't intuitively obvious to you - You'd reference this again across projects - Pattern applies broadly (not project-specific) - Others would benefit **Don't create for:** - One-off solutions - Standard practices well-documented elsewhere - Project-specific conventions (put in your instructions file) - Mechanical constraints (if it's enforceable with regex/validation, automate it—save documentation for judgment calls)

原文:Technique

Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)

原文:Pattern

Way of thinking about problems (flatten-with-flags, test-invariants)

文件 SHA256:8cb3ac68c6d8c4bb46886b998b09af7989643cab8bd0e46ee86dd62e64546bbe

仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。

Skills.sh收录简介 · 2026-07-28

Use when creating new skills, editing existing skills, or verifying skills work before deployment

查看历史简介来源

历史收录数据

Skill标识writing-skills
来源仓库obra/superpowers
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次178
快照累计安装量149894

历史资料说明

  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源