Skip to main content
rule

000-core-principles — rule for Claude Code: coding foundations

000-core-principles — a rule that enforces four principles: understand the task before coding, choose the simplest solution, build security from the start, design all code to be testable. Applies to all files and conversations in your IDE.

MIT ★ 97 updated 2026-06-11

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/000-core-principles.mdc
Open on GitHub

What 000-core-principles does

The rule has four sections. First: clarify requirements before writing code and never start without clear goals. Second: pick the simplest working solution—complex patterns need explicit justification, readable code beats clever code. Third: validate all inputs, keep secrets out of code, use defense in depth, apply least privilege. Fourth: design code to be testable from the beginning, write tests as you code, verify before committing.

The rule applies globally to all files and conversations in the editor. Installation paths differ between Cursor, Claude Code, GitHub Copilot, and Cline, but the content stays the same.

What it helps with

  • Clarify what needs to be built before you start writing
  • Pick the simplest solution instead of over-engineering
  • Add security checks from the first draft, not after
  • Plan tests alongside code, not after the fact

Example prompts for the agent

  • Help me understand what exactly needs to be built: ask clarifying questions before writing the function
  • Show me the simplest way to solve this problem, no unnecessary abstractions
  • Check the code for hardcoded secrets and missing input validation

How to install 000-core-principles

Manually: put the files in place

.cursor/rules/000-core-principles.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about 000-core-principles

How do I install 000-core-principles?

Copy the file to your editor's rules folder. For Claude Code: .claude/rules/000-core-principles.md, for Cursor: .cursor/rules/000-core-principles.mdc, for GitHub Copilot: .github/instructions/000-core-principles.instructions.md, for Cline: .clinerules/000-core-principles.md.

What does this rule do?

It sets four principles: understand requirements before coding, choose simple solutions, build security in from the start, and design code to be testable.

Does this rule apply to all files in my project?

Yes, it's global—it works across all files and conversations in your editor because the config has alwaysApply: true.

Source text

000-core-principles.mdc · MIT
---
description: Core coding principles applied to all files and conversations
globs:
alwaysApply: true
---

# Core Coding Principles

## Clarify Before Coding
Understand requirements before writing code. Ask questions when intent is unclear. No code without clear goals.

## Simplicity First
Choose the simplest viable solution. Complex patterns need explicit justification. Readable code over clever code.

## Security By Default
Validate all inputs. No secrets in code. Defense in depth. Least privilege principle.

## Test-Driven Thinking
Design all code to be testable from inception. Write tests alongside code. Verify before committing.

© obviousworks · MIT · obviousworks/vibe-coding-ai-rules

Similar IDE rules

All IDE rules for Code review and refactoring →

From the same set7

Project sponsors

Companies that keep this analytics open