Quick Ref / Command

Engineer Kit

/ak:repomix

AI-ready repo context

Pack local, remote, or third-party repositories into AI-friendly XML, Markdown, JSON, or plain-text context with token counts and security checks.

01

Assess requirements

02

Configure filters

03

Execute packaging

04

Validate output

Rule 01

Package only the repository context the next AI task truly needs

Rule 02

Use include and ignore patterns to keep large codebases focused

Rule 03

Token counts are a delivery gate for the target model context

Rule 04

Security checks and manual output review happen before sharing

Rule 05

Remote repositories can be packed for analysis without cloning

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Assess requirements Identify the local path or remote repository, the intended AI analysis or audit, the output format, and sensitive-data concerns.
  2. 2 Configure filters Set include and ignore patterns, decide whether to respect .gitignore, and enable comment removal only when it helps the target task.
02

Work

Agent / skill execution

  1. 3 Execute packaging Run Repomix locally or with `npx repomix --remote`, choose `--style xml|markdown|plain|json`, and write or copy the output file.
  2. 4 Validate output Review the generated file, token counts or token-count tree, security warnings, and target model context limits before delivery.
03

Verify

Gate, review, validation

  1. 5 Deliver context Provide the packaged file, token count summary, selected filters, and any omitted areas, warnings, or security caveats.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:repomix [path] [--style xml|markdown|plain|json]

Arguments

[path]

Repository path

Local repository or folder to pack. Omit it to package the active working directory; use remote options only when the source is not local.

/ak:repomix packages/auth --style markdown

Shared options

--style xml|markdown|plain|json

Output style

Selects XML, Markdown, JSON, or plain text. It changes the bundle format, not the source files being included.

/ak:repomix . --style markdown
--include <patterns>

Include patterns

Narrows the pack to matching files or folders, such as source modules, docs, manifests, or one package in a monorepo.

/ak:repomix . --include "src/**/*.ts,*.md"
-i <patterns>

Extra ignores

Adds ignore patterns for noisy, generated, or sensitive paths. It should not be used to hide unresolved security warnings.

/ak:repomix . -i "tests/**,*.test.js"
-o <file>

Output file

Writes the generated bundle to an explicit file instead of the default repomix-output.xml in the working directory.

/ak:repomix src -o artifacts/src-context.md --style markdown
--remote <repo-or-url>

Remote repository

Packages a public repository shorthand, URL, or commit through Repomix remote processing. Use an authorized local clone for private code.

/ak:repomix --remote yamadashy/repomix --style xml
--remove-comments

Remove comments

Removes supported-language comments to reduce context size, but may discard licenses, rationale, generated-file notices, or safety constraints.

/ak:repomix src --remove-comments --style markdown
--copy

Copy to clipboard

Copies the generated bundle to the system clipboard in addition to normal processing. Review sensitive content before using it.

/ak:repomix . --copy
--init

Create config

Creates repomix.config.json for reusable packaging settings. It does not create the repository bundle by itself.

/ak:repomix --init
--token-count-tree [min]

Token tree

Shows token-heavy files and directories, optionally above a minimum threshold, so the bundle can be narrowed before sharing.

/ak:repomix . --token-count-tree 1000
--no-security-check

Skip security scan

Disables Secretlint-based scanning. Use only after an explicit risk decision; it is not proof that the bundle is safe to share.

/ak:repomix . --no-security-check

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Default codebase snapshot Recommended
/ak:repomix . --style xml
Use when:
Use when the whole current repository should become AI-readable context for analysis or planning.
Expected:
Assesses sensitivity and target use, runs a standard XML pack, reviews token counts and security warnings, then returns the output file with caveats.
Focused review pack
/ak:repomix . --include "src/**/*.ts,*.md" --remove-comments --style markdown
Use when:
Use when a human reviewer and an LLM both need a smaller source-and-docs context pack.
Expected:
Configures include filters, removes supported comments, emits a Markdown pack for inspection, and reports token count plus any omitted or risky areas.
Remote library audit
/ak:repomix --remote vendor/library --style xml -o audit.xml
Use when:
Use when a third-party GitHub repository needs to be packaged for security audit or library evaluation without cloning.
Expected:
Packages the remote repository into audit.xml, keeps Repomix security checks active, reviews the generated summary, and highlights credentials or warnings before handoff.
Token-heavy monorepo scan
/ak:repomix . --token-count-tree 1000
Use when:
Use before packing a large monorepo when the biggest token contributors must be found first.
Expected:
Generates a token-count tree filtered to large entries, identifies directories or files to include or ignore, and uses that summary to narrow the final pack.

Handled Scope

  • AI-friendly repository snapshots
  • Remote repository packaging
  • Include and ignore pattern design
  • Token-count tree analysis
  • Secretlint-backed security checks
  • Comment removal and output formatting

Next