agentic-rules-writer

agentic-rules-writer is a skill for Claude Code from krzysztofsurdy/code-virtuoso. It costs 80 tokens per session (3,083 once invoked), scanned C, original, MIT.

An interactive tool for creating instruction files that tell an AI coding assistant how to work. It supports agents such as Claude Code, Cursor, Windsurf, Copilot, and Codex, using the format and location each one expects.

In plain words
What is it for?
Use it to create project or personal rules for an AI coding agent, configure a new agent, or keep shared instructions aligned with the tools in use.
Why use it?
It helps teams and individual developers turn coding standards into consistent, reusable rules. It also updates those rules when installed skills change.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the tools-virtuoso plugin — 13 skills shipped together

Good fit Use it to create project or personal rules for an AI coding agent, configure a new agent, or keep shared instructions aligned with the tools in use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add krzysztofsurdy/code-virtuoso --skill agentic-rules-writer
Clone the repo
git clone --depth 1 https://github.com/krzysztofsurdy/code-virtuoso

Made for: Claude Code.

Or install tools-virtuoso, the plugin that ships this one along with the rest of its 13 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agentic-rules-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer/github.svg)](https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer)
Your own site
<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agentic-rules-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/agentic-rules-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.03083
Opus 5.5 $0.00032 $0.01233
Sonnet 5.5 $0.00016 $0.00617
Haiku 4.5 $0.00008 $0.00308

Measured 1mo ago against content hash 632d764ce3a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

agentic-rules-writer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| No `rm -rf` or other destructive commands | A deny rule on the command, with the sandbox for what a deny rule cannot see |
skills/tools/agentic-rules-writer/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agentic rules writer

A rules file is read on every turn. Filler such as "write clean code" costs tokens, buries the few lines that matter, and changes nothing, because the model already does it. Research on repository context files found that they did not generally raise task success and cost over 20% more to run, while specific instructions were followed well. This skill writes the short file: commands, conventions that differ from the defaults, the user's real preferences. It sends rules that must always hold to deny rules and hooks, where they are enforced instead of requested.

It has two modes. Pick one from the request, and ask only if it is unclear.

Mode Triggers Does
Generate "set up agent rules", "write CLAUDE.md", "create Cursor rules" Infers from the repo, asks about eight things, writes a short file
Trim "trim my CLAUDE.md", "my rules file is too long", "clean up AGENTS.md" Audits an existing file, classifies each line, shows a diff, applies it after approval. See trim-mode

Argument trim <path> starts trim mode on that file. Any other argument names the target tool.

What a rules file may hold

Every line must prevent a mistake the agent would make without it.

Keep Example
Commands the agent cannot guess Test one file: pnpm test -- path/to/file.spec.ts
Conventions that differ from defaults Money is integer cents, never floats. Do not edit generated/ (rebuilt by make gen)
The user's real preferences Commit and branch format, what to ask before doing, reply language
Environment quirks Tests need docker compose up db first
Pointers, one line each Read docs/payments.md before touching src/payments/

What not to write

Leave these out, and tell the user a line was dropped when they ask for one. The model follows them already, the repo shows them, or a tool enforces them.

Do not write Example lines
Generic engineering principles Write clean, maintainable code. Simplicity first. Root causes only. Minimal blast radius. Follow SOLID
Habits the model already has Read before editing. Follow existing patterns. Prefer editing over creating files. Remove dead code. Minimal diffs
Honesty and care slogans Don't guess. Prove it works. Ask when stuck. Handle edge cases. Validate inputs at boundaries
Generic testing, security and quality lectures Write tests for everything. Follow OWASP. Sanitize all input. Maintain high code quality
What the repo shows Directory trees, stack lists, a README summary, dependency lists
What a formatter or linter enforces Indentation, quote style, import order
Knowledge-source habits Prefer official docs over blog posts. Search the web when unsure
Skill routing tables and agent rosters When X, use /skill. A list of agents. Every description already reaches the model
Rules that must always hold, as prose Never force push to main. Never commit secrets. Never read .env. These go to Phase 4

Read the full file on GitHub · 168 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -287 lines · +3 tokens per session scan A → C 632d764ce3a1
  2. 1mo ago Changed · -275 lines · -67 tokens per session scan C → A 5039869c84df
  3. 3mo ago First seen · 730 lines · 144 tokens per session scan C 3906ee025514

Subscribe to this mod's changes

agentic-rules-writer is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (26 stars, last pushed 1mo ago), licensed MIT. It adds 80 tokens to every session and 3,083 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

agentic-rules-writer compared with skills from other repositories

agentic-rules-writer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentic-rules-writerkrzysztofsurdy/code-virtuosoSkill261mo agoMITC80Claude Code
hermes-diagnostic-reviewAtlasOmnia/hermes-custom-packSkill8818d agoMITA49Claude Code, Codex
worth-building2ykwang/agent-skillsSkill192d agoMITA128Claude Code
django-ticket-triage2ykwang/agent-skillsSkill192d agoMITA65Claude Code
gh-issuesSafeAI-Lab-X/ClawKeeperSkill1.0k4d agononeA116Claude Code
healthcheckSafeAI-Lab-X/ClawKeeperSkill1.0k4d agononeA70Claude Code, Codex
clawkeeperSafeAI-Lab-X/ClawKeeperSkill1.0k4d agononeA98Claude Code, Codex