brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Initialize or update CLAUDE.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library. Use when user says "init rules", "初始化规范", "生成 CLAUDE.md", or wants to set up coding standards.
Claude Code
$ npx -y skills add lifedever/claude-rules --skill init-rules --agent claude-code
Codex
$ npx skills add lifedever/claude-rules --skill init-rules -a codex -y
Cursor
$ npx skills add lifedever/claude-rules --skill init-rules -a cursor -y
Gemini CLI
$ npx skills add lifedever/claude-rules --skill init-rules -a gemini-cli -y
GitHub Copilot
$ npx skills add lifedever/claude-rules --skill init-rules -a github-copilot -y
OpenCode
$ npx skills add lifedever/claude-rules --skill init-rules -a opencode -y
Windsurf
$ npx skills add lifedever/claude-rules --skill init-rules -a windsurf -y
name: init-rules description: > Initialize or update CLAUDE.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library. Use when user says "init rules", "初始化规范", "生成 CLAUDE.md", or wants to set up coding standards.
IMPORTANT: You MUST read rule files from this skill's bundled files. Do NOT generate rules from your own knowledge.
Rule files are bundled in this skill's directory. Use `${CLAUDE_SKILL_DIR}` to reference them.
Scan the current working directory to identify languages and frameworks:
| Signal | Rule File | |--------|-----------| | `tsconfig.json` or `*.ts` files | `languages/typescript.md` | | `package.json` with `"vue"` dependency | `frameworks/vue.md` | | `package.json` with `"react"` dependency | `frameworks/react.md` | | `src-tauri/` directory | `frameworks/tauri.md` | | `*.js` files without `tsconfig.json` | `languages/javascript.md` | | `*.java` files or `pom.xml` | `languages/java.md` | | `build.gradle.kts` or `*.kt` files | `languages/kotlin.md` | | `pom.xml`/`build.gradle` with `spring-boot` | `frameworks/springboot.md` | | `Package.swift` or `*.swift` files | `languages/swift.md` | | Swift files with `import SwiftUI` | `frameworks/swiftui.md` | | `pyproject.toml` or `requirements.txt` | `languages/python.md` | | `*.html` files | `languages/html.md` | | `*.css`/`*.scss` files | `languages/css.md` | | `go.mod` or `*.go` files | `languages/go.md` | | `Cargo.toml` or `*.rs` files | `languages/rust.md` |
Present detection results and ask user to confirm or adjust before proceeding.
Read files from this skill's bundled directory using the Read tool.
Always read: 1. `${CLAUDE_SKILL_DIR}/base/core.md` 2. `${CLAUDE_SKILL_DIR}/base/git.md`
Then read each detected language and framework file, e.g.:
Concatenate ALL fetched content in this exact order:
1. `<!-- Generated by init-claude-rules | https://github.com/lifedever/claude-rules -->` 2. Empty line 3. Content of `base/core.md` 4. Content of `base/git.md` 5. Each detected language file 6. Each detected framework file
Write to `CLAUDE.md` in the current working directory.
If CLAUDE.md already exists, warn user and ask before overwriting.
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.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.