create-rule

create-rule is a skill for Claude Code from mgiovani/cc-arsenal. It costs 145 tokens per session (1,155 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: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the cc-arsenal plugin — 53 skills shipped together

Good fit Use it to add coding standards, project instructions, or workflow guidance after…

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, the plugin that ships this one along with the rest of its 53 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.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.svg" alt="Measured on agentmods" 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,155 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.01155
Opus 5 $0.00072 $0.00577
Sonnet 5 $0.00029 $0.00231
Haiku 4.5 $0.00015 $0.00115

Measured 6d ago against content hash 403fb5d83a68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 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 · 70 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. 6d 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 (7 stars, last pushed 6d ago), licensed MIT. It adds 145 tokens to every session and 1,155 once invoked, about $0.0007 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

durable-session-state

Persist plans, scope decisions, evidence, and reviewer/critic verdicts to durable files during long or multi-phase tasks so work survives context compaction, session resumes, and handoffs. Use for swarm-mode tasks, before context grows large, when recording approval gates, and when resuming after compaction or a…

ZaxbyHub/opencode-swarm · 70 tokens

obsidian

Use the official Obsidian CLI (v1.12+) to manage vaults, notes, daily notes, search, tasks, tags, properties, links, templates, sync, publish, and workspaces. Use when the user mentions Obsidian, vaults, notes, or wants to automate note-taking and knowledge base workflows.

lvndry/jazz · 71 tokens

contextdb-autopilot

Automatic ContextDB session lifecycle — init, session events, checkpoints, and continuity artifacts. Use when you need AIOS context persistence without prompt injection. NOT for general task execution — only for ContextDB session management. TRIGGER: contextdb、session persist、checkpoint save.

rexleimo/aios · 60 tokens

memo

AIOS project memory — read/write/search your own memory using the memo capabilities. You (the model) decide what to remember, what to correct, and what was useful; the harness only executes your decision. Use when you want to recall prior work, persist a durable fact, supersede a wrong one, or mark a recalled memory…

rexleimo/aios · 94 tokens

aios-offload-recall

Use when recalling prior AIOS tool/browser outputs from offloaded refs; inspect Mermaid canvas first, then read only matching node-level evidence.

rexleimo/aios · 34 tokens

memory-state

State variables the Sentinel must keep across ticks (last order sent, freeze flag, FATAL streak, per-state counters, emergency history, cooldowns). Use this skill on every tick to update memory and decide if a new order is required (edge-triggered).

leopu00/job-hunter-team · 55 tokens