repo2txt

Convert local code repositories into formatted text transcripts for LLM analysis.

46|6|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/aresbit/MateBot --skill repo2txt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo2txt
Source: https://github.com/aresbit/MateBot/tree/main/skills/repo2txt
Command: npx skills add https://github.com/aresbit/MateBot --skill repo2txt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill converts local code repositories into a formatted text transcript suitable for analysis by large language models.

Core Features & Use Cases

  • Repository-wide text extraction and formatting for easy review by AI.
  • Filter by extensions to focus on relevant code and docs.
  • Use Case: debugging, code review, and knowledge extraction by preparing a consistent text summary, file contents, and directory structure for any repository.

Quick Start

Run the repo2txt tool on a local repository to generate a textual report. Example: python3 scripts/repo2txt.py /path/to/repo -o output.txt

Frequently Asked Questions about repo2txt

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

FAQPage Schema
How do I convert a code repository into text for LLM analysis?

To convert a code repository for LLM analysis, run the Python CLI script to generate a text transcript containing the repository summary, directory structure, and file contents. You can specify the target path and output file directly from the command line.

What is the best way to extract file contents from a repository for an AI code review?

Extracting file contents for an AI code review is done by filtering the repository by specific file extensions and ignore patterns. This generates a focused, formatted text report of the code, making it easier for large language models to process the relevant data.

Do I need to install external dependencies to format repository code into a text transcript?

No external dependencies are required to format repository code into a text transcript. The tool runs on Python 3 using only the standard library, meaning you can execute the script immediately without installing additional packages via pip or other managers.

Can I exclude specific file types and directories when exporting a repository structure for debugging?

Yes, you can exclude specific file types and directories when exporting a repository structure for debugging. The CLI provides options to include or exclude file extensions, apply ignore patterns, and use flags to omit the directory tree or summary from the final text output.

What does the generated repository text transcript for large language models contain?

The generated repository text transcript for large language models contains a three-part report. This includes a repository summary, the directory structure, and the extracted file contents, providing a comprehensive overview of the codebase for AI processing.