Logo Repomix Analysis

Repomix Analysis

Cộng đồng
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.

Tổng quan

Nhà phát hànhvicnaum
Kho mãvics-agent-skills
Tên kỹ năngrepomix-analysis
Sao
53
Bản fork
5
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được vicnaum công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Repomix Analysis trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/vicnaum/vics-agent-skills/tree/main/skills/repomix-analysis
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Repomix Analysis trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Repomix Analysis ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Repomix Analysis với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Repomix Analysis làm được gì?

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.

Vì sao nên dùng Repomix Analysis trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Repomix Analysis là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Repomix Analysis trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/vicnaum/vics-agent-skills/tree/main/skills/repomix-analysis. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Repomix Analysis?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Repomix Analysis với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Repomix Analysis với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Repomix Analysis có miễn phí không?

Kỹ năng này được vicnaum phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇