packx

Bundles code files into AI-ready context with a 49k token limit.

24|6|Updated Dec 19, 2025
One-click install
npx skills add https://github.com/johnlindquist/claude --skill packx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: packx
Source: https://github.com/johnlindquist/claude/tree/main/skills/packx
Command: npx skills add https://github.com/johnlindquist/claude --skill packx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bundle code context for AI with a strict token limit to ensure safe, efficient prompts.

Core Features & Use Cases

  • Enforce --limit 49k for all commands
  • Filter and extract matching content
  • Output bundles in XML, Markdown, JSONL, or plain text

Quick Start

Create a 49k context bundle for src/: packx --limit 49k -c src/

Frequently Asked Questions about packx

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

FAQPage Schema
How do I bundle code files for LLM prompts while staying within token limits?

Bundle code context enforces a strict 49k token limit by default, filtering and compressing your codebase into a single output file. Use `packx --limit 49k -c src/` to create a shareable, AI-ready context bundle that maximizes token efficiency for LLM prompts, code review, or debugging sessions.

Can I strip comments and minify code to reduce tokens when preparing AI context?

Yes, packx supports comment stripping and minification to compress code before sending to LLMs. These filters reduce token overhead while preserving functionality, letting you fit more relevant code within the 49k limit for context-aware search or AI analysis.

What output formats does code bundling support for AI workflows?

Code bundling outputs in XML, Markdown, JSONL, or plain text formats. Each format suits different AI workflows—XML for structured parsing, Markdown for readability, JSONL for streaming ingestion, and plain text for direct prompt inclusion within your token budget.

How do I filter which files get included in my code bundle for AI?

Packx uses versatile filters and follow-imports to selectively include files matching your criteria. This lets you exclude irrelevant code, focus on specific modules, and automatically trace dependencies—all while respecting the 49k token limit.

Why enforce a hard token limit when bundling code for language models?

A strict token limit prevents prompt injection risks, ensures predictable LLM response quality, and keeps API costs controlled. The 49k default in packx balances comprehensive context with safety and efficiency for reliable AI-assisted code tasks.

Do I need to manually manage dependencies when bundling code for AI context?

No, packx's follow-imports feature automatically traces and includes dependencies in your bundle. This ensures your AI context captures the full import graph while staying within the 49k limit, eliminating manual dependency tracking.