AgentSkillsCN

repomix

将代码库打包成适合 AI 的 XML/Markdown 捆绑包,以实现上下文加载。 支持自动发现、分段捆绑、压缩等功能。适用于代码审查、调试以及架构理解。关键词:repomix、bundle、codebase、context。

SKILL.md
--- frontmatter
name: repomix
description: |
  Pack codebases into AI-friendly XML/Markdown bundles for context loading.
  Supports auto-discovery, segmented bundles, compression. Use for code review,
  debugging, architecture understanding. Keywords: repomix, bundle, codebase, context.
triggers:
  - /repomix
  - /repomix pack
  - /repomix bundle
  - /repomix auto
  - /repomix status
  - /repomix help
  - pack codebase
  - bundle repository
  - codebase context
negative_triggers:
  - general file operations
  - git operations (use /collab)
  - simple text search
version: 2.0.0
author: Christian Kusmanow / Claude
last_updated: 2026-01-23
security:
  trust_model: Local files only, no external uploads
  confirmations:
    - Cleanup of old bundle files before regeneration
  notes: Security check enabled by default (secretlint)

Skill: Repomix

Pack codebases into AI-friendly formats for context loading in Claude sessions.

When to Use

  • Preparing codebase context for AI code review
  • Debugging complex issues across multiple files
  • Understanding architecture of a new project
  • Sharing codebase snapshots for collaboration
  • Starting new Claude sessions with full project context

When NOT to Use

  • Simple file operations (use Read/Write tools)
  • Git operations (use /collab)
  • Searching for specific text (use Grep)

Quick Start

bash
# Pack current directory
bunx repomix

# Pack with compression
bunx repomix --compress

# Create Teslasoft bundles
/repomix bundle

Commands

CommandAction
/repomixLoad Repomix context and CLI reference
/repomix packPack current directory
/repomix pack --compressPack with token compression
/repomix autoIntelligent auto-discovery based on project type
/repomix bundleCreate all Teslasoft bundles
/repomix bundle --vaultCreate vault bundle only
/repomix bundle --webCreate all web segment bundles
/repomix statusShow existing bundles and freshness
/repomix helpShow CLI quick reference

Bundle Storage

Location: D:\TeamProjects\Teslasoft\.repomix-bundles\

BundleContent~Tokens
vault-bundle.xmlObsidian vault (goals, projects, resources)67K
web-app.xmlCore framework (base, common, layout)23K
web-modules.xmlFeature modules (api, dashboard, docs)32K
web-e2e.xmlCypress E2E tests7K
web-config.xmlBuild configs (nx, tsconfig)5K

See Bundle Workflow for details.


Output Formats

FormatFlagUse Case
XML--style xml (default)Best for LLMs
Markdown--style markdownHuman-readable
JSON--style jsonProgrammatic

Failure Modes & Recovery

IssueRecovery
Bundle too largeUse segmented bundles (--web-app, --web-modules)
Security warningReview flagged files, use --no-security-check if safe
Token limit exceededUse --compress flag, filter with --include
Stale bundlesRun /repomix bundle to refresh

Security & Permissions

  • Required tools: Bash (bunx commands)
  • Security check: Enabled by default via secretlint
  • Confirmations: Old bundles deleted before regeneration
  • Trust model: Local files only, no external uploads

Best Practices

  1. Use segmented bundles for targeted context loading
  2. Always compress large codebases (--compress)
  3. Check bundle status regularly (/repomix status)
  4. Start new sessions with fresh bundles for best results
  5. Use task-specific bundles (e.g., web-e2e for E2E testing)

References


Metadata

yaml
author: Christian Kusmanow / Claude
version: 2.0.0
last_updated: 2026-01-23
change_surface: references/ (CLI updates, new bundle types)
extension_points: references/bundle-workflow.md (new bundle segments)

Changelog

  • v2.0.0 (2026-01-23): SDL migration - Progressive disclosure structure
    • Split 796-line monolith into SKILL.md (~150 lines) + 4 references
    • Added YAML frontmatter with triggers and negative_triggers
    • Added security section and failure modes
  • v1.4.0 (2026-01-23): Segmented web bundles (82% token reduction)
  • v1.3.0 (2026-01-23): Added bundle and status commands
  • v1.2.0 (2026-01-23): Enhanced auto-discovery with project type detection
  • v1.1.0 (2026-01-23): Added auto argument for intelligent file selection