Skip to main content
rule CX Codex

core-rules — Claude Code rule: what it does, how to install

core-rules — a rule file for your project: commit checks, Git habits, context discipline and the way the agent replies. Paste it into CLAUDE.md or keep it standalone.

MIT ★ 2,966 updated 2026-09-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow
Open on GitHub

What core-rules does

core-rules is a markdown file the agent reads with your project. Its sections cover code quality, Git, context handling, learning from corrections, communication, model choice and Claude techniques. You can merge the text into CLAUDE.md or leave it as its own file under .claude/rules/.

Quality rules are checkable: lint and type checks before a commit, tests for whatever you touched, atomic commits on a feature branch instead of main, no hardcoded secrets, no console.log shipped to production. On context, the file bans re-reading files that did not change and asks for a plan when the edit spans several files. Keep fewer than 10 MCP servers on and under 80 tools.

Tool-call budgets are split by job: 20 for a quick fix, 30 for a bug, 50 for a feature, 80 for a large task. One-pass discipline means finishing the solution, testing it and stopping once it is green. Text alone enforces nothing; the Claude section points at hooks when you want automated gates.

What it helps with

  • stop the agent committing code that fails lint or type checks
  • keep commits atomic and off main
  • keep session context from ballooning across many MCP servers
  • cut chatty openers and restated prompts out of replies
  • match the model tier to the job at hand

Example prompts for the agent

  • Add .claude/rules/core-rules.md to CLAUDE.md and follow those rules for this project.
  • Before you commit, run lint and the tests for the files you changed, per core-rules.
  • Plan the change across all three files first, then edit — core-rules style.

How to install core-rules

1Plugin marketplace

/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow

2Manually: put the files in place

.claude/rules/core-rules.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about core-rules

How do I install core-rules in Claude Code?

Run /plugin marketplace add rohitg00/pro-workflow, then /plugin install pro-workflow@pro-workflow. The rule file itself sits at .claude/rules/core-rules.md.

What does core-rules do?

It hands the agent a fixed set of project rules: quality checks before commit, Git habits, context limits, reply style and model choice.

Does core-rules enforce anything on its own?

No. These are instructions the agent follows; the Claude section points at hooks for automated quality gates.

Source text

core-rules.md · MIT
# Core Rules

Universal rules for any project. Add to CLAUDE.md or use as reference.

## Quality
- Run lint/typecheck before commit
- Test affected code
- No console.log in production
- No hardcoded secrets

## Git
- Atomic commits
- Descriptive messages
- Feature branches, not main
- Review before push

## Context
- Read before edit — never write a file you haven't read
- No re-reads — don't re-read unchanged files
- Plan before multi-file
- Compact at milestones
- <10 MCPs enabled
- One-pass discipline: write complete solution, test, stop if green
- Tool-call budgets: 20 (quick fix), 30 (bug fix), 50 (feature), 80 (large)

## Learning
- Capture corrections: [LEARN] Category: Rule
- Update LEARNED.md
- Patterns compound over time

## Communication
- Concise > verbose
- Action > explanation
- Ask when unclear
- Acknowledge mistakes
- No sycophantic openers ("Sure!", "Great question!")
- No closing fluff ("Let me know if you need anything!")
- No prompt restatement before answering
- Code first, explanation after (only if non-obvious)
- ASCII only: -- not em dashes, " not smart quotes

## Performance
- Haiku for quick tasks
- Sonnet for features
- Opus for architecture
- Opus+Thinking for hard bugs

## Claude Code Mastery
Docs: https://code.claude.com/docs/
- Use plan mode for multi-file changes
- Write CLAUDE.md with structure, conventions, rules
- Manage context: /compact at task boundaries, /context to check usage
- Prompts need scope + context + constraints + acceptance criteria
- Build skills for repeated workflows (>3 repetitions)
- Delegate to subagents for parallel exploration
- Keep <10 MCPs, <80 tools
- Use hooks for automated quality gates
- Review security model before handling sensitive data
- See references/claude-code-resources.md for full guide

© Rohit Ghumare · MIT · rohitg00/pro-workflow

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set83

The whole set →
wrap-up The wrap-up skill audits code changes, runs quality checks, and records what to pick up next. Use it when you are about to end a coding session. CX Codex +1 ★ 2,966repo stars incremental-verify incremental-verify keeps the agent on one failing test at a time: the smallest change that passes it, then a commit, before the next behavior starts. CX Codex +1 ★ 2,966repo stars token-efficiency token-efficiency cuts token burn in Claude Code by removing conversational filler, enforcing read-before-write, and stopping unwanted refactoring loops. CX Codex +1 ★ 2,966repo stars scout scout examines a codebase before implementation and rates readiness across five dimensions. Use it to see whether the task is ready to start or needs more investigation. CX Codex ★ 2,966repo stars context-optimizer The context-optimizer command checks context window fill rates in Claude Code and helps cut token waste before responses degrade. CX Codex +1 ★ 2,966repo stars module-map The module-map skill builds a compact map of an unfamiliar codebase area, covering entry points, core modules, data flow, and callers. Use it when you need to get oriented. CX Codex +1 ★ 2,966repo stars parallel Run multiple Claude Code sessions in parallel with isolated git worktrees. Ideal for working on features, testing, and code review simultaneously without file conflicts. CX Codex +1 ★ 2,966repo stars session-handoff session-handoff generates a structured handoff document capturing git state, open tasks, decisions, and a resume prompt for your next session. CX Codex +1 ★ 2,966repo stars

Project sponsors

Companies that keep this analytics open