# Paste Sanitizer

> Convert mixed terminal output and instructions into safe, paste-ready command blocks.

- **Type:** Skill
- **Install:** `agentstack add skill-sounder25-foundational-agent-skills-23-paste-sanitizer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Sounder25](https://agentstack.voostack.com/s/sounder25)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [Sounder25](https://github.com/Sounder25)
- **Source:** https://github.com/Sounder25/Foundational-Agent-Skills/tree/main/23_paste_sanitizer

## Install

```sh
agentstack add skill-sounder25-foundational-agent-skills-23-paste-sanitizer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# SKILL-023: Paste Sanitizer

## Purpose

Convert “chatty” instructions, shell prompts, and terminal output into a safe, paste-ready command block that satisfies the **Pre-Action Guard (Skill-018)**.

This skill ensures that unintended text like `PS C:\`, `Everything up-to-date`, or error dumps are never pasted into a live terminal.

## Goal

Enforce **Command-Only** output for all runnable steps.

## Algorithm

1. **Identify** lines that match "likely command" patterns:
   - Starts with `git`, `dotnet`, `npm`, `python`, `cd`, `mkdir`, `$env:`, etc.
2. **Identify** and **Drop** lines that match "likely output" or "prompt" patterns:
   - Starts with `PS`, Contains `Everything up-to-date`, `At line:`, `CategoryInfo:`, `error:`, `warning:`, etc.
3. **Comment Out** (optional) unknown lines with `#` instead of deleting, to preserve context safely within a script.
4. **Wrap** the cleaned commands in a labeled block: `## COPY/PASTE COMMANDS`.

## Trigger Phrases

- `sanitize commands`
- `clean terminal output`
- `make paste-ready`

## Expected Output Format

```markdown
## COPY/PASTE COMMANDS
```powershell
git add .
git commit -m "fix"
git push
```

```

## Safety Constraints
- Only copy blocks labeled **COPY/PASTE COMMANDS**.
- Never copy blocks labeled **Expected Output**.
- If a line inside the command block does not start with a tool or verb, the sanitizer has failed.

## Implementation
See `scripts/paste_sanitizer.ps1`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Sounder25](https://github.com/Sounder25)
- **Source:** [Sounder25/Foundational-Agent-Skills](https://github.com/Sounder25/Foundational-Agent-Skills)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sounder25-foundational-agent-skills-23-paste-sanitizer
- Seller: https://agentstack.voostack.com/s/sounder25
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
