Repomix for Openclaw

Repomix is a powerful codebase packer that transforms local or remote repositories into a single, structured file optimized for AI analysis.

yamadashy
v1.0.1
Mar 21, 2026
0
1.6k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install repomix

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install repomix using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Repomix?

Repomix streamlines the process of providing context to LLMs by intelligently aggregating source code from an entire project. As a key utility within the Openclaw Skills ecosystem, it allows developers to convert complex directory structures into a single XML, Markdown, or JSON file. It automatically respects .gitignore rules and includes built-in security auditing to ensure sensitive credentials, like API keys, are never leaked during the packing process, making it safer to share project context with AI agents.

Repomix Use Cases

  • Analyze and explore the structure of complex remote repositories like React or Next.js without local cloning.
  • Generate comprehensive context files for AI agents to perform deep code reviews or architectural analysis.
  • Calculate token counts and character density for entire projects before processing with an LLM.
  • Search for specific patterns across a full codebase, such as authentication logic, database models, or API endpoints.

How Repomix Works

  1. Initialize the packing process by targeting a local directory or a remote GitHub repository via the CLI.
  2. The tool scans the file system, applying standard .gitignore rules and security filters to exclude sensitive data.
  3. Optional Tree-sitter compression is applied to the source code to reduce token usage by up to 70% for large-scale projects.
  4. A structured output file is generated, typically in XML format, containing a clear file tree and distinct boundaries for each file's content.
  5. The tool provides a summary of findings including file count, character count, and estimated AI tokens for the generated package.

Repomix Setup

To use this within your Openclaw Skills setup, ensure you have Node.js installed. You can run Repomix directly via npx without a permanent global installation:

npx repomix@latest --remote <owner/repo> --output /tmp/analysis.xml

For local projects, navigate to your source directory and run the following to output a clean analysis file:

npx repomix@latest . --output /tmp/local-analysis.xml

Repomix Data Schema & Taxonomy

Repomix organizes data into a structured hierarchy that is easily consumable by Large Language Models. The output includes metadata headers followed by organized file contents.

Data Component Description
File Tree A visual map of the repository's directory structure.
File Content Raw source code wrapped in path-specific XML tags or Markdown blocks.
Analysis Metrics Summary of total files, character count, and token estimates.
Security Logs Details on files excluded due to potential sensitive information.

Repomix Advanced Features

  • Tree-sitter based compression for significant token reduction in massive repositories.
  • Remote repository support allowing direct analysis of GitHub projects via Openclaw Skills commands.
  • Custom include and ignore patterns to fine-tune the context window and exclude irrelevant assets.
  • Multi-format support including XML, JSON, Plain Text, and Markdown for different machine or human consumption needs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*