@99percentpeople/pi-background-tasks
Pi Background Task Management Extension with PTY and Signal Control Support
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: @99percentpeople/pi-background-tasks. It is used for: Pi Background Task Management Extension with PTY and Signal Control Support Full Skill content: https://321skill.com/skills/99percentpeople-pi-background-tasks/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the inability to persistently run background tasks and the difficulty in managing long-running processes within the Pi coding agent. In real-world development, developers often need to initiate time-consuming commands such as compilation, testing, or deployment. However, Pi's default bash tool blocks the session and prevents users from viewing output or sending signals after task completion.
Usage is straightforward: simply install the extension via pi install npm:@99percentpeople/pi-background-tasks. You can then use natural language commands to start background tasks (bg_start), wait for task completion (bg_wait), check status (bg_status), retrieve logs (bg_logs), send signals (bg_send), or terminate tasks (bg_kill). For interactive programs, you can enable PTY mode and attach to the terminal using the /bg-attach command.
It is ideal for developers who need to run long builds, automated tests, data pipelines, or interactive tools. This is especially useful for teams or individuals already using Pi as their primary coding agent but limited by single-threaded bash execution and the inability to manage multiple tasks concurrently.
It is recommended to always specify a name parameter when starting a background task for future reference. Note that it primarily relies on Pi's session mechanism; tasks are cleaned up after the Pi session ends, so it is not suitable for use as a system-level daemon.
Key Features
Unlike Pi's built-in `bash` tool, `bg_start` supports persistent background execution, PTY interaction, signal transmission (e.g., Ctrl+C), and separate log viewing, whereas `bash` can only execute synchronously and blocks subsequent operations.
Limitations
Requires a Pi environment (Node.js + npm). Task lifecycle is bound to the Pi session; tasks terminate when the session closes and do not support persistence across sessions.
FAQ
How can I view real-time output from a background task?
Use the `bg_logs` tool to view piped output, or attach to a PTY task in real-time via `/bg-attach <id>` for interactive access.
Can multiple background tasks run simultaneously?
Yes, each task has a unique ID. Use `bg_status` to list all tasks, enabling parallel management.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/99percentpeople-pi-background-tasks/raw/index.md to read the original Skill definition (Markdown format) for @99percentpeople/pi-background-tasks, and install it according to the instructions.
Raw Markdown URL for AI: /skills/99percentpeople-pi-background-tasks/raw/index.md