ワンクリックで
writing-skills
Use when creating a new skill, editing an existing skill, or verifying a skill works before deployment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when creating a new skill, editing an existing skill, or verifying a skill works before deployment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when a feature, bugfix, or refactoring step is completed and needs review, or before merging to main, or when user says "review", "审查", "帮我看看代码"
Use when receiving an ambiguous feature request, when scope is unclear, or before writing any plan
Use after verification-before-completion passes and code review is clean, to close out the development branch
Use when executing git commit, creating or naming branches, writing PR titles/descriptions, or asking about commit message format, branch naming, or version numbering in this project
Use when writing or reviewing .ets/.ts files in this project, or when seeing any, unknown, obj['key'] index access, destructuring assignment, var declarations,
Use when user asks to create a version release ticket, says "帮我建个发版任务", "建个 Jira", "创建发版单", or needs to track an SDK release in Jira
| name | writing-skills |
| description | Use when creating a new skill, editing an existing skill, or verifying a skill works before deployment |
Writing skills IS Test-Driven Development applied to process documentation.
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.
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:
docs/sdk-engineering-guide.md)| Type | Description | Example |
|---|---|---|
| Technique | 具体方法,有步骤可循 | test-driven-development, systematic-debugging |
| Pattern | 思维模型,指导如何思考 | brainstorming |
| Reference | 查询式,结构化条目 | git-conventions, ohpm-publish |
| Label | Meaning | Requirement |
|---|---|---|
| Rigid | 必须严格遵守,不得适配 | 必须带 Rationalizations 表 + Red Flags |
| Flexible | 原则可按场景取舍 | 不需 Rationalizations |
两个维度正交。一个 skill 同时有本质类型和执行标签,如:test-driven-development = Technique + Rigid;git-conventions = Reference + Flexible。
每个 skill 必须在正文开头声明两个维度。
.agents/skills/
<skill-name>/
SKILL.md # Main file (required)
<supporting-file>.md # Only when content >100 lines or is a reusable prompt template
Naming: lowercase with hyphens, verb/gerund preferred: brainstorming, writing-plans, subagent-driven-development.
---
name: skill-name-with-hyphens
description: Use when <triggering condition>
---
name: letters, numbers, hyphens onlydescription: see "Claude Search Optimization" below for detailed rulesCSO determines whether future agents find and correctly use your skill. Description is the single most important line.
Use when / Use before / Use after (temporal triggers allowed)Testing revealed: when a description summarizes workflow, Claude follows the description instead of reading the full skill. A description saying "code review between tasks" caused Claude to do ONE review, even though the skill body clearly showed TWO reviews (spec compliance then code quality).
When the description was changed to just triggering conditions (no workflow summary), Claude correctly read the body and followed the two-stage process.
The trap: Descriptions that summarize workflow create a shortcut Claude will take. The skill body becomes documentation Claude skips.
# ❌ BAD: Summarizes workflow — Claude may follow this instead of reading skill
description: Use when executing plans - dispatches subagent per task with code review between tasks
# ❌ BAD: Too much process detail
description: Use for TDD - write test first, watch it fail, write minimal code, refactor
# ❌ BAD: Too abstract
description: 用于异步测试
# ❌ BAD: First person
description: I help you write skills
# ✅ GOOD: Just triggering conditions
description: Use when executing an implementation plan with independent tasks in the current session
# ✅ GOOD: Temporal trigger + symptoms
description: Use before claiming work is complete, fixed, or ready to review
# ✅ GOOD: Includes specific keywords for discovery
description: Use when facing ArkTS compile errors, hvigor build failures, or any technical problem where root cause is unclear
Use words agents would search for:
# <Skill Name>
> **Type:** Technique | **Discipline:** Rigid
## Overview
1–2 sentences: what is this, core principle.
## When to Use / Not to Use
Triggering signals + exclusions.
## Process / Checklist
Numbered steps. Rigid skills must note "convert to TodoWrite".
## Quick Reference (optional)
Table or bullets for scanning.
## Rationalizations (Rigid skills required)
| Excuse | Reality |
|---|---|
## Red Flags (Rigid skills required)
If you think X / Y / Z, STOP.
## Related Skills
Explicit names + dependency strength (REQUIRED / OPTIONAL).
Target word counts:
Techniques:
Run pressure scenario with subagent WITHOUT the skill. Document:
Address those specific rationalizations. Don't add content for hypothetical cases. Run same scenarios WITH skill — agent should now comply.
Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
After writing or editing ANY skill, STOP and complete deployment before moving on.
Do NOT:
Use skill name with explicit dependency marker:
**REQUIRED:** test-driven-development**OPTIONAL:** growingio-arkts-coding-style@path/SKILL.md (force-loads, burns context)docs/sdk-engineering-guide.mdRED Phase:
GREEN Phase:
name + descriptionUse when/before/after, triggering only, no workflow@ force-loadREFACTOR Phase:
Deployment:
| Excuse | Reality |
|---|---|
| "Skill is obviously clear, no need to test" | Clear to you ≠ clear to agents. Test it. |
| "It's just a reference, testing is overkill" | References have gaps. Test retrieval + application. |
| "Description needs a bit of workflow context for clarity" | Testing proved: workflow in description → agent skips body |
| "This skill is too short to be worth a file" | Short skill = clear trigger; long skill is the problem |
| "I'll test if problems emerge" | Problems = agents misusing skill in production. Test BEFORE. |
| "I remember how this skill works, let me just edit" | Skills evolve; read current version before any edit |
| "Multiple language examples are more comprehensive" | Multiple = each mediocre; one great example > five templates |
| "Just adding a section, no test needed" | Same Iron Law. Edit without test = violation. |