repomix
यह क्या करती है
यह स्किल कोड प्रोजेक्ट, चाहे लोकल हो या GitHub पर, को एक ऐसी फ़ाइल में पैक करती है जिसे AI पढ़ सके। यह डेवलपरों और जिज्ञासु लोगों के लिए है जो किसी कोडबेस को जल्दी समझना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप किसी अनजान रिपॉज़िटरी को खोजना या समझना चाहें।
- ✓जब आपको किसी फ़ीचर, जैसे authentication, से जुड़ा सारा कोड ढूँढना हो।
- ✓जब आप जानना चाहें कि किसी प्रोजेक्ट में कितने टोकन लगेंगे।
Skill का लिंक
https://github.com/yamadashy/repomix/blob/main/.agents/clawhub/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“facebook react रिपॉज़िटरी को पैक कीजिए और मुझे मुख्य कंपोनेंट दिखाइए, और यह भी बताइए कि state कहाँ संभाली जाती है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट लोकल फ़ोल्डर या दूर के GitHub रिपॉज़िटरी पर Repomix टूल चलाता है। वह ignore फ़ाइलों का पालन करता है, आउटपुट में सुरक्षा समस्याएँ जांचता है, और AI के पढ़ने के लिए एक संरचित आउटपुट फ़ाइल लिखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Repomix — Codebase Packer & Analyzer
Pack entire codebases into a single, AI-friendly file for analysis. Repomix intelligently collects repository files, respects .gitignore, runs security checks, and generates structured output optimized for LLM consumption.
When to Use
- "Analyze this repo" / "Explore this codebase"
- "What's the structure of facebook/react?"
- "Find all authentication-related code"
- "How many tokens is this project?"
- "Pack this repo for AI analysis"
- "Show me the main components of vercel/next.js"
Quick Reference
Pack a Remote Repository
npx repomix@latest --remote <owner/repo> --output /tmp/<repo-name>-analysis.xml
Always output to a temporary directory (/tmp on Unix, %TEMP% on Windows) for remote repositories to avoid polluting the user's working directory.
Pack a Local Directory
npx repomix@latest [directory] --output /tmp/<name>-analysis.xml
Key Options
| Option | Description |
|---|---|
--style <format> |
Output format: xml (default, recommended), markdown, plain, json |
--compress |
Tree-sitter compression (~70% token reduction) — use for large repos |
--include <patterns> |
Include only matching patterns (e.g., "src/**/*.ts,**/*.md") |
--ignore <patterns> |
Additional ignore patterns |
--output <path> |
Custom output path (default: repomix-output.xml) |
--remote-branch <name> |
Specific branch, tag, or commit (for remote repos) |
Workflow
Step 1: Pack the Repository
Choose the appropriate command based on the target:
# Remote repository (always output to /tmp)
npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml
# Large remote repo with compression
npx repomix@latest --remote facebook/react --compress --output /tmp/react-analysis.xml
# Local directory
npx repomix@latest ./src --output /tmp/src-analysis.xml
# Specific file types only
npx repomix@latest --include "**/*.{ts,tsx,js,jsx}" --output /tmp/filtered-analysis.xml
Step 2: Check Command Output
The command displays:
- Files processed: Number of files included
- Total characters: Size of content
- Total tokens: Estimated AI tokens
- Output file location: Where the file was saved
Note the output file location for subsequent analysis.
Step 3: Analyze the Output
Structure overview:
- Search for the file tree section (near the beginning of the output)
- Check the metrics summary for overall statistics
Search for patterns (use the output file path from Step 2):
# Find exports and main entry points
grep -iE "export.*function|export.*class" <output-file>
# Search with context
grep -iE -A 5 -B 5 "authentication|auth" <output-file>
# Find API endpoints
grep -iE "router|route|endpoint|api" <output-file>
# Find database models
grep -iE "model|schema|database|query" <output-file>
Read specific sections using offset/limit for large outputs.
Step 4: Report Findings
- Metrics: Files, tokens, size from command output
- Structure: Directory layout from file tree analysis
- Key findings: Based on pattern search results
- Next steps: Suggestions for deeper exploration
Best Practices
- Use
--compressfor large repos (>100k lines) to reduce token usage by ~70% - Use pattern search first before reading entire output files
- Use a temporary directory for output (
/tmpon Unix,%TEMP%on Windows) to keep the user's workspace clean - Use
--includeto focus on specific parts of a codebase - XML is the default and recommended format — it has clear file boundaries for structured analysis
Output Formats
| Format | Best For |
|---|---|
| XML (default) | Structured analysis, clear file boundaries |
| Markdown | Human-readable documentation |
| Plain | Simple grep-friendly output |
| JSON | Programmatic/machine analysis |
Error Handling
- Command fails: Check error message, verify repository URL/path, check permissions
- Output too large: Use
--compress, narrow scope with--include - Network issues (remote): Verify connection, suggest local clone as alternative
- Pattern not found: Try alternative patterns, check file tree to verify files exist
Security
Repomix automatically excludes potentially sensitive files (API keys, credentials, .env files) through built-in security checks. Trust its security defaults unless the user explicitly requ
अक्सर पूछे जाने वाले सवाल
क्या यह GitHub रिपॉज़िटरी के साथ काम कर सकती है?
हाँ। यह लोकल फ़ोल्डर के साथ-साथ दूर के GitHub रिपॉज़िटरी भी पैक कर सकती है।
क्या यह .gitignore का पालन करती है?
हाँ। यह .gitignore का पालन करती है और आउटपुट पर सुरक्षा जांच चलाती है।
आउटपुट कहाँ सहेजा जाता है?
दूर के रिपॉज़िटरी के लिए यह अस्थायी फ़ोल्डर में सहेजता है, ताकि आपका काम का फ़ोल्डर साफ़ रहे।
जानकारी
लेखक का मूल विवरण
Pack and analyze codebases into AI-friendly single files using Repomix. Use when the user wants to explore repositories, analyze code structure, find patterns, check token counts, or prepare codebase context for AI analysis. Supports both local directories and remote GitHub repositories.
repo: yamadashy/repomix
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9760
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agent-carnet
29kयह आपके एजेंट को छोटे नोट्स सहेजने, ढूँढने और व्यवस्थित करने देती है, जो सेशन के बीच बने रहते हैं। हर नोट इस्तेमाल होने पर 30 दिन का टाइमर रीसेट करता है, और बिना इस्तेमाल के नोट ट्रैश में चले जाते हैं।
contextual-commit
29kयह आपके एजेंट को git commit संदेश लिखने में मदद करती है, जो बताते हैं कि बदलाव क्यों किया गया, सिर्फ़ यह नहीं कि क्या बदला, बॉडी में संरचित नोट्स के साथ।
repomix-explorer
29kयह आपके एजेंट को किसी अनजान कोडबेस को समझने में मदद करती है, लोकल या दूर का, उसे पैक करके और आउटपुट पढ़कर ढांचा समझाने और पैटर्न खोजने के लिए।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।