Pi Rules — Development skill for Claude Code
Rule context loader extension for the pi coding agent.
How to install Pi Rules
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open code-yeongyu/pi-rules and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Pi Rules does
Rule context loader extension for the pi coding agent.
Alternatives in Development
- Claude Coder — Kodu is an autonomous coding agent that lives in your IDE 5.2k ★
- Ruler — Ruler — apply the same rules to all coding agents 2.9k ★
- Gemini Project Context For SaneBar — PRIMARY INSTRUCTION: This project uses a shared configuration with Claude 216 ★
README
pi-rules
[](https://github.com/code-yeongyu/pi-rules/actions/workflows/ci.yml) [](LICENSE) [](https://www.npmjs.com/package/@code-yeongyu/pi-rules)
Rule context loader for the [pi coding agent](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent). Discovers rule files from `.omo/rules/`, `.claude/rules/`, `.cursor/rules/`, `.github/instructions/`, `AGENTS.md`, `CLAUDE.md`, and injects them into the agent context.
Origin
pi-rules is inspired by [oh-my-openagent (omo)](https://github.com/code-yeongyu/oh-my-openagent) `.omo/rules/` and opencode's `AGENTS.md` / `CLAUDE.md` instruction file mechanisms.
- omo at https://github.com/code-yeongyu/oh-my-openagent is by Yeongyu Kim, originally SUL-1.0.
- This package is an independent pi-coding-agent extension by the same author.
- Source distributed here is MIT (see LICENSE and NOTICE).
- The logic is structurally similar to omo's rules-injector hook, adapted to pi-mono's ExtensionAPI hooks (
before_agent_start,tool_result).
Quick Demo
$ pi -e ./src/index.ts
[pi-rules] 5 active rules
> Read src/auth/login.ts
✓ src/auth/login.ts (1.2KB)
[pi-rules] +2 instructions injected (security.md, typescript.md)
Installation
The package targets the [`pi`](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent) coding agent. Pi loads extensions from `~/.pi/agent/extensions/`, project `.pi/extensions/`, or via the `--extension` / `-e` CLI flag.
Pick whichever route fits:
# 1. From npm (once published)
pi install npm:@code-yeongyu/pi-rules
# 2. From git (once the repository is pushed)
pi install git:github.com/code-yeongyu/pi-rules
# 3. Manual placement (always works)
Related Skills
Save Rule
Authorize the next Write/Edit to a CLAUDE.md file (operator rules / project context). Writes a single-use mark
Stop Rules
Holds your coding agent to your team's written coding rules. A stop hook for Claude Code, Codex, Cursor and te
Sync Gate
管理本项目的 rule 12 同步门禁(sync-gate.toml)—— init / list / check / add / remove / path。check 会报出「被 loader 丢弃的组」与「打不中任
Pi Squad Loader
GSD-PI extension that loads the Squads ecosystem as native Pi SDK subagents
Slopbrake
Brakes for the software factory: deterministic checks, a fresh-context reviewer that commits its fixes, and on
Cold Start
Run the vault cold-start ritual (the context-loader skill at 99-Meta/skills/vault/context-loader.md):
Related Agents
Hatch3r Learnings Loader
Session-start agent that surfaces relevant project learnings, recent decisions, and context from previous sess
Rule Advisor
Selects optimal rulesets for tasks and performs metacognitive analysis. Use PROACTIVELY before implementation
File Classifier
Attribution judge for files the rule-based classifier could not decide. Works from the filename alone — extens