From mk
Packs an external repository into a single AI-friendly file (markdown/xml/json) for third-party analysis, security audits, or handoff to external LLMs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mk:pack <source> [--style markdown|xml|json|plain] [--include pattern] [--ignore pattern] [--remove-comments] [--compress] [--self] [--no-security-check]When to use
Use when packing an EXTERNAL repository into a single AI-friendly file. NOT for packing the current project (the host runtime reads files lazily).
<source> [--style markdown|xml|json|plain] [--include pattern] [--ignore pattern] [--remove-comments] [--compress] [--self] [--no-security-check]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- SECURITY ANCHOR
Pack a repository into a single AI-friendly file for handoff to external tools, humans, or sessions.
vendor/library before adoption — one file for reviewmk:scout is the correct tool for inbound analysis — its Explore subagents read files in isolated contexts and return distilled summaries, keeping raw content out of the main agent's context. Packing dumps raw content directly into the caller's context, which is the opposite of what you want for inbound analysis./mk:scout for structured codebase exploration. Pack produces a flat dump; scout produces an architectural fingerprint./mk:chom for replication workflows.Exception: --compress mode (Tree-sitter signature extraction) is a genuine win for "give me the API surface of library X" queries — it produces a small, signature-only artifact that scout cannot reproduce. See Quick Start example.
/mk:pack yamadashy/repomix
/mk:pack https://github.com/vercel/ai --style markdown
/mk:pack yamadashy/repomix --include "src/**/*.ts" --remove-comments
/mk:pack /path/to/external/repo --style xml
/mk:pack vercel/ai --compress # API surface only (Tree-sitter)
Output lands at .claude/packs/{YYYYMMDD-HHMM}-{slug}.{ext}.
--compress extracts class/function/interface signatures via Tree-sitter parsing. Use for "what's the API of library X" queries where full-file content would exceed context budgets.
owner/repo, GitHub URL) or local path.scripts/self-pack-guard.sh "$source" "$self_flag". If the script exits non-zero, stop and show its message to the user..claude/packs/$(date +%Y%m%d-%H%M)-<slug>.<ext> where <ext> maps from --style (markdown → md, xml → xml, json → json, plain → txt).npx --yes repomix@^1.11 [computed flags] -o "<output>". Use --remote <source> for remote inputs; pass the local path directly otherwise.--no-security-check was passed, emit: "SECURITY SCAN DISABLED — review output manually before sharing."npx repomix@^1.11. Works even without a global repomix.--self. Default blocks packing the current repo to prevent accidental re-ingest.--no-security-check (explicit flag + emitted warning).mk:chom may reference this skill in handoff text but MUST NOT call it.npx fetches repomix on first invocation. Subsequent runs use the npm cache.@latest. ^1.11 limits breaking-change blast radius while allowing patch updates.npx requires network until repomix is cached locally.owner/repo, the guard treats it as a local path. Rename or use absolute path.See references/gotchas.md for troubleshooting repomix errors and additional edge cases.
Load only when needed:
| File | When |
|---|---|
references/options.md | User asks about specific flags or output formats |
references/gotchas.md | Pack fails, warnings appear, or repomix errors surface |
| Script | Purpose |
|---|---|
scripts/self-pack-guard.sh | Exits non-zero if the target resolves to the current git root and --self was not passed |
Typically follows: /mk:scout (when you need a portable snapshot after exploration)
Typically precedes: handoff to external tools, reviewers, or other LLMs
Related: /mk:chom (replication workflow — may reference pack in a future integration)
npx claudepluginhub ngocsangyem/meowkit --plugin mkScans codebases for hardcoded credentials before packaging with repomix. Blocks packaging if secrets are found, or forces packaging after cleanup.
Packs a remote or local repo with Repomix CLI, then reads and searches the output to provide structure overviews, pattern discovery, and metrics.
Explores and analyzes any local or remote repository by launching a Claude Code CLI process with read-only access. Use to understand repo structure, API, or implementation details.