rule-creator

rule-creator is a skill for Claude Code, Codex from anilcancakir/claude-code-plugin. It costs 42 tokens per session (1,495 once invoked), scanned A, original, MIT.

A tool for creating file-specific coding rules in Claude Code projects. The rules load only when matching files are edited, while CLAUDE.md describes the project as a whole.

In plain words
What is it for?
Use it to define conventions for a language, framework, or module, such as rules for Dart files or API controller files.
Why use it?
It keeps general project instructions separate from rules that apply only to certain languages or modules, reducing repeated guidance and unnecessary context.

Skill for Claude CodeCodex

Part of the ac plugin — 6 skills, 9 commands, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/anilcancakir/claude-code-plugin/rule-creator
Any agent
npx skills add anilcancakir/claude-code-plugin --skill rule-creator
Clone the repo
git clone --depth 1 https://github.com/anilcancakir/claude-code-plugin

Made for: Claude Code, Codex.

Or install ac, the plugin that ships this one along with the rest of its 6 skills, 9 commands, 2 hooks.

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 rule-creator

README.md
[![agentmods](https://agentmods.dev/badge/skills/anilcancakir/claude-code-plugin/rule-creator.svg)](https://agentmods.dev/skills/anilcancakir/claude-code-plugin/rule-creator)
Your own site
<a href="https://agentmods.dev/skills/anilcancakir/claude-code-plugin/rule-creator"><img src="https://agentmods.dev/badge/skills/anilcancakir/claude-code-plugin/rule-creator.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,495 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00042 $0.01495
Opus 5 $0.00021 $0.00747
Sonnet 5 $0.00008 $0.00299
Haiku 4.5 $0.00004 $0.00150

Measured 4d ago against content hash dc2373c291d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rule-creator scanned grade A with 0 findings 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ac/skills/rule-creator/SKILL.md · 146 lines

How it starts

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

Create path-scoped rules that auto-inject when Claude Code reads, writes, or edits matching files. Rules hold "how to code HERE" — CLAUDE.md holds "what this project IS".

Context Layer Stack

~/.claude/CLAUDE.md          ← always (global)
./CLAUDE.md                  ← always (project)
.claude/rules/<name>.md      ← ON-DEMAND when matching file touched

CLAUDE.md and rules are visible simultaneously. Any overlap = wasted tokens. Rules are ADDITIVE — never duplicating CLAUDE.md, never re-stating what my-coding already covers.

Two-Tier Rules

Tier Scope Lines Example
Stack All files of a language 10-20 flutter.mdlib/**/*.dart
Domain Specific module 15-40 database.mdlib/src/database/**/*.dart

Stack and domain globs can overlap — both inject when a domain file is touched. This is intentional: stack provides general conventions, domain adds deep API knowledge.

Core Process

1. Identify Scope

Determine which files need this rule. Define the narrowest glob that covers the affected area:

  • Language-wide: lib/**/*.dart, src/**/*.ts
  • Module-specific: src/api/**/*.ts, app/Http/Controllers/**/*.php
  • Test files: test/**/*_test.dart, tests/**/*.test.ts

Avoid **/* — too broad. Rules must add value only when the matched files are being touched.

2. Classify Tier

  • Stack rule (10-20 lines): applies to all files of a language/framework — import style, naming, general conventions
  • Domain rule (15-40 lines): applies to a specific module — API patterns, must-know method signatures, domain-specific gotchas

3. Dedup Check

Read these sources before writing any rule content:

  1. ./CLAUDE.md — project-wide conventions already stated
  2. ~/.claude/CLAUDE.md — global workflow rules
  3. ~/.claude/skills/my-coding/SKILL.md — general coding standards

Apply this algorithm to each proposed convention:

  • Exact match found in any source → skip it
  • Semantic overlap (broader rule covers this case) → skip it
  • Conflict (proposed rule contradicts an existing rule) → flag for user decision, present both, ask which takes precedence
  • Complement (adds specificity to a broad rule) → keep it

Read the full file on GitHub · 146 lines

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. 4d ago First seen · 146 lines · 42 tokens per session scan A dc2373c291d6

Subscribe to this mod's changes

rule-creator is a skill published in the GitHub repository anilcancakir/claude-code-plugin (2 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 1,495 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-framework-py-release

Use when cutting a Python release for the microsoft/agent-framework monorepo. Triggers on "bump py versions", "cut a python release", "prepare release PR for python", "release py packages", "bump python to X.Y.Z", or similar requests to bump Python package versions and prepare a release PR. Handles all four lifecycle…

microsoft/agent-framework · 103 tokens

python-package-management

Guide for managing packages in the Agent Framework Python monorepo, including creating new connector packages, versioning, and the lazy-loading pattern. Use this when adding, modifying, or releasing packages.

microsoft/agent-framework · 43 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens