---
name: repo-map
description: Audit and map an unfamiliar or ambiguous source repository without modifying project, Git, dependency, runtime, or remote state. Use when Codex must locate the canonical repository, understand structure and tooling, identify entry points, tests, documentation, CI, or migrations, or establish evidence before planning code changes.
title: repo-map
canonical_url: https://skilld.dev/gh/ayobamih/coding-agent-skills/repo-map
last_updated: 2026-10-29T10:46:37.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [adapter-interface.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/adapter-interface.md), [agents/openai.yaml](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/agents/openai.yaml), [checklist.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/checklist.md), [evidence-template.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/evidence-template.md), [examples.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/examples.md), [failure-modes.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/failure-modes.md).
>
> If the user asked to install this Skill, run `npx skilld install ayobamih/coding-agent-skills/repo-map`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/repo-map`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/ayobamih/coding-agent-skills/repo-map) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/repo-map`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/repo-map --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/repo-map --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Repository Map

Produce an evidence-backed repository map. Remain audit-only and fail closed when repository identity or command safety is uncertain.

## Purpose And Use

Use this skill to establish canonical repository identity, structure, tooling, entry points, tests, CI, documentation, migrations, and boundaries before implementation. Do not use it for route-level tracing, builds, runtime validation, secret auditing, or any mutation.

## Inputs

Require a starting path and the user intent or subsystem to understand. Optionally accept an expected canonical remote, maximum traversal depth, project adapter identifier, or explicit approval for one normally excluded file.

Do not assume the starting path is the repository root, the README is current, one package manifest describes the whole repository, or a familiar directory is authoritative.

## Safety Boundary

Run only bounded inspection commands:

- `pwd`
- bounded `ls`
- `rg --files` with exclusions
- bounded `find` under the candidate repository
- `git rev-parse`
- `git remote -v`
- `git status --short --branch`
- bounded reads with `sed` or `head`
- structured parsers used only to read known manifest files

Do not write files, install packages, deploy, migrate, call privileged APIs, change processes or services, read secret files, scan an unrestricted home directory, or mutate Git. Reject shell chains containing a restricted operation even when another segment is allowed.

Treat `.env`, credential stores, private keys, token files, browser profiles, cloud configuration, and similarly named files as secret-bearing. Do not read them without explicit approval.

This is audit-only behavior. It may collect evidence but must not change the inspected project or external state.

## Procedure

1. Record user intent, starting path, declared scope, and adapter.
2. Confirm the path exists without searching outside the declared scope.
3. Locate candidate repository roots with bounded inspection.
4. Establish identity with Git root, remote, branch, HEAD, and working-tree state when Git exists.
5. Stop and report ambiguity if multiple candidates remain plausible.
6. Inventory top-level files and directories with bounded depth and explicit exclusions.
7. Inspect known manifests and workspace configuration without loading secret values.
8. Identify application entry points, packages, tests, CI, documentation, migrations, and generated-code boundaries.
9. Compare documentation claims with visible code structure; label discrepancies rather than resolving them by assumption.
10. Produce the shared evidence pack before claiming completion.

Use [checklist.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/checklist.md) while executing. Consult [failure-modes.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/failure-modes.md) when a check fails, [adapter-interface.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/adapter-interface.md) when an adapter is present, and [examples.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/examples.md) for safe and unsafe cases. Format results with [evidence-template.md](https://skilld.dev/api/skills-raw/ayobamih/coding-agent-skills/repo-map/evidence-template.md).

## Evidence, Recovery, And Dependencies

Emit repository identity, working-tree state, structural map, inspected manifests, boundaries, skipped checks, risks, and unresolved questions through the shared evidence-pack contract. Recover from missing paths, ambiguity, permissions, or malformed manifests only through narrower read-only inspection; never install, alter permissions, or mutate files.

This skill depends only on the evidence-pack contract. Adapters may add safe markers, paths, and evidence requirements but cannot weaken policy. Safe usage maps a named repository before editing; unsafe usage scans an entire home directory or reads secrets.

## Approval Boundary

Explicit approval may permit reading one named normally excluded file when necessary. Approval does not permit writes, installation, Git mutation, runtime mutation, deployment, migration, or privileged API access; those operations are outside this skill.

## Completion

Claim `complete` only when repository identity is established or explicitly non-Git, required structural areas were inspected, every required check is executed or recorded as skipped with consequence, no mutation occurred, uncertainties are reported, and the evidence pack is complete.

Otherwise report `partial`, `failed`, or `blocked`. Never equate command execution with successful mapping.

These conditions are both the acceptance criteria and definition of done.
