Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计未展示

ring%3awriting-skills环%3a 写作技巧

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

864

周安装

36

GitHub Stars

180

下载量

288
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ring%3awriting-skills(环%3a 写作技巧)
来源仓库:https://github.com/lerianstudio/ring
仓库路径:skills/ring%3Awriting-skills
安装命令:
npx skills add https://github.com/lerianstudio/ring --skill ring:writing-skills
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lerianstudio/ring --skill ring:writing-skills

简介

用于辅助文档、README 和内容稿件的整理与改写。

  • 适合提炼结构、补齐章节或统一术语。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 应保留项目已有事实和路径,不写未确认的信息。
  • 涉及对外文案时需控制语气,避免过度营销。
  • ring%3awriting-skills 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Writing Skills

Overview

Writing skills IS Test-Driven Development applied to process documentation.

Personal skills live in agent-specific directories (e.g., ~/.claude/skills for Claude Code, ~/.codex/skills for Codex, or custom agent directories)

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 ring: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 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 agent instances 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 ConceptSkill Creation
Test casePressure scenario with subagent
Production codeSkill document (SKILL.md)
Test fails (RED)Agent violates rule without skill (baseline)
Test passes (GREEN)Agent complies with skill present
RefactorClose loopholes while maintaining compliance
Write test firstRun baseline scenario BEFORE writing skill
Watch it failDocument exact rationalizations agent uses
Minimal codeWrite skill addressing those specific violations
Watch it passVerify agent now complies
Refactor cycleFind 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 CLAUDE.md)

Skill Types

Technique

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

Pattern

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

Reference

API docs, syntax guides, tool documentation (office docs)

Directory Structure

skills/skill-name/SKILL.md (required) + optional supporting files. Flat namespace.

Separate files for: Heavy reference (100+ lines), reusable tools. Keep inline: Principles, code patterns (<50 lines).

SKILL.md Structure

Frontmatter (YAML):

  • Only two fields supported: name and description
  • Max 1024 characters total
  • name: Use letters, numbers, and hyphens only (no parentheses, special chars)
  • description: Third-person, includes BOTH what it does AND when to use it

- Start with "Use when..." to focus on triggering conditions - Include specific symptoms, situations, and contexts - Keep under 500 characters if possible

---
name: ring:Skill-Name-With-Hyphens
description: Use when [triggers/symptoms] - [what it does, third person]
---
# Skill Name
## Overview (1-2 sentences), ## When to Use (symptoms, NOT to use)
## Core Pattern (before/after code), ## Quick Reference (table for scanning)
## Implementation (inline or link), ## Common Mistakes, ## Real-World Impact (optional)

Agent Search Optimization (ASO)

Critical for discovery: Future agents need to FIND your skill

1. Rich Description Field

Purpose: Agents read description to decide which skills to load for a given task. Make it answer: "Should I read this skill right now?"

Format: Start with "Use when..." to focus on triggering conditions, then explain what it does

Content:

  • Use concrete triggers, symptoms, and situations that signal this skill applies
  • Describe the *problem* (race conditions, inconsistent behavior) not *language-specific symptoms* (setTimeout, sleep)
  • Keep triggers technology-agnostic unless the skill itself is technology-specific
  • If skill is technology-specific, make that explicit in the trigger
  • Write in third person (injected into system prompt)
QualityExample
BADFor async testing (vague), I can help... (first person), setTimeout/sleep (tech-specific but skill isn't)
GOODUse when tests have race conditions... - replaces timeouts with condition polling (problem + solution)

2. Keyword Coverage

Use words agents would search for:

  • Error messages: "Hook timed out", "ENOTEMPTY", "race condition"
  • Symptoms: "flaky", "hanging", "zombie", "pollution"
  • Synonyms: "timeout/hang/freeze", "cleanup/teardown/afterEach"
  • Tools: Actual commands, library names, file types

3. Descriptive Naming

Use active voice, verb-first:

  • creating-skills not skill-creation
  • testing-skills-with-subagents not subagent-skill-testing

4. Token Efficiency (Critical)

Problem: getting-started and frequently-referenced skills load into EVERY conversation. Every token counts.

Target word counts by skill type:

  • Bootstrap/Getting-started: <150 words each (loads in every session)
  • Simple technique skills: <500 words (procedures, patterns, single concept)
  • Discipline-enforcing skills: <2,000 words (TDD, verification, systematic debugging - need rationalization tables)
  • Process/workflow skills: <4,000 words (multi-phase workflows with comprehensive templates)

Rationale: Complex skills need extensive rationalization prevention and complete templates. Don't artificially compress at the cost of effectiveness.

Techniques: Reference --help instead of documenting flags. Cross-reference other skills instead of repeating. Compress examples (42 words → 20 words). Don't repeat cross-referenced content.

Verify: wc -w skills/path/SKILL.md (check against word counts above)

Name by what you DO or core insight:

  • ring:condition-based-waiting > async-test-helpers
  • using-skills not skill-usage
  • flatten-with-flags > data-structure-refactoring
  • ring:root-cause-tracing > debugging-techniques

Gerunds (-ing) work well for processes:

  • creating-skills, testing-skills, debugging-with-logs
  • Active, describes the action you're taking

4. Cross-Referencing Other Skills

When writing documentation that references other skills:

Use skill name only, with explicit requirement markers:

  • ✅ Good: **REQUIRED SUB-SKILL:** Use ring:test-driven-development
  • ✅ Good: **REQUIRED BACKGROUND:** You MUST understand systematic-debugging
  • ❌ Bad: See skills/testing/test-driven-development (unclear if required)
  • ❌ Bad: @skills/testing/test-driven-development/SKILL.md (force-loads, burns context)

Why no @ links: @ syntax force-loads files immediately, consuming 200k+ context before you need them.

Flowchart Usage

Only for: Non-obvious decisions, process loops, "A vs B" choices. Never for: Reference (→tables), code (→blocks), linear steps (→lists). See graphviz-conventions.dot for conventions.

Code Examples

One excellent example in most relevant language. Complete, well-commented WHY, real scenario, ready to adapt. Don't: multi-language, fill-in-blank templates, contrived examples.

File Organization

TypeStructureWhen
Self-Containedskill/SKILL.md onlyAll content fits inline
With ToolSKILL.md + example.tsReusable code, not narrative
Heavy ReferenceSKILL.md + *.md refs + scripts/Reference >100 lines

The Iron Law (Same as TDD)

NO SKILL WITHOUT A FAILING TEST FIRST

This applies to NEW skills AND EDITS to existing skills.

Write skill before testing? Delete it. Start over. Edit skill without testing? Same violation.

No exceptions:

  • Not for "simple additions"
  • Not for "just adding a section"
  • Not for "documentation updates"
  • Don't keep untested changes as "reference"
  • Don't "adapt" while running tests
  • Delete means delete

REQUIRED BACKGROUND: The ring:test-driven-development skill explains why this matters. Same principles apply to documentation.

Testing All Skill Types

Skill TypeExamplesTest WithSuccess Criteria
Discipline (rules)TDD, verificationPressure scenarios (time + sunk cost + exhaustion), academic questionsAgent follows rule under maximum pressure
Technique (how-to)condition-based-waiting, root-cause-tracingApplication + variation + gap testingAgent applies technique to new scenario
Pattern (mental model)reducing-complexityRecognition + application + counter-examplesAgent identifies when/how to apply
Reference (docs/APIs)API docs, command refsRetrieval + application + gap testingAgent finds and applies info correctly

Common Rationalizations for Skipping Testing

ExcuseReality
"Skill is obviously clear"Clear to you ≠ clear to other agents. Test it.
"It's just a reference"References can have gaps, unclear sections. Test retrieval.
"Testing is overkill"Untested skills have issues. Always. 15 min testing saves hours.
"I'll test if problems emerge"Problems = agents can't use skill. Test BEFORE deploying.
"Too tedious to test"Testing is less tedious than debugging bad skill in production.
"I'm confident it's good"Overconfidence guarantees issues. Test anyway.
"Academic review is enough"Reading ≠ using. Test application scenarios.
"No time to test"Deploying untested skill wastes more time fixing it later.

All of these mean: Test before deploying. No exceptions.

Bulletproofing Skills Against Rationalization

Skills that enforce discipline (like TDD) need to resist rationalization. Agents are smart and will find loopholes when under pressure.

Psychology note: Understanding WHY persuasion techniques work helps you apply them systematically. See persuasion-principles.md for research foundation (Cialdini, 2021; Meincke et al., 2025) on authority, commitment, scarcity, social proof, and unity principles.

Close Every Loophole Explicitly

Don't just state rule - forbid specific workarounds:

  • BAD: Write code before test? Delete it.
  • GOOD: Add Delete it. Start over. + explicit No exceptions: list (don't keep as reference, don't adapt, don't look, delete means delete)

Address "Spirit vs Letter" Arguments

Add foundational principle early:

**Violating the letter of the rules is violating the spirit of the rules.**

This cuts off entire class of "I'm following the spirit" rationalizations.

Build Rationalization Table

Capture rationalizations from baseline testing (see Testing section below). Every excuse agents make goes in the table:

| Excuse | Reality |
|--------|---------|
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
| "I'll test after" | Tests passing immediately prove nothing. |
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |

Create Red Flags List

Make it easy for agents to self-check when rationalizing:

## Red Flags - STOP and Start Over

- Code before test
- "I already manually tested it"
- "Tests after achieve the same purpose"
- "It's about spirit not ritual"
- "This is different because..."

**All of these mean: Delete code. Start over with TDD.**

Update CSO for Violation Symptoms

Add to description: symptoms of when you're ABOUT to violate the rule:

description: use when implementing any feature or bugfix, before writing implementation code

RED-GREEN-REFACTOR for Skills

PhaseAction
REDRun pressure scenario WITHOUT skill → document choices/rationalizations verbatim
GREENWrite skill addressing specific failures → verify agent complies
REFACTORFind new rationalizations → add counters → re-test until bulletproof

REQUIRED SUB-SKILL: Use testing-skills-with-subagents for pressure scenarios, pressure types, hole-plugging, meta-testing.

Anti-Patterns

PatternExampleWhy Bad
Narrative"In session 2025-10-03, we found..."Too specific, not reusable
Multi-languageexample-js.js, example-py.pyMediocre quality, maintenance burden
Code in flowchartsstep1 [label="import fs"]Can't copy-paste, hard to read
Generic labelshelper1, step3, pattern4Labels need semantic meaning

STOP: Before Moving to Next Skill

After writing ANY skill, you MUST STOP and complete the deployment process.

Do NOT:

  • Create multiple skills in batch without testing each
  • Move to next skill before current one is verified
  • Skip testing because "batching is more efficient"

The deployment checklist below is MANDATORY for EACH skill.

Deploying untested skills = deploying untested code. It's a violation of quality standards.

Skill Creation Checklist (TDD Adapted)

Use TodoWrite for each phase.

PhaseRequirements
RED3+ pressure scenarios, run WITHOUT skill, document rationalizations verbatim
GREENName (letters/numbers/hyphens), YAML frontmatter (<1024 chars), description starts "Use when...", third person, keywords, address baseline failures, one excellent example, verify compliance
REFACTORNew rationalizations → add counters, build rationalization table, create red flags, re-test
QualityFlowchart only if non-obvious, quick ref table, common mistakes, no narrative
DeployCommit and push, consider contributing PR

Discovery Workflow

How future agents find your skill:

  1. Encounters problem ("tests are flaky")
  2. Finds SKILL (description matches)
  3. Scans overview (is this relevant?)
  4. Reads patterns (quick reference table)
  5. Loads example (only when implementing)

Optimize for this flow - put searchable terms early and often.

The Bottom Line

Creating skills IS TDD for process documentation.

Same Iron Law: No skill without failing test first. Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes). Same benefits: Better quality, fewer surprises, bulletproof results.

If you follow TDD for code, follow it for skills. It's the same discipline applied to documentation.

Blocker Criteria

STOP and report if:

Decision TypeBlocker ConditionRequired Action
Missing baseline testNo failing test exists before writing skill contentSTOP and run baseline scenario first
Untested skill deploymentSkill created without pressure scenario testingSTOP and delete skill - start over with TDD
Missing rationalization coverageSkill enforces rules but lacks anti-rationalization tableSTOP and add rationalization prevention
No red-green verificationWrote skill without watching agent fail then passSTOP and revert - follow RED-GREEN-REFACTOR

Cannot Be Overridden

The following requirements CANNOT be waived:

  • MUST run baseline test (RED phase) before writing any skill content
  • MUST verify agent compliance (GREEN phase) after writing skill
  • MUST include rationalization table for any discipline-enforcing skill
  • MUST delete and restart if skill written before failing test
  • CANNOT deploy skill without testing against pressure scenarios

Severity Calibration

SeverityConditionRequired Action
CRITICALSkill deployed without any testingMUST delete skill and start over with TDD
CRITICALDiscipline skill lacks anti-rationalization tableMUST add table before deployment
HIGHSkill written before baseline testMUST revert and run baseline first
HIGHNo pressure scenario testedMUST test with subagent before deployment
MEDIUMSkill missing ASO optimizationShould add searchable terms and improve description
LOWMinor structure improvements neededFix in next iteration

Pressure Resistance

User SaysYour Response
"Just write the skill quickly, we can test it later""CANNOT write skill before baseline test - TDD applies to documentation too"
"This skill is simple, no need for testing""Simple skills still need verification - 15 minutes testing saves hours of debugging"
"Skip the rationalization table, it's obvious""Obvious to me ≠ obvious to agents - MUST include rationalization prevention"
"We're in a hurry, deploy now and iterate""CANNOT deploy untested skill - will run pressure scenarios first"
"The skill is just documentation, not code""Documentation IS code for agent behavior - same TDD discipline applies"

Anti-Rationalization Table

RationalizationWhy It's WRONGRequired Action
"I know what the agent needs, no baseline test required"Assumptions about agent behavior are unreliable without evidence.MUST run baseline scenario and document actual agent behavior.
"The skill is straightforward, testing is overhead"Simple-looking skills often have subtle failure modes under pressure.MUST test with pressure scenarios before deployment.
"I'll add the rationalization table after shipping"After = never. Agents will find loopholes immediately.MUST include anti-rationalization table before deployment.
"One test pass is enough verification"Single pass misses edge cases and pressure-induced failures.MUST run multiple scenarios including adversarial pressure.
"Existing skills don't follow TDD, why should mine?"Legacy skills are not the standard. New skills MUST follow TDD.MUST follow RED-GREEN-REFACTOR regardless of existing skills.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.54%
按下载量换算105

Claude

27.04%
按下载量换算78

Cursor

18%
按下载量换算52

Gemini CLI

9.67%
按下载量换算28

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills