Get Started
Back to Skill Shed
DevOps

Repo Map

Prompte20 March 2026BeginnerClaude Code
repo-mapproject-scannerdeveloper-toolscontextmulti-repodevopsautomationlaunchdcron

What This Skill Does

Gives your AI coding agent instant awareness of every project in your workspace. A shell script scans your projects directory, detects tech stacks from manifest files (package.json, Cargo.toml, Package.swift, etc.), collects git metadata, and writes a structured JSON scan. A companion markdown map (REPO-MAP.md) serves as the human-readable reference. When you invoke the skill, your agent reads both files and can answer questions like "which repo uses Prisma?", "what changed recently?", or "how do these projects relate?".

When to Use It

  • When starting work and you need to find the right repo for a task
  • When working across multiple projects and need to understand relationships
  • When onboarding to a new codebase or team with many repos
  • When you want your AI agent to have full cross-project awareness
  • Say "show me the map", "which repo does X?", or use /repo-map

How It Works

1. scan-repos.sh walks your projects directory and collects metadata per repo:

  • Git status (last commit, remote URL, branch)
  • Tech stack detection from manifest files
  • File/directory counts and last-modified dates
  • Presence of CLAUDE.md, README.md, etc.

2. Results are written as valid JSON to last-scan.json (using jq for safe encoding)

3. update-map.sh runs the scan, then invokes Claude Code to reconcile the markdown map

4. A launchd/cron job runs this daily so the map stays current

5. The slash command reads both files and provides contextual answers

Setup

1. Create a MAP directory in your projects root

2. Save the skill's scan-repos.sh and update-map.sh scripts there

3. Edit the PROJECTS_DIR variable in both scripts to point to your projects root

4. Run scan-repos.sh once to generate the initial last-scan.json

5. Run update-map.sh to generate the initial REPO-MAP.md

6. (Optional) Set up a launchd agent or cron job for daily updates

Requirements

  • jq (for safe JSON generation): brew install jq or apt install jq
  • git (for repo metadata)
  • Claude Code CLI (for the update-map.sh reconciliation step)
  • macOS or Linux

Skill File

repo-map.skill.md
---
name: repo-map
version: 1.0.0
description: "Scan your projects directory and maintain a structured repository map with tech stacks, git metadata, and cross-repo context. Use when you need to find repos, understand project relationships, check what changed recently, or get cross-project awareness. Triggers on: 'show me the map', 'which repo', 'project overview', 'what repos do I have', '/repo-map'."
---

# Repo Map — Cross-Project Awareness for AI Agents

You have access to a repository map system. When the user asks about their projects, repos, tech stacks, or needs cross-project context, use this skill.

## What to Read

1. Read the repo map markdown file at `{MAP_DIR}/REPO-MAP.md` for structured descriptions, categories, and relationships
2. Read `{MAP_DIR}/last-scan.json` for machine-readable scan data including recent commits, tech stacks, and file counts

Replace `{MAP_DIR}` with the actual path to the MAP directory in the user's projects root.

## How to Respond

Based on the user's question:

1. **"Which repo does X?"** — Search the map for matching tech stacks, descriptions, or categories. Return the repo name, path, and relevant details.

2. **"What changed recently?"** — Check `last_commit_date` and `last_modified` fields in last-scan.json. Sort by most recent. For deeper history, run `git log --oneline -5` in the relevant repos.

3. **"How do these projects relate?"** — Look at the Cross-Cutting Themes section in REPO-MAP.md. Check for shared tech stacks, GitHub orgs, and lineage notes.

4. **"Project overview"** — Summarize the Quick Reference table: category counts, key repos per category, and overall stats (total repos, how many have git, how many have CLAUDE.md).

5. **"Find repos using [technology]"** — Check both `detected_stack` in last-scan.json AND the Stack field in REPO-MAP.md (the markdown may have more detail from manual annotation).

## Keeping the Map Current

If the user mentions a new project or you notice the scan is stale (check `scan_date` in last-scan.json):

```bash
bash {MAP_DIR}/scan-repos.sh
```

This regenerates last-scan.json. For a full reconciliation that also updates REPO-MAP.md:

```bash
bash {MAP_DIR}/update-map.sh
```

## Setup Instructions (First Time)

If the MAP system doesn't exist yet, help the user set it up:

1. Create the MAP directory:
   ```bash
   mkdir -p ~/Projects/MAP
   ```

2. Create `scan-repos.sh` — a shell script that:
   - Iterates over all directories in the projects root
   - For each directory, collects: name, is_git, last_commit, remote_url, branch, has_claude_md, has_readme, has_package_json, detected_stack (from manifest files), file_count, subdir_count, last_modified
   - Uses `jq` to safely encode all strings (prevents shell injection from repo names or commit messages)
   - Writes atomically (temp file + mv) to prevent partial reads
   - Detects tech stacks from: package.json (Next.js, React, Vue, Express, TypeScript, Electron, Vite, Tailwind, Prisma), Cargo.toml (Rust), Package.swift (Swift), go.mod (Go), pyproject.toml/requirements.txt (Python)

3. Create `update-map.sh` — runs the scan then invokes Claude Code to reconcile REPO-MAP.md

4. (Optional) Schedule daily updates via launchd (macOS) or cron (Linux):
   ```bash
   # macOS launchd example — runs at 10:32am daily
   cat > ~/Library/LaunchAgents/com.user.map-updater.plist << 'EOF'
   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
   <dict>
       <key>Label</key>
       <string>com.user.map-updater</string>
       <key>ProgramArguments</key>
       <array>
           <string>/path/to/MAP/update-map.sh</string>
       </array>
       <key>StartCalendarInterval</key>
       <dict>
           <key>Hour</key>
           <integer>10</integer>
           <key>Minute</key>
           <integer>32</integer>
       </dict>
       <key>StandardOutPath</key>
       <string>/path/to/MAP/cron.log</string>
       <key>StandardErrorPath</key>
       <string>/path/to/MAP/cron-error.log</string>
       <key>EnvironmentVariables</key>
       <dict>
           <key>PATH</key>
           <string>/Users/you/.local/bin:/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin</string>
       </dict>
   </dict>
   </plist>
   EOF
   launchctl load ~/Library/LaunchAgents/com.user.map-updater.plist
   ```

   **Important:** Include the path to your Claude CLI binary in the PATH. Check with `which claude`.

$ARGUMENTS

Install

Claude Code

Save to your project's .claude/skills/ directory. Claude Code picks it up automatically.

Save to:
.claude/skills/repo-map.skill.md
Or use the command line:
mkdir -p .claude/skills/ && curl -o .claude/skills/repo-map.skill.md https://prompte.app/skill-shed/repo-map/raw

Explore more skills

Browse the full library of curated skills for your AI coding CLI.