Skip to content
Back to search

pi-amplike

Pi skills to replicate AmpCode experience - handoffs, modes, permissions, web access

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pasky--pi-amplike/badge.svg)](/listings/pasky--pi-amplike)

HTML

<a href="/listings/pasky--pi-amplike"><img src="/api/listings/pasky--pi-amplike/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Option A: Install from npm (recommended)

pi install npm:pi-amplike

Option B: Install from git

pi install https://github.com/pasky/pi-amplike

Option C: Local development

git clone https://github.com/pasky/pi-amplike ~/.pi/packages/pi-amplike
cd ~/.pi/packages/pi-amplike
npm install

Then add `"packages/pi-amplike"` to the `"packages"` array in `~/.pi/agent/settings.json`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 208 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # pi-amplike
  2. [Pi](https://github.com/badlogic/pi-mono) skills and extensions that give Pi similar capabilities to [Amp Code](https://ampcode.com/) out of the box.
  3. <p align="center">
  4. <img src="demo.gif" alt="Pi subagents and /btw in action" width="700" />
  5. </p>
  6. ## Features
  7. ### Session Management
  8. - **Handoff** - Create a new focused session with AI-generated context transfer:
  9. - **`/handoff <goal>`** command - Manually create a handoff session (potentially with `-mode <name>` / `-model <name>` parameter to switch models for the new session)
  10. - **`handoff` tool** - The agent can invoke this (with optional `mode`/`model` parameters) when you explicitly request a handoff
  11. - **`session_query`** tool - The agent in handed-off sessions automatically gets the ability to query the parent session for context, decisions, or code changes; analysis uses the queried session's own model
  12. - Use `/resume` to switch between and navigate handed-off sessions
  13. ### Subagents and BTW
  14. - **`subagent`** tool - The agent can create one or multiple parallel task-focused, non-interactive subagents to save context and speed up work
  15. - **`/btw <prompt>`** command - Same semantics as in Claude Code, basically a user-triggered subagent running and finishing asynchronously and independently on the main agent
  16. ### Permissions
  17. - **`/permissions`** command toggles bash command allow/deny permissions, directly read from AmpCode's configuration files.
  18. ### Prompt Modes
  19. - **`/mode`** command with interactive mode selector/configuration UI (a mode is a model + thinking + color preset, active mode is shown in prompt editor border)
  20. - **Shortcuts**:
  21. - **`Ctrl+Shift+S`** - mode selector
  22. - **`Ctrl+Space`** - cycle modes
  23. ### Web Access
  24. - **web-search** - Search the web via Jina Search API
  25. - **visit-webpage** - Extract webpage content as markdown (using Jina API), or download images
  26. ### Amp Skill Compatibility
  27. - Auto-loads Amp skill directories when present:
  28. - `~/.config/agents/skills`
  29. - `~/.config/amp/skills`
  30. - `.agents/skills` (project-local)
  31. ## Installation
  32. ### Option A: Install from npm (recommended)
  33. ```bash
  34. pi install npm:pi-amplike
  35. ```
  36. ### Option B: Install from git
  37. ```bash
  38. pi install https://github.com/pasky/pi-amplike
  39. ```
  40. ### Option C: Local development
  41. ```bash
  42. git clone https://github.com/pasky/pi-amplike ~/.pi/packages/pi-amplike
  43. cd ~/.pi/packages/pi-amplike
  44. npm install
  45. ```
  46. Then add `"packages/pi-amplike"` to the `"packages"` array in `~/.pi/agent/settings.json`.
  47. ## Setup
  48. Get a Jina API key for web skills (optional, works with rate limits without it):
  49. ```bash
  50. export JINA_API_KEY="your-key" # Add to ~/.profile or ~/.zprofile
  51. ```
  52. Get an API key at [jina.ai](https://jina.ai/). Even if you charge only the minimum credit, it's going to last approximately forever.
  53. ## Usage
  54. ### Session Handoff
  55. When your conversation gets long or you want to branch off to a focused task, you can use handoff in two ways:
  56. **Manual handoff via command:**
  57. ```
  58. /handoff now implement this for teams as well
  59. /handoff -mode rush execute phase one of the plan
  60. /handoff -model anthropic/claude-haiku-4-5 check other places that need this fix
  61. ```
  62. Optional flags (can be combined):
  63. - `-mode <name>` — start the new session in a named mode (e.g. `rush`, `smart`, `deep`)
  64. - `-model <provider/id>` — start the new session with a specific model (e.g. `anthropic/claude-haiku-4-5`)
  65. Without these flags, `/handoff` keeps the current model and thinking level in the new session.
  66. The handoff summary is always generated with the *current* session's model before switching.
  67. **Agent-invoked handoff:**
  68. The agent can also initiate a handoff when you explicitly ask for it:
  69. ```
  70. "Please hand this off to a new session to implement the fix"
  71. "Create a handoff session to execute phase one"
  72. ```
  73. The `handoff` tool also accepts optional `mode` and `model` parameters.
  74. Both methods create a new session with:
  75. - AI-generated summary of relevant context from the current conversation
  76. - List of relevant files that were discussed or modified
  77. - Clear task description based on your goal
  78. - Reference to parent session (accessible via `session_query` tool)
  79. #### Session Navigation
  80. Use Pi's built-in `/resume` command to switch between sessions, including handed-off sessions. The handoff creates sessions with descriptive names that make them easy to find.
  81. #### Querying Past Sessions
  82. The `session_query` tool lets the model look up information from previous sessions. It's automatically used when a handoff includes parent session reference, but can also be invoked directly. The analysis call uses the queried session's own model (falling back to the current model if unavailable):
  83. ```
  84. session_query("/path/to/session.jsonl", "What files were modified?")
  85. session_query("/path/to/session.jsonl", "What approach was chosen?")
  86. ```
  87. ### Subagents
  88. Ask your agent to "use subagents to ..." whenever you know you have a context-hungry task ahead that you would like to run isolated from the main context window.
  89. Subagents run their own `AgentSession` with **no extensions loaded** — extensions keep module-level state and register on a shared runtime, so binding the whole set inside a second in-process session corrupts the parent's. If you have an extension that *configures* a session (the typical case: picking the system prompt for the model's provider), opt it in explicitly in `~/.pi/agent/amplike.json`:
  90. ```json
  91. {
  92. "subagent": {
  93. "extensions": ["extensions/provider-system-prompt.ts"]
  94. }
  95. }
  96. ```
  97. This is pi's own `--no-extensions --extension <path>` semantics: nothing is discovered, only what you list is loaded. It runs inside the subagent session, so it sees the subagent's own model — which is the point, since a subagent may run a different model than the session that spawned it. Relative paths resolve against `~/.pi/agent`, `~` is expanded, and load failures are reported in the subagent's output. Only opt in extensions that keep no per-session state at module scope (pi caches extension factories per path, so the parent session and the subagent share one module instance).
  98. When your agent is working on something and you suddenly got a question, use `/btw` to ask it. Of course, you can even ask multiple questions in parallel. The `/btw` subagent is ephemeral like tool subagents, but unlike tool subagents it sees the full contxt of your session (besides the fact that it can also use tools to read files).
  99. ### Permissions
  100. The permissions extension enforces Amp-style bash command permissions automatically. Use the `/permissions` command to toggle modes:
  101. ```
  102. /permissions # toggles between enabled and yolo
  103. ```
  104. - **enabled** (default): Amp permission rules from `~/.config/amp/settings.json` are enforced
  105. - **yolo**: All bash commands are allowed without any checks; `YOLO mode` shown in status bar
  106. The selected mode is persisted in `~/.pi/agent/amplike.json` and restored on the next pi invocation.
  107. ### Prompt Modes
  108. ```text
  109. /mode # mode picker
  110. /mode configure # open mode configuration UI
  111. /mode <name> # switch directly
  112. /mode store <name> # store current model+thinking into a mode
  113. ```
  114. Notes:
  115. - The extension bootstraps with default modes are `rush`, `smart`, and `deep`; they somewhat mirror Amp defaults.
  116. - Modes config is loaded from `.pi/modes.json` (project), falling back to `~/.pi/agent/modes.json` (global).
  117. - Deleting all modes or setting `"modes": {}` in your modes file disables mode overlay behavior (shortcuts + editor mode border), while keeping `/mode` config UI available.
  118. ### Web Search
  119. ```bash
  120. ~/.pi/packages/pi-amplike/skills/web-search/search.py "python async tutorial"
  121. ```
  122. ### Visit Webpage
  123. ```bash
  124. ~/.pi/packages/pi-amplike/skills/visit-webpage/visit.py https://docs.example.com/api
  125. ```
  126. ## Components
  127. | Component | Type | Description |
  128. |-----------|------|-------------|
  129. | [amp-skills](extensions/amp-skills.ts) | Extension | Adds Amp-compatible skill discovery paths (`~/.config/agents/skills`, `~/.config/amp/skills`, `.agents/skills`) |
  130. | [permissions](extensions/permissions.ts) | Extension | Reads `amp.commands.allowlist` and `amp.permissions` from `~/.config/amp/settings.json` (and `.agents/settings.json`) and intercepts bash tool calls accordingly; `/permissions` toggles between `enabled` and `yolo` (all commands allowed, status bar indicator, persisted in `~/.pi/agent/amplike.json`) |
  131. | [handoff](extensions/handoff.ts) | Extension | `/handoff [-mode <name>] [-model <provider/id>] <goal>` command + `handoff` tool (with `mode`/`model` params) for AI-powered context transfer |
  132. | [modes](extensions/modes.ts) | Extension | Prompt mode manager with model/thinking/color presets, editor border overlay, and shortcuts |
  133. | [session-query](extensions/session-query.ts) | Extension | `session_query` tool for querying parent sessions; uses the queried session's own model for analysis |
  134. | [session-query](skills/session-query/) | Skill | Instructions for using the session_query tool |
  135. | [web-search](skills/web-search/) | Skill | Web search via Jina API |
  136. | [visit-webpage](skills/visit-webpage/) | Skill | Webpage content extraction |
  137. ## Why "AmpCode-like"?
  138. Amp Code has excellent session management built-in - you can branch conversations, reference parent context, and navigate session history. This package brings similar workflows to Pi:
  139. - **Context handoff** → Amp's conversation branching
  140. - **Session querying** → Amp's ability to reference parent context
  141. ## Web Skills Origin
  142. The web-search and visit-webpage skills were extracted from [pasky/muaddib](https://github.com/pasky/muaddib). The original implementations have additional features (rate limiting, multiple backends, async execution) that aren't needed for Pi's skill system.
  143. ## License
  144. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.