AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Init Rules

skill-doctormozg-claude-pipelines-init-rules · by DoctorMozg

ALWAYS invoke when the user wants to install development rules for a project or globally. Triggers:"init rules","set up rules","install rules","configure coding rules","onboard project".

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-doctormozg-claude-pipelines-init-rules

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-doctormozg-claude-pipelines-init-rules)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Init Rules? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Init Rules

Overview

Install curated development rules based on detected project context. Two delivery modes:

  • --target=rules (default) — write rule files into .claude/rules/ (project) or ~/.claude/rules/ (global). Files with paths: frontmatter stay path-scoped.
  • --target=claudemd — inject rule content directly into ./CLAUDE.md (project) or ~/.claude/CLAUDE.md (global), wrapped in sentinel blocks for idempotent re-runs and clean uninstall.

When to Use

Triggers: "init rules", "set up rules", "install rules", "configure coding rules", "onboard project".

When NOT to use

  • The user wants to edit rule content itself — open the rule file directly.
  • The user wants per-file rule scoping — use --target=rules; claudemd mode cannot path-scope.
  • The target directory or CLAUDE.md is managed by another tool and should not be touched.

Arguments

  • project (default) → scope to working directory
  • global → scope to ~/.claude/
  • --target=rules (default) → write as individual rule files
  • --target=claudemd → inject into CLAUDE.md with sentinel blocks
  • --force → overwrite existing rule files / replace existing sentinel blocks
  • --uninstall → remove rules previously installed by this skill (mode-aware)

Parse from $ARGUMENTS. Unknown or conflicting tokens → AskUserQuestion; never guess.

Core Process

| Phase | Goal | Details | | ----- | ---------------------------- | --------------- | | 0 | Setup + user approval | Inline below | | 1 | Install / update / uninstall | phases/run.md |

Phase 0: Setup

  1. Parse $ARGUMENTS: scope (project/global), target (rules/claudemd), --force, --uninstall. Unknown token → AskUserQuestion.
  2. task_name = _init_rules__ where ` is today's date (underscores); on same-day collision append v2, v3`.
  3. Create .mz/task//.
  4. Write state.md with schema_version: 2, Status: running, Phase: 0, Started: , phase_complete: false, what_remains: [], Scope: , Target: , Force: , Uninstall: , DetectedContexts: [], Installed: [], Replaced: [], Skipped: [], Removed: []. schema_version: 2 is the first line of the file.
  5. Emit setup block: task_name, resolved target path, mode flags.

For --target=claudemd installs, the approval gate in Phase 1 Step 4b must run before any write. A single run-level confirmation covers all subsequent writes in the run.

Read phases/run.md and proceed to Phase 1.

Techniques

Techniques: delegated to phase files — see Phase Overview table above.

Common Rationalizations

N/A — collaboration/reference skill.

Red Flags

Red Flags: delegated to phase files — see Phase Overview table above.

Verification

Verification: delegated to phase files — see Phase Overview table above.

Error Handling

  • Empty / ambiguous argument → AskUserQuestion; never guess.
  • Missing tooling — if ${CLAUDE_PLUGIN_ROOT} is unset or the bundled rules/ directory is not readable, AskUserQuestion with the failing path.
  • No detected contexts → still install universal rules; if target not writable, retry once then AskUserQuestion.
  • CLAUDE.md unreadable or unwritable → AskUserQuestion with the exact path and error; do not fall back silently.
  • Duplicate sentinel IDs found in CLAUDE.md (manual edit or prior bug) → stop, report the conflicting lines, ask the user to resolve before re-running.
  • Plugin version unreadable → use literal unknown for the version tag and note it in the report.
  • Never guess — any ambiguity escalates via AskUserQuestion rather than silent overwrite or skip.

State Management

After each phase, update .mz/task//state.md with:

  • Status: running | complete | aborted_by_user | failed
  • Phase: current phase number
  • DetectedContexts: list of detected language/tooling tags
  • Installed: / Replaced: / Skipped: / Removed: filenames or rule ids touched in this run

Never rely on conversation memory for cross-phase state — context compaction destroys specific paths and decisions.

State persists to .mz/task//state.md. Schema is v2: the file's first line is schema_version: 2, and alongside the skill's existing Status / Phase / Started keys it carries phase_complete (boolean) and what_remains (YAML list of strings). Set phase_complete: false on phase entry and true once the phase's artifacts are written and its gates pass; refresh what_remains on every phase transition; what_remains MUST be [] when Status: complete. On reading a schema_version: 1 or unversioned file, add the missing keys, set schema_version: 2, and log the upgrade.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.