repomix-analysis
БесплатноБез исполняемых скриптовНе проверенPack repositories with Repomix for whole-codebase, cross-file analysis. Default to a whole-repo measurement pass, then a filtered whole-repo pack; if it fits…
Об этом скилле
Repomix Code Analysis
Use Repomix to pack a repository into a single AI-friendly file (usually XML), then ask the user to run the analysis in a large-context model (Gemini) and paste back the result.
Default behavior: broad strokes first. Do a quick whole-repo measurement pass, then re-pack with obvious non-code/unrelated noise excluded. If that filtered whole-repo pack fits within ~1,000,000 tokens, do not over-optimize—hand it off to Gemini.
Non-negotiables
- Treat Repomix output files as read-only artifacts. Make changes only in the original repo files.
- Keep Repomix security checks enabled by default. Use
--no-security-checkonly if the user explicitly requests it and confirms the output is safe to share externally. - If packing a remote repo is required but network/git access is blocked by the sandbox, ask the user to run outside the sandbox.
- Do not open/search the Repomix output (XML) before Gemini handoff. Decide what to exclude using only token stats + folder/filename paths.
- Exception: only do a targeted search when the user explicitly asks to find a specific known identifier.
Workflow
- Define the analysis question.
- First pass (measurement): generate a whole-repo pack (default to XML) and measure tokens (
--top-files-len,--token-count-tree). Treat this pack as measurement-only; you usually won’t upload it to Gemini. Delete it after you’ve captured token stats (keep only final Gemini pack(s)). - Define an initial “obvious noise” filter (file types + folders) from the token stats (no content inspection; use only paths).
- Second pass (filtered whole repo): re-pack the whole repo with that initial filter applied. If the filtered pack is less than 1,000,000 tokens, stop here and handoff to Gemini (upload the filtered pack). Do not spend time “curating” code files (unless there are clearly some auxiliary non-code artifacts that must be excluded anyway).
- If still over budget, widen exclusions in this order (re-pack and re-check after each): other non-essential → tests → examples → drop either docs or code based on the question.
- If still over budget after that, reduce scope at folder granularity based on the question + token tree (avoid file-by-file selection). Prefer docs for usage questions; prefer code for implementation questions. Use
--include-full-directory-structureso Gemini still sees the full tree. - If needed, create a small number of semantic packs by subsystem/folder (e.g. 2–5 packs), not a pile of single-file packs (user will run the prompt once per pack, sequentially).
- Handoff pack(s) to Gemini. If Gemini’s answer is vague/weird but points at relevant areas, do a second pass: re-pack focusing on those folders and ask again with a narrower question.
Command templates (copy/paste)
Prefer the system-installed repomix binary when available:
repomix --version
If repomix is not on PATH, replace repomix below with pnpm dlx repomix@latest (or npx repomix@latest).
Local repo (first pass / measurement) → XML pack + token stats
repomix source_directory --style xml -o repomix-output.your-file-name.xml --top-files-len 100 --token-count-tree
Local repo (second pass / filtered whole repo) → XML pack + token stats
Start with a small “obvious noise” ignore list and adjust it based on the first pass token stats.
repomix source_directory --style xml -o repomix-output.filtered.xml --top-files-len 100 --token-count-tree \
--ignore "**/dist/**,**/build/**,**/target/**,**/coverage/**,**/node_modules/**,**/*.svg,**/*.png,**/*.jpg,**/*.jpeg,**/*.gif,**/*.pdf,**/*.zip" \
--remove-empty-lines --truncate-base64
Focused pack (semantic split) with full tree context
repomix source_directory --style xml -o engine.xml --top-files-len 100 --token-count-tree \
--include "src/engine/**,src/shared/**,README.md" \
--ignore "**/*.svg,**/*.png,**/*.jpg,**/*.min.js,**/*.map,**/dist/**,**/build/**,**/node_modules/**" \
--include-full-directory-structure
Reduce tokens without losing code (much) semantics
repomix source_directory --style xml -o repomix-output.your-file-name.xml --remove-empty-lines --truncate-base64
Architecture-first (structure/signatures over bodies)
repomix source_directory --style xml -o repomix-output.your-file-name.xml --compress
Split output by size (for tool file-size limits)
repomix source_directory --style xml -o repomix-output.your-file-name.xml --split-output 1mb
Note: --split-output groups by top-level directory; a single file/directory will never be split across multiple output files. Prefer semantic splitting for analysis quality.
Remote repository pack
repomix --remote user/repo --remote-branch main --style xml -o repomix-output.your-file-name.xml --top-files-len 100 --token-count-tree
Add git contex
Установить repomix-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл repomix-analysis?
Pack repositories with Repomix for whole-codebase, cross-file analysis. Default to a whole-repo measurement pass, then a filtered whole-repo pack; if it fits under ~1M tokens, stop and hand off to Gemini. Only if it doesn’t fit after the initial noise filter, reduce scope at folder granularity (avoid file-by-file selection), then iterate based on Gemini feedback.
Как установить скилл repomix-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл repomix-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic