Agent skill

Init Rules

by lifedever in lifedever/claude-rules

Initialize or update CLAUDE.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library.

MITAuto-check passedAgent Workflows

Install Init Rules

skills CLI
$ npx skills add lifedever/claude-rules --skill init-rules -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lifedever/claude-rules init-rules --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lifedever/claude-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/init-rules .claude/skills/init-rules && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
init-rules
GitHub stars
193
Token cost
~652 tokens
SKILL.md length
243 words
Files
18
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Initialize or update CLAUDE.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library.

  • Works in 4 steps: Detect Tech Stack → Read Rule Files → Assemble & Write CLAUDE.md → …
  • User says init rules
  • Calls claude
  • Wants to set up coding standards

What it does

Init Rules is an agent skill from lifedever/claude-rules. 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.

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files (for example `base/core.md`, `base/git.md` and `frameworks/react.md`).

It sits in Agent Workflows, covering Code quality and Agent instruction files. It works with TypeScript and Vue.js. The repository describes itself as: Coding standards for AI coding assistants. Auto-detect tech stack, generate project rules. Works with Claude Code, Cursor, Antigravity, GitHub Copilot. The licence is MIT.

When your agent uses it

  • User says init rules
  • Wants to set up coding standards

Example prompts

  • “init rules”
  • “生成 CLAUDE.md”
  • “/init-rules”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Detect Tech Stack
  2. Read Rule Files
  3. Assemble & Write CLAUDE.md
  4. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 6d5f8bd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Init Rules loads about 652 tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 243 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~652

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lifedever/claude-rules at commit 6d5f8bd, republished under its MIT licence (© lifedever). 243 words, ~652 tokens.

Download SKILL.mdSave it as .claude/skills/init-rules/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
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.

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:

SignalRule File
tsconfig.json or *.ts fileslanguages/typescript.md
package.json with "vue" dependencyframeworks/vue.md
package.json with "react" dependencyframeworks/react.md
src-tauri/ directoryframeworks/tauri.md
*.js files without tsconfig.jsonlanguages/javascript.md
*.java files or pom.xmllanguages/java.md
build.gradle.kts or *.kt fileslanguages/kotlin.md
pom.xml/build.gradle with spring-bootframeworks/springboot.md
Package.swift or *.swift fileslanguages/swift.md
Swift files with import SwiftUIframeworks/swiftui.md
pyproject.toml or requirements.txtlanguages/python.md
*.html fileslanguages/html.md
*.css/*.scss fileslanguages/css.md
go.mod or *.go fileslanguages/go.md
Cargo.toml or *.rs fileslanguages/rust.md

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:

  1. ${CLAUDE_SKILL_DIR}/base/core.md
  2. ${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:

  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.

Step 4: Report
  • List included rule files
  • Total line count
  • Remind user to run claude plugin marketplace update claude-rules to get latest rules

© lifedever, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 17 other files in .claude/skills/init-rules of lifedever/claude-rules.

  • SKILL.md
  • base/core.md
  • base/git.md
  • frameworks/react.md
  • frameworks/springboot.md
  • frameworks/swiftui.md
  • frameworks/tauri.md
  • frameworks/vue.md
  • languages/css.md
  • languages/go.md
  • languages/html.md
  • languages/java.md
  • languages/javascript.md
  • languages/kotlin.md
  • languages/python.md
  • languages/rust.md
  • languages/swift.md
  • languages/typescript.md

Open the folder on GitHubat commit 6d5f8bd

Compare with similar skills

Init Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Init Rules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Init Rules this skilllifedever/claude-rules193—~652Automated safety check: PassMIT
OpenObserve ESLint and TypeScript Fixesopenobserve/openobserve22k—~5.1kAutomated safety check: PassAGPL-3.0
Harness Engineering GuideOdradekAI/harness-engineering-guide1251 repos~4.3kAutomated safety check: PassApache-2.0
Agent Setup Health Audittw93/Waza7.2k—~5.2kAutomated safety check: NotesMIT
Bringupjenissimo/bottleship131—~2.9kAutomated safety check: PassApache-2.0
Documentationsamchon/typia5.9k—~1.1kAutomated safety check: PassMIT

Similar skills

  • A playbook for fixing ESLint and TypeScript errors in the OpenObserve web frontend, with rule-by-rule guidance and typing conventions.

    22k GitHub stars~5.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Harness Engineering Guide

    OdradekAI/harness-engineering-guide

    Audit, design, and implement AI agent harnesses for any codebase.

    125 GitHub starsUsed in 1 repo~4.3k tokens
    Agent WorkflowsAuto-check passed
  • Audits a project's agent configuration, instruction drift, hooks, MCP and AI maintainability, then reports prioritized findings with evidence and next actions.

    7.2k GitHub stars~5.2k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Bringup

    jenissimo/bottleship

    Drive and observe the BottleShip emulator to bring up a game, using the AI-agent harness (window.BS.harness + bun tools/harness.ts).

    131 GitHub stars~2.9k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Documentation

    samchon/typia

    Defines README, website-guide, and agent-instruction structure, audience, prose formatting, and voice for typia.

    5.9k GitHub stars~1.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Mariadb Operator PR Review

    mariadb-operator/mariadb-operator

    Perform a structured maintainer-style PR review for the mariadb-operator repository.

    1k GitHub stars~3.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

Questions about Init Rules

What does Init Rules do?

Initialize or update CLAUDE.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library. Init Rules is an agent skill from lifedever/claude-rules.md coding standards for any project by auto-detecting tech stack and assembling rules from the claude-rules template library.

When should I use Init Rules?

Init Rules fits situations like: user says init rules; wants to set up coding standards.

How do I install Init Rules in Claude Code?

Run `npx skills add lifedever/claude-rules --skill init-rules -a claude-code`. Or copy the skill folder (.claude/skills/init-rules in lifedever/claude-rules) into .claude/skills/init-rules in your project. Claude Code loads it when a task matches its description.

How do I install Init Rules in Codex?

Run `npx skills add lifedever/claude-rules --skill init-rules -a codex`. Or copy the skill folder (.claude/skills/init-rules in lifedever/claude-rules) into .agents/skills/init-rules in your project. Codex loads it when a task matches its description.

Can I use Init Rules in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lifedever/claude-rules --skill init-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/init-rules, .gemini/skills/init-rules, .github/skills/init-rules and .opencode/skills/init-rules in your project.

What does Init Rules need to run?

Going by SKILL.md and its folder, Init Rules needs the command-line tools its instructions call (claude).

Does Init Rules access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Init Rules safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Init Rules use?

Init Rules is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Init Rules use?

About 652 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Init Rules?

Skills that share tags, products or a category with Init Rules: OpenObserve ESLint and TypeScript Fixes (openobserve/openobserve, 22k stars), Harness Engineering Guide (OdradekAI/harness-engineering-guide, 125 stars), Agent Setup Health Audit (tw93/Waza, 7.2k stars) and Bringup (jenissimo/bottleship, 131 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Init Rules?

lifedever (a GitHub user) maintains it in lifedever/claude-rules, which has 193 GitHub stars. The repository was last updated on March 19, 2026.

Source: lifedever/claude-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.