trim

Trim lengthy tool outputs to configurable limits and update session metadata.

1|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/jimhester/work --skill trim-jimhester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trim
Source: https://github.com/jimhester/work/tree/main/skills/trim
Command: npx skills add https://github.com/jimhester/work --skill trim-jimhester

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill trims large tool outputs to free context space, reducing noise and enabling AI systems to operate within token limits while preserving references to the original data.

Core Features & Use Cases

  • Automated trimming of lengthy tool outputs to a configurable limit, preserving the first portion and adding a reference to the original data.
  • Per-tool trimming rules for commands like Read, Bash, Grep, and Glob to minimize impact on essential content.
  • Updates the session metadata and outputs a resume command to continue from the trimmed state.
  • Use Case: When tool results, logs, or transcripts are longer than the AI's context window, this Skill helps keep relevant content accessible.

Quick Start

Run the trim command to reduce the current session's tool outputs: ./work --trim

Frequently Asked Questions about trim

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I free context space when AI tool outputs exceed token limits?

To free context space, you can trim large tool outputs to a configurable limit. This process preserves the first portion of the output and adds a reference to the original data, reducing noise while keeping the session within token limits.

Can I set specific trimming rules for different tool outputs like logs and transcripts?

Yes, you can configure per-tool trimming rules for commands like Read, Bash, Grep, and Glob. These rules minimize the impact on essential content by setting specific thresholds and targets for different tool outputs.

What happens to session metadata after trimming large tool outputs?

After trimming large tool outputs, the session metadata is automatically updated. The Skill also outputs a resume command, allowing you to continue the session directly from the newly trimmed state.

How do I run the trim command to reduce current session tool outputs?

You can run the trim command by executing `./work --trim` in your environment. This command automatically trims lengthy tool results, logs, or transcripts that risk exceeding your context window.

Does trimming tool outputs delete the original session data?

Trimming tool outputs does not delete the original session data. The Skill preserves the first portion of the output and adds a reference to the original data, ensuring relevant content remains accessible while freeing context space.

When should I use context trimming for AI prompt sessions?

You should use context trimming when tool results, logs, or transcripts are longer than the AI's context window. It helps keep relevant content accessible and prevents the session from exceeding token limits.