by lifedever
Coding standards for AI coding assistants. Auto-detect tech stack, generate project rules. Works with Claude Code, Cursor, Antigravity, GitHub Copilot.
# Add to your Claude Code skills
git clone https://github.com/lifedever/claude-rulesLast scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:49:21.678Z",
"npmAuditRan": true,
"pipAuditRan": true
}claude-rules is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by lifedever. Coding standards for AI coding assistants. Auto-detect tech stack, generate project rules. Works with Claude Code, Cursor, Antigravity, GitHub Copilot. It has 175 GitHub stars.
Yes. claude-rules passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/lifedever/claude-rules" and add it to your Claude Code skills directory (see the Installation section above).
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-rules against similar tools.
No comments yet. Be the first to share your thoughts!
English | 中文
Coding standards template library for AI coding assistants. Combine base + language + framework layers to generate a project-specific rules file that keeps AI-generated code clean and consistent.
AI coding assistants tend to mimic existing code style in legacy projects — including bad habits. The core principle of this library:
Don't imitate legacy code. Refactor according to the standards.
Every rule is a concrete, actionable directive (not vague "use proper XX"), with "Bad / Good" code comparison examples.
claude-rules/
├── base/ # Universal (required)
│ ├── core.md # Core principles: legacy code attitude, quality metrics, naming, architecture
│ └── git.md # Git commit message conventions
│
├── languages/ # Pick by language
│ ├── typescript.md # No any/enum/barrel exports, as const, import type
│ ├── javascript.md # ES2022+, JSDoc type annotations, ESM only
│ ├── java.md # Java 17+ record/sealed/pattern matching, Optional
│ ├── kotlin.md # Null safety, structured concurrency, sealed class
│ ├── swift.md # guard let, async/await, actor, Protocol
│ ├── python.md # ruff, type annotations, Protocol, uv/poetry
│ ├── html.md # Semantic tags, accessibility, no div soup
│ ├── css.md # Custom properties, Flexbox/Grid, BEM, modern features
│ ├── go.md # Error wrapping, small interfaces, structured concurrency
│ └── rust.md # Ownership/borrowing, thiserror/anyhow, iterators, Clippy
│
└── frameworks/ # Pick by framework
├── vue.md # script setup, ref vs reactive, composable patterns
├── react.md # Hooks rules, correct useEffect, state layering
├── swiftui.md # @Observable (not legacy ObservableObject), SwiftData
├── springboot.md # Layered architecture, DTO, global exception handling
└── tauri.md # Command design, service encapsulation, security config
┌─────────────────────────────────────────────┐
│ base (required) │ core.md + git.md
│ Legacy code attitude / Quality metrics / │ Applies to all projects
│ Naming / Architecture │
├─────────────────────────────────────────────┤
│ language (pick) │ typescript.md / java.md / ...
│ Type system / Naming conventions / │ Based on project language
│ Language-specific features │
├─────────────────────────────────────────────┤
│ framework (pick) │ vue.md / react.md / ...
│ Component standards / State management / │ Based on project framework
│ Architecture patterns │
└─────────────────────────────────────────────┘
Rule priority: framework > language > base (specific rules override general rules)
# Step 1: Add the marketplace
claude plugin marketplace add lifedever/claude-rules
# Step 2: Install the plugin
claude plugin install init-claude-rules@claude-rules
# Step 3: Restart Claude Code
Open any project in Claude Code and run:
/init-rules
The plugin will:
CLAUDE.md in your project rootWhen new rules are added upstream, update the local cache:
claude plugin marketplace update claude-rules
Then restart Claude Code. To apply updated rules to a project that already has CLAUDE.md, run /init-rules again — the plugin will ask before overwriting.
claude plugin uninstall init-claude-rules@claude-rules
claude plugin marketplace remove claude-rules
Clone this repo and concatenate the rule files you need:
git clone https://github.com/lifedever/claude-rules.git
cd claude-rules
# Example: Vue 3 + TypeScript project
cat base/core.md base/git.md languages/typescript.md frameworks/vue.md > /path/to/project/CLAUDE.md
The rules are plain Markdown and work with any AI coding tool. Just place the output where your tool expects:
| Tool | Target File |
|---|---|
| Claude Code | CLAUDE.md |
| Cursor | .cursorrules or .cursor/rules/*.mdc |
| Antigravity | .antigravity/rules.md |
| GitHub Copilot | .github/copilot-instructions.md |
PRs for new languages or frameworks are welcome. Please follow these guidelines: