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/d3v0psdan-cc-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: backend, testing, 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. 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/cc-create-rule
What's inside
- Skill name
cc-create-rule- Description
- Create a Claude Code rule file in .claude/rules/. Use whenever the user wants to add a rule, coding standard, convention, guideline, or persistent instruction that loads alongside CLAUDE.md — including path-scoped rules that only load for matching files (e.g. "only apply this to API files" or "a testing rule for test files"). Keeps instructions modular instead of bloating CLAUDE.md. Trigger this even if the user just says "add a convention/standard/rule for X" without naming the rules folder.
- License
- MIT
- Instructions
- 97 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Create a Claude Code rule
A rule is a small markdown file in `.claude/rules/` that loads into context as instructions — same priority as `.claude/CLAUDE.md`, but split out by topic so things stay tidy. A rule can also be **path-scoped** so it only loads when Claude touches matching files, which saves context.
Three quick steps.
---
## Step 1 — Name the file by topic
One topic per file, descriptive name. It lives at `.claude/rules/<topic>.md`. Subfolders are fine (discovered recursively):
```
.claude/rules/
├── code-style.md
├── testing.md
├── security.md
└── frontend/
└── components.md
```
## Step 2 — Decide the scope
Ask one question: **does this apply everywhere, or only to certain files?**
- **Everywhere** → no frontmatter. The rule loads at the start of every session.
- **Only certain files** → add `paths:` frontmatter with glob patterns. The rule loads only when Claude reads a file that matches — keeping it out of context until it's relevant.
When in doubt, scope it. A path-scoped rule is the lighter choice, and it's the main reason to use a rule over CLAUDE.md.
## Step 3 — Write it
Keep it like good CLAUDE.md content: short, specific, verifiable. Bullets over paragraphs. Aim well under ~50 lines.
**Always-on rule** (no frontmatter):
```markdown
# Testing
- Run `npm test` before committing.
- Co-locate tests next to the source file as `*.test.ts`.
- Mock network calls; never hit live services in unit tests.
```
**Path-scoped rule** (`paths:` frontmatter):
```markdown
---
paths:
- "src/api/**/*.ts"
---
# API rules
- Every endpoint validates its input.
- Use the standard error response format.
- Include OpenAPI doc comments on each handler.
```
That's it — Claude Code discovers the file automatically. No wiring, no restart.
---
## Glob cheat sheet for `paths:`
| Pattern | Matches |
| :----------------------- | :---------------------------------------- |
| `**/*.ts` | all TypeScript files, any directory |
| `src/**/*` | everything under `src/` |
| `*.md` | markdown files in the project root only |
| `src/components/*.tsx` | React components in one specific directory |
Multiple patterns and brace expansion both work:
```markdown
---
paths:
- "src/**/*.{ts,tsx}"
- "tests/**/*.test.ts"
---
```
## Writing tips
- **Specific beats vague:** "Use 2-space indentation" lands better than "format code nicely."
- **No contradictions:** if two rules (or a rule and CLAUDE.md) disagree, Claude may pick one at random. Skim existing rules before adding.
- **Verify it loaded:** run `/memory` in Claude Code — it lists every CLAUDE.md and rules file in the session.
## Rule vs CLAUDE.md vs skill — quick pick
- **Rule** → a standing instruction, especially one that only matters for certain files. Loads automatically.
- **CLAUDE.md** → the few "always true everywhere" facts (build commands, layout, top conventions). Loads every session.
- **Skill** → a multi-step procedure or workflow you invoke. Loads on demand, not always in context.
If it's a procedure with steps, it's probably a skill. If it's a "do it this way" instruction, it's a rule.From d3v0psdan/claude-skills, MIT.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 19, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/d3v0psdan/claude-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from d3v0psdan
Cite this page
cc-create-rule skill. Agent Mart. https://agentmart.dev/skills/d3v0psdan-cc-create-rule (last updated 2026-10-24)