Pack and analyze a remote GitHub repository
Packs remote GitHub repositories into single files for analysis.
/plugin marketplace add yamadashy/repomix/plugin install repomix-commands@repomixFetch and analyze a GitHub repository using Repomix.
When the user asks to pack a remote repository, analyze their request and run the appropriate repomix command.
The user might ask in various ways:
npx repomix@latest --remote <repo> [options]owner/repo (e.g., yamadashy/repomix)https://github.com/owner/repohttps://github.com/owner/repo/tree/branch-namehttps://github.com/owner/repo/commit/hash--style <format>: Output format (xml, markdown, json, plain)--include <patterns>: Include only matching patterns (e.g., "src//*.ts,/*.md")--ignore <patterns>: Additional ignore patterns--compress: Enable Tree-sitter compression (~70% token reduction)--output <path>: Custom output path--copy: Copy output to clipboardBased on user intent, you might run:
# "Pack yamadashy/repomix"
npx repomix@latest --remote yamadashy/repomix
# "Analyze facebook/react"
npx repomix@latest --remote https://github.com/facebook/react
# "Pack the develop branch of user/repo"
npx repomix@latest --remote https://github.com/user/repo/tree/develop
# "Pack microsoft/vscode with compression"
npx repomix@latest --remote microsoft/vscode --compress
# "Pack only TypeScript files from owner/repo"
npx repomix@latest --remote owner/repo --include "src/**/*.ts"
# "Pack yamadashy/repomix as markdown and copy to clipboard"
npx repomix@latest --remote yamadashy/repomix --copy --style markdown
IMPORTANT: The generated output file can be very large and consume significant context.
If the user wants to analyze or explore the generated output:
Agent Selection Strategy:
repomix-explorer:explorer agent is available, use it (optimized for repomix output analysis)general-purpose agent or another suitable sub-agentExample:
User: "Pack and analyze the yamadashy/repomix repository"
Your workflow:
1. Run: npx repomix@latest --remote yamadashy/repomix
2. Note the output file location (e.g., repomix-output.xml)
3. Launch an appropriate sub-agent with task:
"Analyze the repomix output file at ./repomix-output.xml.
Use Grep tool to search for patterns and Read tool to examine specific sections.
Provide an overview of the repository structure and main components.
Do NOT read the entire file at once."
If you need more information about available options or encounter any issues:
npx repomix@latest -h or npx repomix@latest --help to see all available optionsRemember: Parse the user's natural language request and translate it into the appropriate repomix command with the --remote option. For analysis tasks, delegate to appropriate sub-agents to avoid consuming excessive context.