Skill Hub — AI-Assisted Development
Repository context packing with Repomix
Package selected repo context, analyze architecture, discover weak spots, and generate a safe implementation plan.
What this skill is for
This skill turns a repository into a focused, safe, AI-readable context bundle. The output is a temporary pack file and a structured prompt that an AI model can use to audit architecture, scope work, or plan changes without guessing or accessing private material.
When to use this skill
- You need an architecture audit or dependency review before planning work.
- You want to brief a coding agent with reproducible, scoped context.
- You are onboarding a new team member or agent to a codebase.
- You want to measure how much of the repo fits into a model's context window.
Real work situations
Audit a Jekyll site before adding a new area
You need to add a new Atlas section to a Jekyll site. You pack atlas/, _includes/, _layouts/, _data/, scripts/, and tests/ with Repomix, excluding _site/ and images. The model identifies the frontmatter conventions, the generator scripts, and the test files that will need updating. You avoid breaking the manifest count tests because the pack made the test structure visible.
Scope a refactor in a Python project
You want to refactor a module with many imports. You pack only the relevant package and its tests. The model maps call sites and proposes a migration plan file by file, rather than editing blindly.
Prepare a handover brief
A consultant is leaving a project. You pack the source, configuration, and README files into a Markdown bundle. The model produces a structured handover summary that the team can verify against the actual repo.
Inputs required
- Goal statement — what question the pack must answer.
- Repository path — root of the project to pack.
- Include patterns — globs for files relevant to the goal.
- Ignore patterns — globs for secrets, generated artifacts, images, and private notes.
- Output format — XML, Markdown, or compressed Markdown.
- Target model context window — so you know whether to split or compress.
Questions to ask
- What specific question must the AI answer from this pack?
- Which files are essential, which are helpful, and which are noise?
- Does the repo contain secrets, credentials, or private notes that must be excluded?
- Is the token count within the target model's context window?
- Can another team member reproduce this exact pack?
Working method
- State the goal. Write one sentence describing what the AI should do with the pack.
- Create a temporary directory. Use
.tmp/repomix/or/tmp/repomix/; never commit packs. - Draft include patterns. Start with the directories and file types relevant to the goal.
- Draft ignore patterns. Exclude
.git/,node_modules/,_site/,dist/, dotenv files, secrets, images, and private working directories. - Run Repomix. Use
npx repomix@latestwith explicit flags. - Review token count. If too high, split by concern or use compressed Markdown.
- Inspect the pack. Search for accidental inclusions such as secrets, private paths, or large generated files.
- Write the prompt. Tell the AI the goal, scope, evidence requirements, and stop conditions.
- Run the analysis. Feed the pack and prompt to the model.
- Validate findings. Check citations against the actual repository before acting.
Decision rules
- If the full repo exceeds the context window, split the pack by subsystem or layer.
- If the pack contains any secret or credential, delete it and fix the ignore patterns.
- If the goal is a single-file change, do not pack the whole repo.
- If the output will be shared, prefer XML for clear file boundaries.
- If token budget is tight, prefer compressed Markdown and add line numbers.
- If the model cannot answer from the pack, say so rather than invent a narrower pack.
Deliverables
- Repomix command — saved in the task notes so the pack is reproducible.
- Pack file — temporary XML or Markdown bundle in
.tmp/repomix/. - Analysis prompt — structured request sent to the AI.
- Findings report — AI output with citations, reviewed by a human.
Templates
Focused audit command
mkdir -p .tmp/repomix
npx repomix@latest \
-o .tmp/repomix/audit.xml \
--style xml \
--include "src/**/*.py,tests/**/*.py,README.md,pyproject.toml" \
--ignore "**/__pycache__/**,**/.git/**,**/node_modules/**,**/*.png,**/*.jpg,*.local"
Repository audit prompt
Goal: Audit the architecture of the repository in the attached pack.
Scope:
- Focus on src/ and tests/ only.
- Ignore generated artifacts, configuration secrets, and build outputs.
Tasks:
1. Summarize the overall structure and main modules.
2. Identify the three highest-risk areas for a refactor and explain why.
3. List any missing tests, documentation, or guardrails.
Rules:
- Cite specific files and line numbers for every finding.
- Do not propose changes that delete data or modify CI/CD without explicit confirmation.
- If you cannot determine something from the pack, say "unknown" rather than invent it.
Quality checklist
- The goal is stated in one sentence.
- Include and ignore patterns are documented and reproducible.
- The pack contains no secrets, credentials, or private paths.
- The token count fits the target model's context window.
- The prompt asks for citations and defines stop conditions.
- AI findings are validated against the actual repository before action.
Common mistakes
- Packing everything. Consequence: token budget is wasted on irrelevant files.
- Ignoring secrets too late. Consequence: credentials or private paths leak into the pack.
- Committing packs. Consequence: repository bloat and potential exposure of context bundles.
- Trusting AI architecture findings blindly. Consequence: changes based on hallucinated file relationships.
Agent instructions
When using this skill, gather the goal, repository path, and target model first. Separate facts from assumptions: the pack contents are facts; the AI's interpretation is an assumption until verified. Produce the four deliverables listed above. Avoid generic language such as "analyze the codebase"; instead, use concrete goals like "identify the three highest-risk coupling points." If information is missing, ask for it rather than guess.
Related skills
Related Atlas pages
Verification status and limitations
This skill is a public working interpretation of Repomix and context-engineering practice. Repomix version and behavior may change; verify commands against the current official documentation. This skill does not replace code review or security scanning.