repo2txt
Convert code repositories to formatted text for LLM analysis. Use when the user wants to send code to Gemini, Claude, or other LLMs for debugging, code review, or analysis. Triggers on phrases like "convert code to text", "repo to text", "format code for LLM", "send code to Gemini", or when analyzing code structure and contents for LLM consumption.
npx skills add majiayu000/claude-skill-registry --skill repo2txt-aresbit-matebot --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Repo2txt ## Overview This skill converts local code repositories into a formatted text file suitable for sending to LLMs like Gemini, Claude, or ChatGPT. It's similar to https://repo2txt.simplebasedomain.com/ but runs locally, giving you full control over file selection and formatting. ## Quick Start ### Basic Usage Convert a repository to text and display in terminal: ```bash python3 scripts/repo2txt.py /path/to/repo ``` Save to a file: ```bash python3 scripts/repo2txt.py /path/to/repo -o output.txt ``` ### Filter by Extensions Only include specific file types: ```bash python3 scripts/repo2txt.py /path/to/repo -e .py,.js,.ts ``` Exclude certain extensions: ```bash python3 scripts/repo2txt.py /path/to/repo -x .test.js,.spec.ts ``` ### Common Scenarios **Debug a specific module:** ```bash python3 scripts/repo2txt.py ./src/components -e .tsx,.ts -o component_debug.txt ``` **Analyze backend API:** ```bash python3 scripts/repo2txt.py ./src/api -e .py -o api_analysis.txt ``` **Review configuration files:** ```bash python3 scripts/repo2txt.py . -e .json,.yaml,.yml,.toml -o config_review.txt ``` ## Output Format The generated text file includes three sections: 1. **Repository Summary**:
- Overview
- Quick Start
- Basic Usage
- Filter by Extensions
- Common Scenarios
- Output Format
- Options Reference
- Default Ignore Patterns
- Resources
- scripts/
- Usage Tips
python3 scripts/repo2txt.py /path/to/repo python3 scripts/repo2txt.py /path/to/repo -o output.txt python3 scripts/repo2txt.py /path/to/repo -e .py,.js,.ts python3 scripts/repo2txt.py /path/to/repo -x .test.js,.spec.ts python3 scripts/repo2txt.py ./src/components -e .tsx,.ts -o component_debug.txt python3 scripts/repo2txt.py ./src/api -e .py -o api_analysis.txt python3 scripts/repo2txt.py . -e .json,.yaml,.yml,.toml -o config_review.txt python3 scripts/repo2txt.py . -e .py | pbcopy python3 scripts/repo2txt.py . -e .py | xclip -selection clipboard
What does the repo2txt skill do?
Convert code repositories to formatted text for LLM analysis. Use when the user wants to send code to Gemini, Claude, or other LLMs for debugging, code review, or analysis. Triggers on phrases like "convert code to text", "repo to text", "format code for LLM", "send code to Gemini", or when analyzing code structure and contents for LLM consumption.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill repo2txt-aresbit-matebot --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
