init-rules

Installs curated development rules into project or global Claude configuration files.

2|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/DoctorMozg/claude-pipelines --skill init-rules-doctormozg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init-rules
Source: https://github.com/DoctorMozg/claude-pipelines/tree/main/plugins/mz-dev-base/skills/init-rules
Command: npx skills add https://github.com/DoctorMozg/claude-pipelines --skill init-rules-doctormozg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up consistent AI coding rules across projects is repetitive and error-prone. This Skill detects your project's language and tooling, then installs a curated set of development rules either as individual rule files or injected into CLAUDE.md with idempotent sentinel blocks. ## Core Features & Use Cases - Context-aware rule selection: Scans for Python, TypeScript, JavaScript, Rust, Go, C++, Java, git, and pre-commit signals to pick relevant rules on top of a universal baseline set. - Two delivery modes: Write rule files into .claude/rules/ (with path-scoped frontmatter preserved) or inject sentinel-wrapped blocks into CLAUDE.md for clean re-runs and uninstalls. - Safe lifecycle management: Supports --force overwrites, mode-aware --uninstall, an approval gate before any CLAUDE.md modification, and persistent state tracking in .mz/task/. - Use Case: Onboarding a new Python project — run the skill and it detects pyproject.toml, installs universal rules plus Python strict-typing and pre-commit conventions, and reports exactly what was installed, replaced, or skipped. ## Quick Start Ask the assistant to set up development rules for this project, for example by saying "init rules for this project" or "install coding rules globally into CLAUDE.md".

Frequently Asked Questions about init-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install coding rules for Claude Code in a project?

Invoke the init-rules skill with project scope, which is the default. It detects your language stack, writes rule files into .claude/rules/, and reports what was installed, replaced, or skipped.

What is the difference between rules mode and claudemd mode?

Rules mode writes individual files into .claude/rules/ and preserves path-scoped frontmatter. Claudemd mode injects rule content directly into CLAUDE.md wrapped in sentinel blocks, but cannot path-scope rules and requires an approval gate before writing.

Can I uninstall rules that were previously installed?

Yes, pass the --uninstall flag. In rules mode it deletes only bundled rule files it installed; in claudemd mode it lists every sentinel block found and removes them after confirmation, never deleting CLAUDE.md itself.

Does init-rules overwrite my existing CLAUDE.md content?

No. It only modifies content inside its own sentinel blocks and preserves everything outside them. Existing blocks are skipped unless you pass --force, and all writes require explicit approval first.

Which languages and tools does rule detection support?

Detection covers Python, TypeScript, JavaScript, Rust, Go, C++, and Java via manifest files and extensions, plus git and pre-commit via .git and .pre-commit-config.yaml. Conditional rules like strict typing are added only when the matching stack is detected.