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.
> /plugin marketplace add lifedever/claude-rules> /plugin install init-claude-rules@claude-rules
Repo: lifedever/claude-rules
What's inside
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:
.claude/
.claude-plugin/
marketplace.json
plugin.json
skills/
init-rules/
base/
core.md
git.md
frameworks/
react.md
springboot.md
swiftui.md
tauri.md
vue.md
languages/
css.md
go.md
html.md
java.md
javascript.md
kotlin.md
python.md
rust.md
swift.md
typescript.md
SKILL.md
.github/
FUNDING.yml
workflows/
pages.yml
base/
core.md
git.md
docs/
index.html
frameworks/
react.md
springboot.md
swiftui.md
tauri.md
vue.md
languages/
css.md
go.md
html.md
java.md
javascript.md
kotlin.md
python.md
rust.md
swift.md
typescript.md
LICENSE
README_CN.md
README.mdFAQ
init-claude-rules is a Claude Code plugin with 1 hand-picked skill for development work, indexed on Flowy. Install it with the command on its page. It includes init-rules. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.