create-rule
Create, audit or tighten persistent rules for coding agents: .claude/rules/*.md, .cursor/rules/*.mdc, a catalog rules/ tree, CLAUDE.md or AGENTS.md.
Skill by pahlevikun
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/pahlevikun-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: security, 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
- Runs as
- Node.js package
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, audit or tighten persistent rules for coding agents: .claude/rules/*.md, .cursor/rules/*.mdc, a catalog rules/ tree, CLAUDE.md or AGENTS.md. Use when asked to add a rule or coding standard, scope a rule to file globs or paths, fix a rule the agent ignores, or decide whether something is a rule, a skill or a hook.
- License
- MIT
- Instructions
- 74 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (4)
- SKILL.md
- formats.md · references/
- check-rule.mjs · scripts/
- rule.md · templates/
SKILL.md (first lines)
# Create a rule A rule is a short, standing instruction that is loaded into context, always or when matching files are touched. It guides; it does not enforce. If an action must be blocked every time, use a hook. ## Principles 1. **A rule earns its tokens every session.** If it only matters for one task, make it a skill. If it must be enforced, make it a hook. 2. **One concern per rule, under 50 lines.** Split a long rule by topic. 3. **Say what to do, concretely.** "Use `snake_case` for Python functions" beats "follow naming conventions". Give a good and a bad example when the fix is not obvious. 4. **Give the reason in one clause** when it is not obvious, so the agent can judge edge cases. 5. **Do not restate a linter or formatter.** Point to the tool's command instead. 6. **No contradictions.** Read the existing rules first. Edit an overlapping rule rather than adding a competing one. 7. **Scope as narrowly as is true.** Always-on only for what holds in every task; otherwise scope by globs or by description. ## Rule, skill, hook, or AGENTS.md? | It is... | Use | |---|---| | A standing preference or constraint for every task | Always-on rule, or `AGENTS.md` / `CLAUDE.md` for repo facts and commands | | A convention for certain files (`**/*.ts`, `migrations/**`) | File-scoped rule | | A procedure with steps, run on demand | Skill (`create-skill`) | | Must be enforced, blocked or automated | Hook (`create-hook`) | ## Steps 1. **Gather requirements.** Infer from the conversation; ask only for what is missing: - what the rule enforces or teaches; - scope: always, certain files (concrete globs, not "the backend"), or by description only; - target: which tool and which folder (step 3). You may write several rules when the conversation covers distinct topics. 2. **Check overlap.** List the rule files in the target tree and read the nearest ones. 3. **Pick the format** by target. Details and frontmatter are in [formats.md](references/formats.md). | Target | File | |---|---| | Claude Code | `.claude/rules/<name>.md`, optional `paths:` | | Cursor | `.cursor/rules/<name>.mdc` with `description`, `globs`, `alwaysApply` | | A shared catalog | `rules/<topic>/<name>.md`; a sync step may generate the `.mdc` copies | | Both tools, one repo | Follow what the repo already does (often one tree symlinked into the other) | 4. **Write it** from [templates/rule.md](templates/rule.md). Lead with the instruction, not a title paragraph. Quote YAML values that contain `:`, `#` or start with `*`. 5. **Check it.** `node scripts/check-rule.mjs <file-or-dir>` catches YAML traps, a rule that can never apply, contradictory scope fields and oversize. In a repo with its own validation (for example `npm run validate`), run that too. 6. **Test it.** Start a fresh session, do a task the rule covers, and confirm it was followed. For a file-scoped rule, open a matching file and a non-matching one. If it is ignored, shorten it, make it more specific, or move enforcement to a hook. ## Do not - Put secrets, personal paths or employer names in a shared rule. - Write `globs: *.ts` unquoted (YAML reads `*` as an alias). Write `globs: "**/*.ts"`. - Mark everything `alwaysApply: true`. Always-on rules compete for attention. - Duplicate a rule in two folders by hand. Generate or symlink instead. ## Related skills - `create-hook`: the rule must be enforced, not just asked. - `create-skill`: the guidance is a procedure, not a standing rule. - `create-agents-md`: the rule belongs in AGENTS.md or CLAUDE.md. - `convert-as-skill`: turn a rule into a skill. ## Done when - The file is in the right folder for its tool, with frontmatter that tool reads. - `check-rule.mjs` reports no errors and the repo's own validation passes. - The rule is one concern, concrete, and does not contradict another rule. - A fresh session followed it on a real task.
From pahlevikun/levistack, MIT.
More from pahlevikun/levistack
- 0.570score
output-savers
pahlevikun
Engineering principles plus plain STE writing in one skill.
SkillAFreshness: AClaude Code +9 - 0.570score
convert-as-skill
pahlevikun
Convert existing material into a skill, or merge existing skills into one.
SkillAFreshness: AClaude Code +9 - 0.570score
create-agent
pahlevikun
Create, audit, test or improve subagents (agents/*.md for Claude Code and Cursor), including prompts, tool and model choice, multi-agent orchestration and…
SkillAFreshness: AClaude Code +9 - 0.570score
create-agents-md
pahlevikun
Create, audit or refresh AGENTS.md files: the repo root, nested package files, and the user-level global file, for Claude Code, Cursor and Codex.
SkillAFreshness: AClaude Code +9 - 0.570score
create-command
pahlevikun
Create, audit or improve slash commands (commands/*.md, .claude/commands, .cursor/commands): saved prompts you run as /name, with arguments and tool…
SkillAFreshness: AClaude Code +9 - 0.570score
create-hook
pahlevikun
Create, wire up, test and debug agent hooks: Claude Code settings.json or plugin hooks, Cursor hooks.json, or a shared hooks/ tree, with working recipes.
SkillAFreshness: AClaude Code +9 - 0.570score
create-skill
pahlevikun
Create, audit, grow or repair agent skills (a folder with SKILL.md) for Claude Code, Cursor, Codex and the skills CLI, including skills that write or run plans.
SkillAFreshness: AClaude Code +9 - 0.570score
super-architecture
pahlevikun
Detect, choose, build, evaluate, migrate and document software architecture.
SkillAFreshness: AClaude Code +9 - 0.570score
super-caching
pahlevikun
Super caching: domain router for web (browser, CDN, service worker, HTTP Cache-Control, BFF/API route cache), mobile (on-device, offline, image cache…
SkillAFreshness: AClaude Code +9 - 0.570score
super-protobuf
pahlevikun
Protocol Buffers (proto3) design, buf.yaml/buf.gen.yaml, Connect and gRPC services, protovalidate, lint and breaking checks, schema evolution, mixed-version…
SkillAFreshness: AClaude Code +9 - 0.570score
super-tech-blueprint
pahlevikun
Choose or generate a target technology stack: compare frameworks with TCO, security and ecosystem scoring, plan a migration, or write a blueprint for a new or…
SkillAFreshness: AClaude Code +9 - 0.570score
atomic-semantic-commit
pahlevikun
Split a messy working tree into small commits, one purpose and one context per commit, with semantic commit messages (feat, fix, docs, style, refactor, test…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 5, 2026 (23 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/pahlevikun/levistack
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from pahlevikun
- 0.570score
convert-as-skill
pahlevikun
Convert existing material into a skill, or merge existing skills into one.
SkillAFreshness: AClaude Code +9 - 0.570score
create-agent
pahlevikun
Create, audit, test or improve subagents (agents/*.md for Claude Code and Cursor), including prompts, tool and model choice, multi-agent orchestration and…
SkillAFreshness: AClaude Code +9 - 0.570score
create-agents-md
pahlevikun
Create, audit or refresh AGENTS.md files: the repo root, nested package files, and the user-level global file, for Claude Code, Cursor and Codex.
SkillAFreshness: AClaude Code +9 - 0.570score
create-command
pahlevikun
Create, audit or improve slash commands (commands/*.md, .claude/commands, .cursor/commands): saved prompts you run as /name, with arguments and tool…
SkillAFreshness: AClaude Code +9 - 0.570score
create-hook
pahlevikun
Create, wire up, test and debug agent hooks: Claude Code settings.json or plugin hooks, Cursor hooks.json, or a shared hooks/ tree, with working recipes.
SkillAFreshness: AClaude Code +9 - 0.570score
create-skill
pahlevikun
Create, audit, grow or repair agent skills (a folder with SKILL.md) for Claude Code, Cursor, Codex and the skills CLI, including skills that write or run plans.
SkillAFreshness: AClaude Code +9
Cite this page
create-rule skill. Agent Mart. https://agentmart.dev/skills/pahlevikun-create-rule (last updated 2026-10-24)