write-skill — Claude Code skill: what it does, how to install
write-skill — a Claude Code skill that creates and edits agent documents with behavioral verification. Activated when writing system prompts, CLAUDE.md, AGENTS.md, or repeating agent corrections.
MIT 1,000 installs ★ 10 updated 2026-10-16
npx skills add pwguler/skills --skill write-skill -a claude-codeWhat write-skill does
Writing instructions for agents follows a test-first development loop applied to text. The baseline scenario runs on an agent without the target document to record exact failures. Then the minimum text correcting those failures is written and verified in a rerun.
Repeated user corrections turn into structural lessons at the highest holding level. The process skips one-off tasks or cases where a linter or hook handles the rule enforcement.
To use it in Claude Code, run npx skills add pwguler/skills --skill write-skill -a claude-code.
What it helps with
- create a system prompt for an AI agent
- verify agent behavior before and after document updates
- encode repeated agent mistakes into structural lessons
- write minimal text to fix specific agent failures
Example prompts for the agent
- write rules for
AGENTS.mdusing write-skill - verify agent behavior against a scenario with write-skill
- fix the agent mistake by encoding the lesson in structure
How to install write-skill
1Skills CLI (Vercel)
npx skills add pwguler/skills --skill write-skill -a claude-code2Manually: put the files in place
~/.claude/skills/write-skill/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/write-skill/
1Skills CLI (Vercel)
npx skills add pwguler/skills --skill write-skill -a codex2Manually: put the files in place
.agents/skills/write-skill/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pwguler/skills --skill write-skill -a cursor2Manually: put the files in place
.cursor/skills/write-skill/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pwguler/skills skills/write-skill2Manually: put the files in place
.github/skills/write-skill/SKILL.md1Skills CLI (Vercel)
npx skills add pwguler/skills --skill write-skill -a gemini-cli2Platform CLI
gemini skills install https://github.com/pwguler/skills --path skills/write-skillManually: put the files in place
.devin/skills/write-skill/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pwguler/skills --skill write-skill -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about write-skill
How to install write-skill in Claude Code?
Run npx skills add pwguler/skills --skill write-skill -a claude-code and check ~/.claude/skills/write-skill/SKILL.md.
What does write-skill do?
It helps create and edit agent documents by running baseline scenarios and verifying behavioral changes.
When should you use this skill?
Use it before writing or editing skills, AGENTS.md, CLAUDE.md, or system prompts, and when the user corrects the same agent mistake twice.
Source text
SKILL.md · MIT
--- name: write-skill description: Create or edit a document that an agent reads, and prove that it changes behavior. Put a lesson that agents keep learning again into structure. Read this skill before you write or edit a skill, AGENTS.md, CLAUDE.md, a system prompt, or other text for agents. Use it to verify such a document before it ships. Use it also when the user corrects the same agent mistake a second time. --- Writing for agents is test-first development, applied to text. The same loop ships every document that an agent reads: skills, AGENTS.md, CLAUDE.md, and system prompts. 1. Run the baseline first. Run the scenario that the document targets on an agent WITHOUT the document. Record exactly how it fails, or what excuse it gives. Run the baseline in a fresh subagent that loads no skills and no context files, such as `AGENTS.md`. It keeps the base system prompt of your agent. When your agent cannot start such a subagent, use a new session without skills and context files. When you observe no failure, the document has nothing to teach. 2. Write the minimum text that fixes those specific failures. Do not write a manual. Write the shortest process that changes the behavior. 3. Run the scenario again with the document loaded. It passes, or the document is wrong. 4. Close loopholes. When a new run shows a new excuse, block it in the text, and verify again. Rules: - An eval script changes the mechanics, not the loop. When one exists, it runs the baseline and the second run. - A correction that the user makes a second time is a lesson that did not hold. Read [encode lessons in structure](references/encode-lessons-in-structure.md). Fix its class at the highest level that holds: a mechanism before any text. Only what no mechanism can hold goes through steps 1 to 4. - When the document is a skill in this repo, follow the [conventions for skills in this repo](references/conventions.md). - Skip this skill for work done once, or when standard practice is already well documented. Skip it also when a linter or hook could enforce the rule. In that case, build the linter or hook instead, as [encode lessons in structure](references/encode-lessons-in-structure.md) says.
© pwguler · MIT · pwguler/skills