repomix

Package code repositories into XML, Markdown, and JSON for LLM context.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/IoT-VN/tuya-energy-dashboard --skill repomix-iot-vn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repomix
Source: https://github.com/IoT-VN/tuya-energy-dashboard/tree/main/.opencode/skills/repomix
Command: npx skills add https://github.com/IoT-VN/tuya-energy-dashboard --skill repomix-iot-vn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of preparing entire code repositories or specific modules for analysis by Large Language Models (LLMs), ensuring efficient context preparation and code understanding.

Core Features & Use Cases

  • Repository Packaging: Converts codebases into AI-friendly formats (XML, Markdown, JSON, plain text).
  • Context Management: Helps manage token counts for LLM context windows.
  • Security Audits: Identifies sensitive data within code before sharing with AI.
  • Use Case: Prepare a large codebase for a security audit by packaging only the relevant source files into a single XML file, stripping comments and sensitive information.

Quick Start

Use repomix to package the current directory into a markdown file named 'codebase.md'.

Frequently Asked Questions about repomix

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

FAQPage Schema
How do I package a codebase for AI analysis?

To package a codebase for AI analysis, convert repository files into AI-friendly formats like XML, Markdown, or JSON. This process manages token counts for LLM context windows and respects .gitignore rules during extraction.

What's the best way to prepare a local repository for LLM context preparation?

The best way to prepare a local repository for LLM context preparation is by packaging source files into a single document. This method strips comments and converts codebases into formats optimized for AI model ingestion.

Can I run a security audit on my code before sharing it with AI models?

Yes, you can run security audits on code before sharing it with AI models. Repository packaging tools identify sensitive data within your codebase, ensuring safe handling during LLM context preparation.

Does repository packaging work with both local and remote repositories?

Repository packaging works with both local and remote repositories. It automatically respects .gitignore configurations to exclude unnecessary files, ensuring only relevant source code is packaged for AI analysis.

How do I manage token counts when feeding a large codebase to an LLM?

Manage token counts for LLM context windows by packaging the codebase into consolidated formats like XML or Markdown. This approach strips comments and isolates relevant source files to optimize AI ingestion.

What formats can I convert source files into for AI-friendly outputs?

You can convert source files into AI-friendly outputs including XML, Markdown, JSON, and plain text. These formats facilitate efficient codebase ingestion and analysis by Large Language Models.