by yzhao062
21 writing rules for AI coding and writing agents. Drop-in for Claude Code, Codex, Copilot, Cursor, and Aider, so their output reads like a tech pro.
# Add to your Claude Code skills
git clone https://github.com/yzhao062/agent-styleagent-style is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by yzhao062. 21 writing rules for AI coding and writing agents. Drop-in for Claude Code, Codex, Copilot, Cursor, and Aider, so their output reads like a tech pro. It has 604 GitHub stars.
agent-style's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/yzhao062/agent-style" and add it to your Claude Code skills directory (see the Installation section above).
agent-style is primarily written in Python. It is open-source under yzhao062 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-style against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Make your AI agent write like a tech pro.
21 rules: 12 from classic writing guides, 9 from field observation of LLM output, 2022-2026.
Before / after · What it is · Does it work? · Use

The top row is the identity: 21 rules, 12 canonical plus 9 field-observed; bordered red marks the two critical rules (RULE-01 curse-of-knowledge and RULE-H citation discipline). The bottom three rows are the mechanism, each pulled from a real v0.3.0 bench draft pair (same prompt, independent generations with and without the ruleset): a product description on Gemini 3 Flash (8 → 0 violations), a design-doc section on Claude Opus 4.7 (14 → 7), and a paper related-work section on Gemini 3 Flash (6 → 4; the source drafts are anchored to three prompt-named benchmarks (AgentBench, BFCL, tau-bench) so the style delta measured by agent-style review is isolated from fabricated-citation noise, though the displayed baseline snippet stops before the third name to keep the panel to three sentences). Each row shows the AI draft on the left with rule-violating phrases highlighted, the specific rules that fire in the middle, and the revised version on the right at the same length budget, same register, same document type.
A curated set of English writing rules formatted for AI coding and writing agents to follow at generation time, not as a post-hoc linter.
| In scope | Out of scope |
|---|---|
| API docs, design docs, research papers, grant proposals | Fiction, poetry, marketing copy |
| READMEs, runbooks, commit messages, error messages | Long-form narrative non-fiction |
| Technical blog posts, postmortems, issue reports | Non-English prose; any context where rhythm or affect matter more than precision |
The 21 rules split by origin. The agent reads both as equal peers; no group is annotated as higher-priority than the other.
RULE-01..12 (canonical). Distilled from Strunk & White, Orwell, Pinker, and Gopen & Swan. Each rule cites its source by chapter, section, or essay rule; I verified every citation against the original works. Full names in the table below.RULE-A..I (field-observed). Patterns I logged from AI output across dozens of writing projects (papers, grant proposals, technical documentation, agent configs) and code releases, 2022 to 2026. Transparent attribution: these are not literature-backed but capture LLM-specific failure modes that the canonical set alone misses (RULE-H citation discipline is the critical one). Full names in the table below.Named in homage to Strunk & White's The Elements of Style (1918/1959), one of the four canonical sources.

Sourced from writing authorities; each rule cites its source by chapter, section, or essay rule.
| # | Rule | Primary source |
|---|---|---|
| 01 | Do not assume the reader shares your tacit knowledge | Pinker 2014, Ch. 3 |
| 02 | Do not use passive voice when the agent matters | Orwell 1946 Rule 3; S&W §II.14 |
| 03 | Do not use abstract or general language when a concrete, specific term exists | S&W §II.16; Pinker 2014 Ch. 3 |
| 04 | Do not include needless words | S&W §II.17; Orwell 1946 Rule 3 |
| 05 | Do not use dying metaphors or prefabricated phrases | Orwell 1946 Rule 1 |
| 06 | Do not use avoidable jargon where an everyday English word exists | Orwell 1946 Rule 5; Pinker 2014 Ch. 2 |
| 07 | Use affirmative form for affirmative claims | S&W §II.15 |
| 08 | Do not linguistically overstate or understate claims relative to the evidence | Pinker 2014 Ch. 6; Gopen & Swan 1990 |
| 09 | Express coordinate ideas in similar form (parallel structure) | S&W §II.19 |
| 10 | Keep related words together | S&W §II.20; Gopen & Swan 1990 |
| 11 | Place new or important information in the stress position at the end of the sentence | Gopen & Swan 1990 |
| 12 | Break long sentences; vary length (split sentences over 30 words) | S&W §II.18; Pinker 2014 Ch. 4 |
Structural patterns logged from LLM output across research, proposal, documentation, and agent-configuration work, 2022 to 2026. Treated as peer input to the canonical rules when an agent consumes the ruleset.
| # | Rule |
|---|---|
| A | Do not convert prose into bullet points unless the content is a genuine list (and do not over-bullet where 2 items or a sentence fit) |
| B | Do not use em or en dashes as casual sentence punctuation |
| C | Do not start consecutive sentences with the same word or phrase |
| D | Do not overuse transition words ("Additionally", "Furthermore", "Moreover") |
| E | Do not close every paragraph with a summary sentence |
| F | Use consistent terms; do not redefine abbreviations mid-document |
| G | Use title case for section and subsection headings (articles, short prepositions, and coordinating conjunctions stay lowercase) |
| H | Support factual claims with citation or concrete evidence; do not be handwavy (critical) |
| I | Prefer full forms over contractions in formal technical prose ("it is" over "it's") |
Escape hatch (Orwell 1946 Rule 6): "Break any of these rules sooner than say anything outright barbarous." Rules are guides to clarity, not ends in themselves.
See RULES.md for the full per-rule blocks with BAD/GOOD examples, enforcement tier, and rationale.

Sanity bench on 10 fixed prose tasks (2 PR descriptions, 1 design-doc section, 1 commit message, 4 paper sections, 1 product description, 1 NSF-style specific aim), 2 generations per condition, flagship models drafting with agent-style loaded at generation time vs not. Three models shown: Claude Opus 4.7 dropped 45% (105 → 58 violations); OpenAI GPT-5.4 via Codex CLI dropped 45% (51 → 28); Gemini 3 Flash dropped 82% (79 → 14). The GitHub Copilot CLI runner was tested but excluded from the figure because its -p programmatic mode does not load instruction files (+3% noise; see CHANGELOG.md Notes). See docs/bench-0.3.0.md for the full scorecard across all 4 runners plus per-runner drafts under docs/bench-0.3.0-drafts/, and RELEASING.md "Bench (Local Only)" for reproduction steps.
Numbers are directional, not statsig: 10 tasks × 2 generations × 2 conditions = 40 calls per runner. The takeaway is that the ruleset reduces mechanical AI-tell density across every frontier family where the instruction file actually reaches the model's context; the exact size of the drop varies with each model's baseline (heavier in models that emit more long sentences / em-dashes by default, smaller or zero in already-clean models).
AGENTS.md-compliant tool. Each agent reads the ruleset as part of its system prompt or project config.Two ways to enforce the rules in your AI agent's output. You typically use both:
enable command per tool; then the agent reads agent-style's 21 rules as part of its context.style-review audits the draft against the same 21 rules and, on your confirmation, writes a polished copy beside the original. Your source file is never touched.Install the CLI once; then pick the paths you want.
pip install agent-style # Python users
# or: npm install -g agent-style # Node users
# or: npx --yes agent-style@0.3.6 <subcommand> # no install needed