Skip to content
patextremePublic

About

A personal toolkit for coding agents — the quality-of-life bits I kept wanting.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Agent Mod

Extensions, prompt templates, and skills for the Pi coding agent.

Each extension documents its own behavior, configuration, and caveats in a README beside its code; this page covers what ships, how to install it, and how to work on the repository.

Requirements

Installation

pi install git:github.com/patextreme/agent-mod

This registers the prompt templates and skills declared in package.json. The extensions are not part of the pi install package; build them from the flake outputs instead (see Nix Packages).

Contents

Extensions

Each extension is a Nix flake output named pi-<name> and is not installed by pi install.

Extension What it does
Permission Intercepts bash tool calls, asks before destructive commands, reports blocked panes to Herdr, and offers an opt-in session-scoped /permission-yolo bypass
Ollama Usage Shows Ollama Cloud session and weekly usage in the status bar
OpenCode Usage Shows OpenCode Go rolling, weekly, and monthly allowance usage in the status bar
Codex Alias Registers openai-codex-secondary as an independently authenticated alias of the built-in openai-codex provider, so two Codex accounts share one agent directory
Notify Me Arms a session-scoped, one-shot Discord reminder for final handback, with its configuration, privacy, and retry contracts

Prompt Templates

Prompt Description
init Create or update AGENTS.md for a repository

Skills

Skill Description
pr-review-repair Coordinate fresh two-axis PR review, history-aware judgment, repair, and publication

Nix Packages

Extensions are distributed as flake outputs rather than through pi install:

nix build .#pi-permission
nix build .#pi-ollama-usage
nix build .#pi-opencode-usage
nix build .#pi-codex-alias
nix build .#pi-notify-me

Each output is a directory containing the extension, ready to load with Pi's extension path option. The flake also exposes pi-prompts and pi-skills.

It additionally exposes pi-acp, an ACP stdio adapter for Pi, ported from Ptah with its MCP-support patch:

nix build .#pi-acp
./result/bin/pi-acp

Pi must be installed separately and available on PATH, or selected with PI_ACP_PI_COMMAND. This is a standalone Nix package, not part of pi install, and is not added to the development shell. nix flake check builds it and runs its upstream and patch tests.

Skill toolkit

pr-review-repair needs an enhanced Pi host: stock Pi alone is not sufficient, and installation exposes instructions plus bundled references, not an orchestration runtime or credentials. Before invoking it, prepare:

  • Delegation — Agent and codemode in the main session with general-purpose workers; the external code-review workers need nested Agent access for their two review axes.
  • External skill — supply code-review yourself; it is not bundled. Resolve its real location and pass the absolute path plus repository/worktree context to delegates.
  • Delivery access — Git and authenticated gh access to PRs, issues, checks, pushes, and comments, plus commit signing and DCO sign-off. Target-project policy stays controlling.

Invocation authorizes qualifying edits and publication — commits, normal pushes, and verified PR history comments — not merges or a tool-permission bypass. Read the skill for prerequisites, round boundaries, and the ten-attempt budget; it ships the complete MIT notice. Frontmatter, packaging, and discovery checks give static distribution assurance only — not live operational safety, model obedience, or stock-Pi runtime support.

Development

npm install            # install deps
npm run format         # biome format --write .
npm run lint           # biome lint .
npm run check          # biome check . (lint + format check combined)
npm run typecheck      # tsc --noEmit
npm test               # node tests/run.mjs (discovery-based gate runner)
nix flake check        # nix build checks (biome, tsc, node-tests, package builds)

Gate tests are discovered by convention — there are no registration lists to update. The two placement rules: unit tests live beside their extension module (extensions/<name>/<name>.test.ts), and ownerless repository contracts live under tests/gates/*.test.mjs. A file at either recognized root runs in every gate execution, locally and in the hermetic node-tests Nix check; a file anywhere else does not run.

Requires biome, node, and typescript in PATH. Use nix develop (provides all tooling) or install globally.

Before committing changes that touch package*.json or nix/, also run nix flake check — it mirrors the JS checks and catches stale npmDepsHash values after dependency changes.

Retired tooling

The acpx flows and OpenSpec workflow skills are gone as breaking changes with no in-repo replacement; pr-review-repair is the surviving skill. See retired tooling for the removed names.

License

MIT — see LICENSE. The imported skill and its references bundle their own complete copy: skills/LICENSE.

About

A personal toolkit for coding agents — the quality-of-life bits I kept wanting.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages