write-skill
Use when creating or revising an agent skill.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- write-skill
- description
- Use when creating or revising an agent skill.
02 资源文件 6
- 参考文档references/activation-boundaries.md2.9 KB
- 参考文档references/agent-first-instructions.md3.3 KB
- 参考文档references/development-loop.md2.2 KB
- 参考文档references/progressive-disclosure.md1.9 KB
- 脚本scripts/lib/skill-author-core.mjs6.2 KB
- 脚本scripts/skill-author.mjs2.0 KB
03 SKILL.md 正文
Write Skill
Write the smallest agent-first skill that changes the target behavior.
Establish The First Read
Before writing, identify:
- the behavior and failure the skill must change;
- the earliest natural prompt or situation where its guidance becomes useful;
- the cues an agent can observe before reading the body;
- the context guaranteed to be loaded before this skill;
- a nearby case that should not be hijacked.
A description cannot rely on terminology or classifications taught only inside the skill. The body must work for an agent reading it for the first time with only declared guaranteed context.
Write The Description
Optimize for the first useful activation, not repeated reads.
- State the broad core job in plain language.
- Use cues observable in the user request or immediate task state.
- Prefer broad recall when loading the skill is safe and the body can exit cleanly.
- Do not require the agent to predict an internal classification taught only after activation.
- Do not turn the description into an exhaustive trigger taxonomy or compressed summary of the body.
A nearby case may pass by not loading the skill or by loading it and exiting without changing the task incorrectly. Read activation boundaries when writing or diagnosing a description.
Write For The Executing Agent
- Establish the skill’s job immediately.
- Define necessary terms before relying on them.
- Put rules where the agent first makes the affected choice.
- Keep the normal path executable from
SKILL.mdalone. - Say what to do, what not to do, and when to stop, exit, or route.
- Lead with required behavior. Use a negative instruction only to block a plausible or observed failure, and pair it with the positive action, exit, or route. Do not introduce rejected mechanisms or hypothetical behavior merely to forbid them.
- Use direct instructions that change action or judgment.
- Include why only when it helps the agent generalize, choose correctly in an unseen case, or avoid a harmful literal reading.
- Repeat a shared rule only when a local reminder prevents a real failure; do not copy the owning workflow.
- Keep authoring status, evaluation caveats, evidence gaps, changelog notes, and readiness metadata out of the subject
SKILL.md; they do not guide the executing agent.
Use discussion, research, and author reasoning to understand the target behavior. Do not copy conversation history, author debate, iteration notes, rejected drafts, or explanation written for collaborators into the skill. Translate that context into only the instructions, definitions, boundaries, and examples a first-time executing agent needs.
A skill may rely on guaranteed base context. Do not assume an optional sibling skill, reference, or accidental earlier read. Link conditional dependencies and state when to read them.
Read agent-first instructions when wording, placement, undeclared context, or author explanation is obscuring execution.
Use Examples Deliberately
Add a compact behavioral example when prose alone leaves a likely misclassification. Show the observable situation and the required action, stop, exit, or route.
Keep examples general enough to transfer beyond one fixture. Do not turn the body into a transcript, test suite, or scenario catalog. Inline examples teach; behavioral evals test whether the skill changes behavior under pressure.
Add Resources Only When Needed
Start with one SKILL.md. Keep a new single-file skill at 120 lines or fewer unless a live repo rule or measured failure requires more. Remove repeated prose and low-value checklists before expanding the file set.
Add a reference only for conditional depth. Add a script only for repeated deterministic work that is risky or wasteful to retype. Link every resource from SKILL.md with an observable read or run condition.
Do not add README files, changelogs, example collections, references, or scripts merely to appear complete. Read progressive disclosure before adding resources.
Evaluate Before Claiming Readiness
Static validation proves structure, not behavior. Record unevaluated behavior as Draft or Unverified and name the missing evidence in the owning eval artifact, evidence report, release/current-state metadata, Working Record, tool result, or delivery response—not in the subject SKILL.md.
Read Evaluate Skill when testing activation, first-read behavior, nearby behavior, dependencies, retained use, artifact outcomes, or readiness. Preserve adequate existing evidence, revise one measured pressure point at a time, and rerun the complete fixed case after a behavioral change.
Do not claim activation from body injection, retained use from one turn, or dependency behavior from undeclared context. Read the development loop when revising from measured failure or deciding whether evidence supports promotion.
Bundled Tool
Use the bundled skill author for deterministic structure work. Resolve the link relative to this skill directory, then run node <resolved-path> init|validate|inspect. Validation proves structure; inspection reports advisory signals. Neither proves behavior.
Stop
Stop and ask when the requested public behavior, activation boundary, dependency, safety rule, or compatibility choice is unclear and cannot be settled from evidence. If required readiness evidence is unavailable or forbidden, keep the external claim Draft or Unverified and name the gap without annotating or weakening the active skill body.
04 同仓库更多 Skills
write-skill
Use when creating, revising, merging or splitting a skill or any other text an agent acts on: a SKILL.md and its description, the references and scripts in a skill, AGENTS.md, CLAUDE.md, system or runtime prompts, tool descriptions, subagent briefs or judge prompts. Also use when deciding where an instruction should live, and when a skill is read at the wrong time, not read at all, or read but not followed.
verify-work
Use whenever you need to know whether something works or a claim is true: running tests, builds, linters or type checks; reproducing a bug or checking a fix; trying the real path in the running software, a browser or a CLI; measuring performance; and reading what the output actually shows, including failures and conflicting results. Read it before saying a change works, is fixed or is done, and to check your own change or document before reporting it done. Also use when writing, designing or changing a test, fixture or regression check; when a claim depends on an integration, host lifecycle, an installed package, rendered UI or browser behavior, or performance; and when setting up, following or updating a project's saved steps for launching its software and trying each feature as a user would, or rechecking them after the software changed.
setup-freeflow
Use when installing, activating or turning off Freeflow in a repository, changing or repairing its repository or personal configuration (.freeflow/config.json, .freeflow/local.json), setting up the Freeflow store that keeps task memory (local only, or local + cloud with a private repository, in a cloud session too) and moving older task records into it, or checking whether the current host is loading Freeflow's guidance and skills.
research-work
Use when a question has to be answered from evidence gathered and checked first: an in-depth report on a codebase, library, agent harness or tool; a survey, literature or systematic review of papers, docs or prior work; finding out what sources say before relying on them, and rechecking a published study's numbers; a study or experiment whose plan is fixed before the data, or a quick check on about twenty tasks of whether a change helped; writing a paper from results with its figures, references and PDF, and answering its reviewers. Also use when citing code at a pinned commit, deciding how strong a claim's evidence is, checking that each number traces to its log and each citation supports its claim, designing a measurement or a model judge, and computing statistics for a result (intervals, paired comparisons, clustered runs, rater agreement, pass@k, multiple comparisons, power, meta-analysis). Comparing options from facts already in hand is Discuss Work's; checking whether a change works is Verify Work's.
execute-work
Use for any task that uses tools: reading or searching a repository, running commands, diagnosing, and any work that changes code, files or settings: implementing a feature, fixing a bug, adding or changing behavior, configuring, prototyping, refactoring, simplifying or cleaning up code, deleting dead code, or maintaining a project. Also use when something fails, breaks, regresses or slows down and the cause is unknown, or a fix did not hold; when migrating users, data, a schema, a service or traffic to a replacement and removing the old path; when adding edge-case handling or code comments; and when handing work to subagents or parallel workers, or working from another agent's brief. Read it before your first tool call on a task, even a small or read-only one: it reads the request for its asks and implied requirements, finds what the change touches before you edit, and reports the result.
evaluate-behavior
Use when testing, evaluating or comparing how an agent behaves: whether a skill triggers, whether a change to a prompt, skill, model, setting or extension changes outcomes, measuring a reviewer or checker, or benchmarking agents on coding tasks, conversations or pipelines. Also use when writing or checking an eval's JSON files, running an eval and reading its results, and deciding what a result can claim, how many cases and trials it needs and what it costs.