Skip to content
Skill

Head tail

Lets an agent sample huge logs and transcripts from both ends and report the gap

Head tail is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
227
Last commit
License
MIT
Listing updated

Similar skills

About Head tail

Head-tail is a narrow reading technique for files that are too large to read whole but whose middle is repetitive, such as build output, test-runner transcripts, generated artifacts and data dumps. The agent sizes the file first, takes a bounded slice from the beginning and the end, labels each slice so they cannot be mistaken for contiguous text, and truncates pathologically long lines so one blob cannot crowd out the rest of the sample.

The skill is strict about what it does not cover. It warns against using the method on source files, briefs, packets or configuration, where the whole-file rule applies instead. When the ends do not answer a question, it tells the agent to search the middle for the relevant error or test name and read matches with context rather than paging through windows. It also requires that any unread range be stated explicitly, and that a build's exit status be captured directly, since a piped pipeline reports the status of its last stage.

The skill is a single SKILL.md file with no bundled scripts. It references a surrounding task packet's efficiency section for batching and whole-file rules, so it is designed to work inside that workflow rather than standalone.

When your agent uses it

Use when a log, build transcript, generated artifact, or dump is too large to read whole and its middle is repetitive—sample bounded first/last slices, report the unread gap, and capture producer status separately. Not for source, briefs, packets, or configuration; their whole-file rule comes from the injected task contract.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (5 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/head-tail to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/head-tail &&
cp -R "$tmp/.agents/skills/head-tail" ~/.claude/skills/head-tail &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/head-tail inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/head-tail to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/head-tail &&
cp -R "$tmp/.agents/skills/head-tail" ~/.agents/skills/head-tail &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/head-tail inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/head-tail to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/head-tail &&
cp -R "$tmp/.agents/skills/head-tail" ~/.cursor/skills/head-tail &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/head-tail inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/head-tail

Or copy the folder to ~/.gemini/skills/head-tail yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/head-tail:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/head-tail &&
cp -R "$tmp/.agents/skills/head-tail" ~/.copilot/skills/head-tail &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/head-tail inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git

Then copy claude-vibe-squad/.agents/skills/head-tail into your agent's skills folder as head-tail. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Size-first sampling
Checks byte size and line count before deciding whether a file needs a partial read at all.
Bounded head and tail slices
Reads a fixed number of lines from each end, with more tail lines when chasing failures.
Explicit gap reporting
States the sampled line ranges and the unread middle so the sample is never mistaken for the whole file.
Long-line truncation
Caps very long lines such as base64 blobs or minified bundles and marks them as truncated.
Middle search over paging
Greps for errors or test names in the unread middle instead of stepping through windows.
Separate exit status capture
Records the build's own exit code before any piping, avoiding the masked status of the last pipeline stage.

Good for

  • Find the error in a 15,000-line CI build log without reading the whole thing
  • Check how a test run was invoked from the top of a long transcript
  • Scan a large generated data dump for a failure without loading it entirely
  • Confirm whether a build actually succeeded when its output is piped through tail

Head tail FAQ

When should the agent not use Head tail?

Not for source files, briefs, packets or configuration. The skill says those should follow the whole-file rule from the surrounding task contract, since a long dense file is not a sampling candidate.

What is the deciding test for using Head tail?

Whether the file's middle is repetitive. A long test log qualifies, while a long source file does not.

Why capture the exit status separately?

A piped command returns the status of its last stage, so piping a build into tail reports tail's status rather than the build's.

Does Head tail bundle any scripts or tools?

No. The folder contains only the SKILL.md file, and no scripts are listed.

How do I install Head tail in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/head-tail to use it in all your projects, or to .claude/skills/head-tail in one project.

Does Head tail run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Head tail?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Head tail?

The closest alternatives to Head tail are Data throughput accelerator, Scope estimation, Diagnosing bugs, Differential review and Bmad run inspector.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from mtarcure/claude-vibe-squad

  1. Writes alt text, timed captions and transcripts for images, footage and audio

    • Open source
    • 227 GitHub stars
    • Design and media
  2. Guides building product agent system prompts with eval-backed boundaries and output

    • Open source
    • 227 GitHub stars
    • AI models and LLM tooling
  3. Guides authorized adversarial testing of autonomous LLM agents for injection and approval

    • Open source
    • 227 GitHub stars
    • Security
  4. Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines

    • Open source
    • 227 GitHub stars
    • Developer tools
  5. Generates missing README, CHANGELOG, LICENSE and agent-context files at project delivery

    • Open source
    • 227 GitHub stars
    • Developer tools
  6. Builds and proves multi-step exploit chains from weak bug-bounty findings

    • Open source
    • 227 GitHub stars
    • Security