# contextslim setup

> Automated setup of ContextSlim hooks to compress verbose test and lint logs within Claude Code.

contextslim setup is a free AI agent skill on Agensi by 溜口遥大, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [溜口遥大](https://www.agensi.io/creators/creator-1441)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-25
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/contextslim-setup
- Tags: ai-agents, testing, typescript, pytest, claude-code

## About this skill

Claude Code's performance can degrade when flooded with thousands of lines of verbose test logs. Long Vitest or Jest outputs consume the context window, pushing relevant failure details out and slowing down reasoning.

This skill automates the setup of ContextSlim, a free open-source utility that compresses test, type-check, and lint outputs before Claude reads them. It removes passing test lines and redundant noise while keeping failures, errors, and summaries 100% verbatim.

### What it does
- **Output compression** reduces verbose logs from Vitest, Jest, tsc, pytest, and Ruff.
- **Context preservation** ensures every failing test and diagnostic message remains untouched.
- **Hook registration** installs native Claude Code hooks into local or shared settings.
- **Safe rollout** implements an observe-then-compress workflow to verify savings.
- **Binary management** handles checksum-verified downloads and OS-specific binary mapping.

### How it works
1. **Environment check** identifies the OS, CPU architecture, and supported test frameworks in the project.
2. **Secure download** fetches the specific binary and verifies its SHA256 checksum for integrity.
3. **Hook registration** writes the necessary configuration to `.claude/settings.json` or global user settings.
4. **Permission hardening** guides the user through adding granular allow rules for failing run compression.
5. **Validation** runs a live test to confirm the compression header appears in Claude's context.

### Frameworks & tools
Specifically designed for Claude Code on macOS, Linux, and Windows. It supports Vitest 3.x, Jest 29.x, TypeScript 5.x, pytest 8-9, and Ruff 0.17.

### Why this beats prompting it yourself
Manual setup requires managing binary paths, SHA verification, and precise JSON hook syntax that Claude Code demands. This skill handles the complex mapping of shell exit codes and permission allow rules required to capture failing runs without manual configuration errors.

### Use cases
- **Large test suites** where hundreds of passing tests bury the two actual failures.
- **Type-check audits** with repetitive tsc diagnostics that bloat the prompt.
- **CI/CD debugging** within Claude Code where log limits are frequently hit.
- **Team-wide standards** by deploying shared hooks via `.claude/settings.json`.

### Known limitations
Works only in Claude Code. Full feature set requires macOS or Linux; Windows only compresses successful runs. Commands with pipes, redirects, or variables are passed through uncompressed.

## Requires

- Node.js
- tsc

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the contextslim setup skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill improve Claude Code's performance during testing?

This skill automates the installation of ContextSlim, which filters out passing tests and noise from your CLI outputs while keeping 100% of failure details, preventing Claude from hitting context limits during long debugging sessions.

### Which AI agents and testing frameworks are compatible with this setup?

The skill is specifically designed for the Claude Code CLI and supports major frameworks including Vitest, Jest, TypeScript (tsc), pytest, and Ruff on macOS, Linux, and Windows.

### Do I need to manually edit my Claude settings or download binaries myself?

Installation is automated; the skill detects your OS architecture, downloads the verified binary, configures your `.claude/settings.json`, and sets up the necessary execution hooks for you.

### Will I lose important debugging information if the logs are compressed?

No, the skill uses a 'safe rollout' approach that identifies failures first; it only compresses the redundant successful parts of a log while leaving every error message and stack trace completely intact.

### What exactly is included with the purchase of this skill?

You receive the automated configuration script, the binary management logic with SHA256 checksum verification, and pre-configured hooks for all supported linting and testing tools.

### Are there any specific limitations for Windows users or complex shell commands?

While fully functional on macOS and Linux, Windows users currently only receive compression for successful runs, and commands involving complex shell pipes or redirects are passed through without modification.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
