create-rule

create-rule is a skill for Claude Code from mgiovani/cc-arsenal. It costs 145 tokens per session (1,139 once invoked), scanned A, original, MIT.

A workflow for adding a persistent instruction to the AI coding tool used by a project. Depending on the tool, the instruction may be stored in files such as CLAUDE.md, AGENTS.md, or a Cursor rule file.

In plain words
What is it for?
Use it to add coding standards, project instructions, or workflow guidance after checking the repository’s existing AI-tool configuration.
Why use it?
It prevents project rules from being lost between sessions and places them in the format the project’s coding tool actually reads. It first checks existing rules so the new one does not conflict with them.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; positional $N argument.

Part of the cc-arsenal-skills plugin — 10 skills shipped together , and of cc-arsenal

Good fit Use it to add coding standards, project instructions, or workflow guidance after checking the repository’s existing AI-tool configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mgiovani/cc-arsenal/create-rule
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 mgiovani/cc-arsenal --skill create-rule
Clone the repo
git clone --depth 1 https://github.com/mgiovani/cc-arsenal

Made for: Claude Code.

Or install cc-arsenal-skills, the plugin that ships this one along with the rest of its 10 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 create-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/create-rule/github.svg)](https://agentmods.dev/skills/mgiovani/cc-arsenal/create-rule)
Your own site
<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/create-rule"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/create-rule/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 create-rule

Your own site · 80×15
<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/create-rule"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/create-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00145 $0.01139
Opus 5.5 $0.00058 $0.00456
Sonnet 5.5 $0.00029 $0.00228
Haiku 4.5 $0.00015 $0.00114

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

Security

Grade A, and why

create-rule 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 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.

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.

skills/create-rule/SKILL.md · 62 lines

How it starts

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

Create Rule

Generate a new memory rule (a project instruction, coding standard, or workflow guideline) in whatever format the project's AI tooling actually reads.

This creates memory rules, not skills or commands (use create-skill) and not a search for existing skills to install (use find-skills).

Anti-hallucination guidelines

  • Verify existing patterns first: check the actual codebase, don't assume conventions.
  • Base rules on real code found in the project, not invented standards.
  • If no convention exists, ask the user rather than making one up.
  • Check existing CLAUDE.md / AGENTS.md / .claude/rules/*.md / .cursor/rules/*.mdc for conflicts before adding a new rule.
  • Only use paths frontmatter on .claude/rules/*.md (Claude Code) or globs on .cursor/rules/*.mdc (Cursor), never on CLAUDE.md or AGENTS.md, which have no frontmatter.

Steps

  1. Parse arguments: rule name from $1 (or the first word of the arguments), description from the rest: ask the user if either is missing.
  2. Detect the tool convention by checking what's already in the repo:
    • CLAUDE.md or .claude/rules/*.md present → Claude Code.
    • AGENTS.md present (with no Claude-specific files) → Codex/Cursor/Copilot/Gemini-CLI-style tool. This repo's own AGENTS.md + CLAUDE.md pair is a live example of the pattern.
    • .cursor/rules/*.mdc present → Cursor's native format.
    • More than one convention present → ask which the user wants updated (or write to more than one, if the user says so).
    • None present → ask the user which tool/format they use before writing anything.
  3. Decide type and scope for the detected tool (details and templates in the reference):
    • Claude Code: modular .claude/rules/<name>.md for a focused single topic vs. a CLAUDE.md entry for a short cross-cutting instruction; project (.claude/rules/, git-shared) vs. user (~/.claude/rules/, personal): ask if unclear from context; path-specific rules need paths frontmatter.
    • AGENTS.md-style tools: append a new section to the single root AGENTS.md, this format has no per-topic file split or frontmatter.
    • Cursor: .cursor/rules/<name>.mdc with description/globs/alwaysApply frontmatter; scope by directory nesting for path-specific rules.
  4. Write the rule, following the matching template in references/rule-examples.md: imperative language, specific expectations, one topic per file, code examples where useful.

Read the full file on GitHub · 62 lines

Files

What ships with it

4 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 · -9 lines b0cf974f248f
  2. 2mo ago Changed · +1 lines 42456d36f415
  3. 3mo ago First seen · 70 lines · 145 tokens per session scan A 403fb5d83a68

Subscribe to this mod's changes

create-rule is a skill published in the GitHub repository mgiovani/cc-arsenal (8 stars, last pushed 1mo ago), licensed MIT. It adds 145 tokens to every session and 1,139 once invoked, about $0.0006 per session on Opus 5.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

create-rule compared with skills from other repositories

create-rule next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-rulemgiovani/cc-arsenalSkill81mo agoMITA145Claude Code
mnemonmnemon-dev/mnemonSkill7549d agoApache-2.0A25Claude Code, Codex
durable-session-stateZaxbyHub/opencode-swarmSkill550yesterdayMITA70Claude Code
mnemonmnemon-dev/mnemonSkill7549d agoApache-2.0A30Claude Code, Codex
brain-ingestmindmuxai/brain.mdSkill72819d agoApache-2.0A48Claude Code, Codex
sivtr-memoryAriestar/sivtrSkill259todayApache-2.0A46Claude Code, Codex
kn-initknowns-dev/knownsSkill257yesterdayMITA23Claude Code, Codex