create-rule
Create a new memory/instruction rule for whatever AI coding tool a project actually uses, a CLAUDE.md entry or .claude/rules/*.md file for Claude Code, an…
Skill by mgiovani
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mgiovani-create-rule
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/create-rule
What's inside
- Skill name
create-rule- Description
- Create a new memory/instruction rule for whatever AI coding tool a project actually uses, a CLAUDE.md entry or .claude/rules/*.md file for Claude Code, an AGENTS.md entry for Codex/Cursor/Copilot/Gemini-CLI-style tools, or a .cursor/rules/*.mdc file for Cursor. Use when the user runs /create-rule or asks to add a project rule, user/personal rule, coding standard, style guide entry, or workflow instruction to memory, AGENTS.md, or CLAUDE.md. Not for creating skills or slash commands (use create-skill). Not for discovering or installing existing third-party skills (use find-skills).
- License
- MIT
- Metadata
- author: mgiovani · summary: Create CLAUDE.md/AGENTS.md rules and memory guidelines · version: 2.0.0
- Instructions
- 45 lines in SKILL.md · view on GitHub
Files (5)
- SKILL.md
- evals.json · evals/
- trigger-eval.json · evals/
- memory-hierarchy.md · references/
- rule-examples.md · references/
SKILL.md (first lines)
# 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`). - Tool conventions, OS-specific paths, and frontmatter formats: [references/memory-hierarchy.md](references/memory-hierarchy.md) - Worked templates per tool and scope: [references/rule-examples.md](references/rule-examples.md) - Claude Code memory docs: https://code.claude.com/docs/en/memory ## 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](references/rule-examples.md): imperative language, specific expectations, one topic per file, code examples where useful. ## Examples - `/create-rule api-errors "Standard error handling for API routes"` in a Claude Code repo → writes `.claude/rules/api-errors.md` with `paths: src/api/**/*.ts` frontmatter and concrete guidelines. - `/create-rule formatting "2-space indentation, single quotes"` in a Claude Code repo, no path scope needed → writes `.claude/rules/formatting.md` with no frontmatter. - `/create-rule --user preferences "Prefer functional patterns, async/await over raw promises"` → writes `~/.claude/rules/preferences.md` (personal, not git-shared). - `/create-rule testing "Use table-driven tests and no test interdependence"` in a repo with only `AGENTS.md` → appends a `## Testing` section to `AGENTS.md` instead of creating a new file. - `/create-rule react-components "Function components only, props typed with interfaces"` in a Cursor repo → writes `.cursor/rules/react-components.mdc` with `globs: ["**/*.tsx"]` frontmatter.
From mgiovani/cc-arsenal, MIT.
More from mgiovani/cc-arsenal
- 0.631score
git-commit
mgiovani
Generate a conventional commit message (conventionalcommits.org) from the staged/unstaged diff and create the commit.
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
agent-browser
mgiovani
Headless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
anything-to-skill
mgiovani
Turns a docs site, local folder, PDF or book, YouTube video, playlist or channel, or a topic into a source-grounded, token-efficient agent skill (hub…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
codex-imagegen
mgiovani
Generates images and polished raster art (logos, mascots, hero images, icons, characters, sprite sheets, illustrations, product mockups) by driving Codex…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
ci-generate
mgiovani
Generate a production-ready CI/CD pipeline config (GitHub Actions, GitLab CI, CircleCI, or Jenkins) by discovering the project's actual stack, test/build…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
create-skill
mgiovani
Create a new agent skill (or Claude Code slash command) from a plain-language description, using live spec fetching, pattern research, and an approval-gated…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
db-migrate
mgiovani
Creates, checks the status of, and validates database migrations by auto-detecting the project's migration framework (Alembic, Prisma, Knex, Django…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
docker-init
mgiovani
Generates production-ready docker-compose.yml and Dockerfile(s) for a project by scanning its manifest files (package.json, pyproject.toml, Gemfile, go.mod…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
docs-check
mgiovani
Read-only audit of documentation against the current codebase, flags stale docs, missing sections, broken links, and hallucinated claims (wrong file…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
docs-diagram
mgiovani
Generate a Mermaid diagram (ER, architecture, deployment, or security) by reading the actual codebase and writing it to docs/.
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
docs-update
mgiovani
Refresh existing docs (architecture, onboarding, data-model, deployment, security, contributing) so they match the current codebase, verifying every claim…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
env-setup
mgiovani
Scans a codebase for environment variable usage to generate or sync .env.example, validate .env completeness against what the code actually reads, and detect…
SkillAFreshness: A★ 8Claude Code +9
Signals
- Stars
- 8
- Forks
- 1
- Open issues
- 6
- Last commit (this folder)
- Oct 5, 2026 (23 days ago)
- Last release
- Oct 7, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 2.0.0
- License
- MIT
- Repository
- github.com/mgiovani/cc-arsenal
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mgiovani
- 0.631score
docs-diagram
mgiovani
Generate a Mermaid diagram (ER, architecture, deployment, or security) by reading the actual codebase and writing it to docs/.
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
agent-browser
mgiovani
Headless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
anything-to-skill
mgiovani
Turns a docs site, local folder, PDF or book, YouTube video, playlist or channel, or a topic into a source-grounded, token-efficient agent skill (hub…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
codex-imagegen
mgiovani
Generates images and polished raster art (logos, mascots, hero images, icons, characters, sprite sheets, illustrations, product mockups) by driving Codex…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
create-skill
mgiovani
Create a new agent skill (or Claude Code slash command) from a plain-language description, using live spec fetching, pattern research, and an approval-gated…
SkillAFreshness: A★ 8Claude Code +9 - 0.631score
ci-generate
mgiovani
Generate a production-ready CI/CD pipeline config (GitHub Actions, GitLab CI, CircleCI, or Jenkins) by discovering the project's actual stack, test/build…
SkillAFreshness: A★ 8Claude Code +9
Cite this page
create-rule skill. Agent Mart. https://agentmart.dev/skills/mgiovani-create-rule (last updated 2026-10-24)