← Catalog

pi-manipulate

Aggressive manipulation tools for Pi

Extension

Install

Install with PiG

pig install npm:pi-manipulate

Install with Pi

pi install npm:pi-manipulate
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.3 (README.md). PiG does not review it.

pi-manipulate

npm version npm downloads license

Aggressive manipulation tools for Pi.

Installation

pi install npm:pi-manipulate

Features

Custom instructions

Here, 'instructions' refers to the assembled system prompt, named after its corresponding payload field. When this feature is enabled (by default), the instructions file replaces the assembled system prompt. Any built-in or extension instructions parts are blocked. The example parts are:

  • The system prompt (can be specified by --system-prompt or SYSTEM.md)
  • The available skills (wrapped in <skills>)
  • The current working directory (wrapped in <cwd>)

Custom instructions are checked in the following order of priority:

  • pi --instructions <file> — Highest priority instructions
  • ./.pi/INSTRUCTIONS.md — Project-level instructions
  • ~/.pi/agent/INSTRUCTIONS.md — User-level instructions

In-session commands are available:

  • /manip-instr on — Enable the custom instructions
  • /manip-instr off — Disable the custom instructions
  • /manip-instr before — View the original instructions
  • /manip-instr after — View the custom instructions

Notably, the underlying session data remains untouched. Since built-in or extension prompts may still be injected into the request as 'system' or 'developer' role messages, this extension filters them out before sending requests to the model.

Motivation for this feature:

Frontier models no longer need hand-holding to perform well, making verbose instructions both a distraction and a waste of tokens. Since Pi and its extensions collectively assemble the final prompt, keeping instructions clean is challenging. By intercepting the payload sent to the provider, this extension gives you absolute control over the final instructions, letting you retain extension tools and features without their prompt bloat.

License

MIT