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
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowWhat 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.mdtoCLAUDE.mdand 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-workflow2Manually: put the files in place
.claude/rules/core-rules.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/core-rules.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/core-rules.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/core-rules.mdManually: put the files in place
.clinerules/core-rules.mdStep 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