AGY Input Wrap: Terminal PTY Prompt Optimizer
Clean PTY terminal interceptor for AI coding CLIs (Claude Code, AGY, Codex). Sequences slash commands before multiline prompts and eliminates paste buffer truncation.
$9
Works with the AI Agents you already use
AGY Input Wrap: Terminal PTY Prompt Optimizer
Example session with this skill installed
Wrap a Claude Code session to ensure pasted /add-dir commands run before 500-line prompt blocks.
- Read your context and instructions
- Compiled the agy input wrap
$ # 1. Launch AI CLI session wrapped with agy-input-wrap:
$ agy-input-wrap claude-code
[AGY-WRAP] Interceptor active. Monitoring PTY file descriptor for bracketed paste...
$ # 2. User pastes a 450-line code snippet preceded by a slash command:
[INPUT RECEIVED] Length: 18,420 bytes | Detected 1 slash command + multiline text
[AGY-WRAP] Sequencing commands:
-> Dispatched '/add-dir ./src' to CLI prompt buffer
-> Synchronizing terminal ACK... received
-> Delivering sanitized 450-line prompt without chunk fragmentation
$ # 3. Observation inside coding CLI:
/add-dir ./src
Added 12 files to context.
Analyze the following 450-line handler implementation for memory leaks:
[Paste Buffer Delivered: 100% complete, 0 dropped bytes, 0 ANSI escape corruption]
Claude: "I have analyzed the complete 450-line snippet..."
$ # 4. Exit session cleanly:
$ exit
[AGY-WRAP] PTY session closed. Total pastes wrapped: 6 | Truncation errors prevented: 6
Connects securely to your tools. The creator never sees your data.
About this skill
Agensi Turnkey Convenience Package ($9): While the core codebase remains open-source MIT on GitHub, this official Agensi package delivers verified
install.shsetup, the curatedSKILL.mdinstruction suite, automatic PTY terminal interceptor integration, ongoing CLI compatibility updates, and priority support.
Protect AI Coding CLIs Against Terminal Buffer Truncation
When pasting large multiline prompts or codebase context into AI coding CLIs, terminal bracketed paste buffers often overflow, truncating text or interleaving slash commands.
AGY Input Wrap provides a lightweight pseudoterminal (PTY) interception layer. It sequences commands (e.g. /add-dir or /clear) before user input, strips terminal noise and ANSI artifacts, and guarantees that multi-kilobyte code blocks arrive completely intact.
Core Capabilities:
- Command Sequencing: Detects
/add-dir <path>or slash commands in pastes, feeding them first so the TUI executes them immediately. - Buffer Truncation Defense: Intercepts large bracketed pastes without byte loss or dropped input chunks.
- Zero-Latency Pass-Through: Normal typed terminal input passes through with 0 added delay.
- Composable Architecture: Chains cleanly with
toon-wrapfor end-to-end token reduction.
See It in Action (Demo)
$ # 1. Launch AI CLI session wrapped with agy-input-wrap:
$ agy-input-wrap claude-code
[AGY-WRAP] Interceptor active. Monitoring PTY file descriptor for bracketed paste...
$ # 2. User pastes a 450-line code snippet preceded by a slash command:
[INPUT RECEIVED] Length: 18,420 bytes | Detected 1 slash command + multiline text
[AGY-WRAP] Sequencing commands:
-> Dispatched '/add-dir ./src' to CLI prompt buffer
-> Synchronizing terminal ACK... received
-> Delivering sanitized 450-line prompt without chunk fragmentation
$ # 3. Observation inside coding CLI:
> /add-dir ./src
Added 12 files to context.
> Analyze the following 450-line handler implementation for memory leaks:
[Paste Buffer Delivered: 100% complete, 0 dropped bytes, 0 ANSI escape corruption]
Claude: "I have analyzed the complete 450-line snippet..."
$ # 4. Exit session cleanly:
$ exit
[AGY-WRAP] PTY session closed. Total pastes wrapped: 6 | Truncation errors prevented: 6
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
- Software
Python 3.10+
Permissions
File Scopes
Intercepts terminal PTY stdin/stdout locally. No network connections.