init-rules
install
source · Clone the upstream repo
git clone https://github.com/lifedever/claude-rules
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/lifedever/claude-rules "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/init-rules" ~/.claude/skills/lifedever-claude-rules-init-rules && rm -rf "$T"
manifest:
.claude/skills/init-rules/SKILL.mdsource content
Init Claude Rules
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.
Workflow
Step 1: Detect Tech Stack
Scan the current working directory to identify languages and frameworks:
| Signal | Rule File |
|---|---|
or files | |
with dependency | |
with dependency | |
directory | |
files without | |
files or | |
or files | |
/ with | |
or files | |
Swift files with | |
or | |
files | |
/ files | |
or files | |
or files | |
Present detection results and ask user to confirm or adjust before proceeding.
Step 2: Read Rule Files
Read files from this skill's bundled directory using the Read tool.
Always read:
${CLAUDE_SKILL_DIR}/base/core.md${CLAUDE_SKILL_DIR}/base/git.md
Then read each detected language and framework file, e.g.:
${CLAUDE_SKILL_DIR}/languages/typescript.md${CLAUDE_SKILL_DIR}/frameworks/vue.md
Step 3: Assemble & Write CLAUDE.md
Concatenate ALL fetched content in this exact order:
<!-- Generated by init-claude-rules | https://github.com/lifedever/claude-rules -->- Empty line
- Content of
base/core.md - Content of
base/git.md - Each detected language file
- Each detected framework file
Write to
CLAUDE.md in the current working directory.
If CLAUDE.md already exists, warn user and ask before overwriting.
Step 4: Report
- List included rule files
- Total line count
- Remind user to run
to get latest rulesclaude plugin marketplace update claude-rules