# No Tail

> Prevents piping command output through tail or head which permanently discards data. Use when about to execute shell commands, especially builds, tests, or any command with potentially large output.

- **Type:** Skill
- **Install:** `agentstack add skill-nickcao-agent-skills-no-tail`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [NickCao](https://agentstack.voostack.com/s/nickcao)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [NickCao](https://github.com/NickCao)
- **Source:** https://github.com/NickCao/agent-skills/tree/master/skills/no-tail

## Install

```sh
agentstack add skill-nickcao-agent-skills-no-tail
```

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

## About

# No Tail

Never pipe command output through `tail` or `head`. Redirect to a file first, then view portions.

Using `tail` or `head` on an existing file is fine -- the data is preserved on disk. Piping through `tee` is also fine since it preserves full output. The rule only applies to pipe truncation, which destroys data.

## The Rule

```bash
# BAD — output is permanently discarded
make 2>&1 | tail -20
cargo build 2>&1 | head -50
pytest | tail -100

# GOOD — full output preserved, then view what you need
make > /tmp/make-output.log 2>&1
tail -20 /tmp/make-output.log

# GOOD — tee preserves full output to disk while also showing it
make 2>&1 | tee /tmp/make-output.log

# GOOD — let the execution tool handle output capture natively
make
```

**Proactive redirection:** Execution tools often have an upper limit on captured output lines. If the command is expected to produce very long output (large builds, verbose test suites, log dumps), proactively redirect to a file rather than relying on the execution tool's capture:

```bash
# For commands expected to produce long output
cargo build --verbose > /tmp/build.log 2>&1
tail -50 /tmp/build.log
```

Clean up temporary files when they are no longer needed.

## Common Rationalizations

| Rationalization | Reality |
|-----------------|---------|
| "I only need the last few lines" | You don't know that yet. Errors, warnings, and context appear earlier in the output. |
| "The output is too large" | Redirect to a file. Read the parts you need. Delete the file later. |
| "It's just a quick check" | Quick checks on incomplete data produce wrong conclusions. Capture everything. |
| "The execution tool will truncate anyway" | Many execution tools save full output to a file when truncating. Piping through tail never does. |

## Source & license

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

- **Author:** [NickCao](https://github.com/NickCao)
- **Source:** [NickCao/agent-skills](https://github.com/NickCao/agent-skills)
- **License:** MIT

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-nickcao-agent-skills-no-tail
- Seller: https://agentstack.voostack.com/s/nickcao
- 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%.
