AgentSkillsCN

Writing Skills

写作技巧

SKILL.md
--- frontmatter
name: Writing Skills
when_to_use: After completing task with reusable pattern, or when partner requests documenting a process

Creating New Skills

When to Create a Skill

After completing work, ask yourself:

  1. Would this procedure help on similar future tasks?
  2. Did I make mistakes that a checklist would prevent?
  3. Is this complex enough that future-me might skip steps?
  4. Did I learn a pattern worth codifying?

If yes to any → Extract to skill.

Skill Structure Template

markdown
---
name: Clear Descriptive Name
when_to_use: Specific trigger conditions that indicate this skill applies
---

# Overview

Core principle in 1-2 sentences. What's the key insight?

# Implementation Checklist

- [ ] First step
- [ ] Second step
- [ ] Third step
- [ ] Verify results

# Quality Standards

Specific criteria for success:
- What must be true when done?
- What errors must be zero?
- What verification proves it works?

# Anti-Patterns

Common mistakes to avoid:
❌ Bad pattern - why it's wrong
✅ Good pattern - why it's right

# Supporting

Links to tools, scripts, or reference docs:
- Tool documentation: path/to/tool/docs
- Related skills: path/to/related/SKILL.md

Testing Process

Before adding a skill to the library:

  1. Write the skill following template above
  2. Self-test by following it yourself for a similar task
  3. Test on subagent (optional but recommended):
    • Dispatch subagent with realistic task
    • Give subagent access to the skill
    • Watch for places subagent might skip steps or misinterpret
  4. Strengthen language where compliance is weak
  5. Retest until bulletproof

Adding to Library

bash
# Create skill directory and file
mkdir -p ~/.config/agent/skills/skills/[category]/[skill-name]
vim ~/.config/agent/skills/skills/[category]/[skill-name]/SKILL.md

# Test by using it yourself

# Commit when satisfied
cd ~/.config/agent/skills
git add skills/[category]/[skill-name]/SKILL.md
git commit -m "Add [skill-name] skill for [purpose]"

# Push if you're working from a fork
git push origin main

Categories

Organize skills into logical categories:

  • meta/ - Skills about skills (like this one)
  • research/ - Information gathering and verification
  • data-analysis/ - Working with data, spreadsheets, visualization
  • communication/ - Writing, reporting, documentation
  • automation/ - Task automation, scripting, workflows
  • tools/ - Reference docs for specific tools (supporting only)

Skill vs Tool Documentation

Skill: Process-focused, tells you WHAT to do and WHEN

  • "When analyzing data, always verify with multiple sources"
  • "Use formulas instead of hardcoded values"
  • "Test edge cases before declaring complete"

Tool doc: Tool-focused, tells you HOW to use specific technology

  • "pandas.read_excel() loads Excel files"
  • "openpyxl preserves formulas"
  • "WebFetch retrieves web content"

Put tool docs in skills/tools/[tool-name]/ as supporting material. Put processes in skills/[category]/[skill-name]/.

Quality Checklist for New Skills

Before committing a new skill:

  • Has clear name and when_to_use in frontmatter
  • Includes Overview section with core principle
  • Has Implementation checklist with actionable steps
  • Defines Quality Standards or success criteria
  • Includes Anti-Patterns section if relevant
  • Has been self-tested on realistic scenario
  • Language is strong enough to enforce compliance
  • Placed in appropriate category

Self-Improvement Loop

This is the key to the system:

code
Agent encounters task
→ Uses existing skill (or creates new pattern)
→ Learns something reusable
→ Writes new skill
→ Future agents use it
→ System gets smarter

Your job is to recognize when patterns are reusable and codify them. The library grows organically as you work.