본문으로 건너뛰기
Skillpedia
일반 코딩29k · #9760

repomix

하는 일

이 스킬은 로컬이나 GitHub에 있는 코드 프로젝트를 AI가 읽을 수 있는 하나의 파일로 묶습니다. 낯선 저장소를 빨리 이해하고 싶은 개발자와 호기심 많은 사람을 위한 스킬입니다.

사용하는 경우

  • ✓낯선 저장소를 살펴보거나 이해하고 싶을 때.
  • ✓인증처럼 기능과 관련된 모든 코드를 찾아야 할 때.
  • ✓프로젝트가 얼마나 많은 토큰을 쓸지 알고 싶은 경우.

스킬 링크

https://github.com/yamadashy/repomix/blob/main/.agents/clawhub/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/yamadashy/repomix/blob/main/.agents/clawhub/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“facebook react 저장소를 묶어서 주요 컴포넌트와 상태가 어디서 관리되는지 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 로컬 폴더나 원격 GitHub 저장소에 Repomix 도구를 실행합니다. 무시 파일을 따르고, 보안 문제를 점검하며, 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:

  1. Search for the file tree section (near the beginning of the output)
  2. 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

  1. Use --compress for large repos (>100k lines) to reduce token usage by ~70%
  2. Use pattern search first before reading entire output files
  3. Use a temporary directory for output (/tmp on Unix, %TEMP% on Windows) to keep the user's workspace clean
  4. Use --include to focus on specific parts of a codebase
  5. 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
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬