Repomix Analysis logo

Repomix Analysis

Community
vicnaum
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.

Overview

Publishervicnaum
Repositoryvics-agent-skills
Skill namerepomix-analysis
Stars
53
Forks
5
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by vicnaum on GitHub. Read the source before you install it.

Installation

Install the Repomix Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vicnaum/vics-agent-skills/tree/main/skills/repomix-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vicnaum/vics-agent-skills.git /tmp/vics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/vics-agent-skills/skills/repomix-analysis .claude/skills/repomix-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Repomix Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Repomix Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Repomix Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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-check only 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

  1. Define the analysis question.
  2. 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)).
  3. Define an initial “obvious noise” filter (file types + folders) from the token stats (no content inspection; use only paths).
  4. 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).
  5. 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.
  6. 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-structure so Gemini still sees the full tree.
  7. 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).
  8. 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:

bash
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

bash
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.

bash
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

bash
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

bash
repomix source_directory --style xml -o repomix-output.your-file-name.xml --remove-empty-lines --truncate-base64

Architecture-first (structure/signatures over bodies)

bash
repomix source_directory --style xml -o repomix-output.your-file-name.xml --compress

Split output by size (for tool file-size limits)

bash
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

bash
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 context (only when it helps the question)

bash
repomix source_directory --style xml -o repomix-output.your-file-name.xml --include-diffs --include-logs --include-logs-count 25

Scope / filtering heuristics (practical)

  • Default: pack the whole repo first to get token stats. Apply an initial “obvious noise” filter (non-code/unrelated folders + file types), then re-pack. If still over budget, widen exclusions (other non-essential → tests → examples → drop either docs or code based on the question). Only then exclude code/docs by relevance (prefer folders/modules).
  • Keep: entrypoints, core source (src/), configuration, schemas/migrations, key docs (README, SPEC, ADRs), and tests that define behavior.
  • Exclude first: build outputs (dist/, build/, target/), caches, coverage, vendored deps, large assets, huge fixtures/dumps, generated code blobs, and large repo-meta (e.g. changelogs/release notes) unless directly relevant.
  • Use .repomixignore for repeated iterations; use --ignore for one-offs.
  • Use --include-full-directory-structure when you pack only a subset but still want the model to see the full repo tree.
  • Prefer folder-level --include/--ignore patterns (and a few key docs/config files) over curating individual files.

Include vs ignore (priority rules)

  • --include is a positive filter (pick candidates). --ignore is a negative filter (remove candidates). If a file matches both, it is excluded (ignore wins).
  • Ignore sources apply in this order (highest priority first): custom ignore patterns (--ignore / ignore.customPatterns) → ignore files (.repomixignore, .ignore, .gitignore, .git/info/exclude) → default patterns (e.g. node_modules/**, dist/**). If --include “doesn’t work”, it’s usually because one of these ignore sources is still excluding the file.
  • To include files that are being excluded by default ignore sources, disable the relevant layer: --no-gitignore, --no-dot-ignore, and/or --no-default-patterns.
  • --include-full-directory-structure only affects the Directory Structure section; it does not override ignore filtering.

Gemini handoff (what to ask the user to do)

When the pack(s) are ready, ask the user to upload the file(s) to Gemini and run a prompt like this:

text
You are analyzing a repository packed by Repomix (attached).
Use the attached Repomix file(s): <filenames>.

Task:
<the exact question and objective>

Constraints:
- Cite file paths for every non-trivial claim.
- When reasoning about behavior, trace cross-file call paths and data flow.
- Avoid speculation. If information is missing or ambiguous, state what’s missing and what additional pack/file would resolve it.

Output format:
- Summary (3–7 bullets)
- Key files/modules (path → responsibility)
- Detailed analysis
- Actionable next steps / follow-up questions (only if needed)

If you created multiple semantic packs (e.g., engine.xml then plugins.xml), provide one prompt per pack, specify the order, so user can carry forward a short summary between runs.

Frequently asked questions

What does the Repomix Analysis AI skill do?

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.

Why use Repomix Analysis on TypingMind?

Because you install it once and use it with any model. Repomix Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Repomix Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vicnaum/vics-agent-skills/tree/main/skills/repomix-analysis. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Repomix Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Repomix Analysis?

As many as you like. As long as a model supports skills, you can use Repomix Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Repomix Analysis AI skill free?

It is published on GitHub by vicnaum. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇