python-repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
git clone https://github.com/AndersonBY/python-repomix.gitpython-repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
[{"step":1,"action":"Install python-repomix in your project environment: `pip install python-repomix`","tip":"Ensure you're in the root directory of your project before running the tool."},{"step":2,"action":"Run python-repomix to generate the combined file. Use flags to exclude unnecessary files: `python-repomix --output combined_codebase.txt --exclude tests/ .venv/ *.log`","tip":"Use `--verbose` to see which files are being processed in real-time."},{"step":3,"action":"Review the generated file for sensitive data (e.g., API keys, passwords). Use the prompt template to analyze the file for entry points, dependencies, and issues.","tip":"For large projects, split the analysis into chunks (e.g., by module) to avoid token limits in AI tools."},{"step":4,"action":"Refactor the codebase based on the analysis. Address any hardcoded secrets or deprecated functions before sharing the file with an LLM.","tip":"Use `grep -r \"TODO\" combined_codebase.txt` to find areas needing improvement."},{"step":5,"action":"Share the cleaned file with your AI tool for further analysis, debugging, or documentation generation.","tip":"If using Claude, upload the file directly or paste its contents into the chat."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/AndersonBY/python-repomixCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use python-repomix to combine the entire codebase of [PROJECT_NAME] into a single file. Include all Python files, configuration files (e.g., requirements.txt, pyproject.toml), and documentation (e.g., README.md). Exclude [FILES_TO_EXCLUDE, e.g., test files, large binary assets, or virtual environment folders]. After generating the file, analyze it to identify: 1) the main entry points of the project, 2) key dependencies, and 3) any potential issues like hardcoded secrets or deprecated functions. Save the output as [OUTPUT_FILENAME].
```
# python-repomix generated file for project 'data-pipeline' (v1.2.0)
# Generated on 2024-05-15 | Excluded: tests/, .venv/, *.log
## Project Structure Summary
- **Main Entry Points**: `src/main.py` (CLI), `src/api/server.py` (FastAPI)
- **Key Dependencies**: pandas==2.0.3, fastapi==0.95.2, sqlalchemy==2.0.15
- **Critical Files**: `config.yaml` (DB credentials masked), `src/utils/helpers.py`
## File Contents
### src/main.py
```python
import sys
from src.pipeline import run_pipeline
from src.api.server import start_server
def main():
if '--serve' in sys.argv:
start_server()
else:
run_pipeline(config_path='config.yaml')
if __name__ == '__main__':
main()
```
### src/pipeline/transform.py
```python
import pandas as pd
from src.utils.helpers import validate_schema
def transform_data(raw_df: pd.DataFrame) -> pd.DataFrame:
"""Standardize and clean raw data."""
# Hardcoded threshold (TBD: move to config)
threshold = 0.85
return raw_df[raw_df['quality_score'] > threshold]
```
### config.yaml
```yaml
# Database credentials (masked for AI review)
# REAL VALUE: db_password: "s3cr3t!"
db_password: "[REDACTED]"
```
## Analysis Results
1. **Entry Points**: CLI (`main.py`) and API (`server.py`) are clearly defined.
2. **Dependencies**: All critical packages are pinned in `requirements.txt`.
3. **Issues Detected**:
- `transform.py` hardcodes a quality threshold (0.85). Suggest moving to `config.yaml`.
- `config.yaml` contains a placeholder `[REDACTED]` for a password. Recommend using environment variables.
## Recommendations
- Refactor `transform.py` to read thresholds from config.
- Replace hardcoded secrets with `os.getenv()` calls.
```Google's multimodal AI model and assistant
AI assistant built for thoughtful, nuanced conversation
Unlock data insights with interactive dashboards and collaborative analytics capabilities.
IronCalc is a spreadsheet engine and ecosystem
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan