code-yeongyu

Pi Rules — Development skill for Claude Code

Development community

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

[![ci](https://github.com/code-yeongyu/pi-rules/actions/workflows/ci.yml/badge.svg)](https://github.com/code-yeongyu/pi-rules/actions/workflows/ci.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![npm](https://img.shields.io/badge/npm-%40code--yeongyu%2Fpi--rules-red)](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)