update-source-map

Generate and update Markdown and JSON source maps indexing project directories.

52|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Immortalqx/my_codex_skills --skill update-source-map-immortalqx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-source-map
Source: https://github.com/Immortalqx/my_codex_skills/tree/main/update-source-map
Command: npx skills add https://github.com/Immortalqx/my_codex_skills --skill update-source-map-immortalqx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Working in an unfamiliar or evolving project workspace wastes time when an agent or developer lacks a structured overview of its files. This Skill builds and refreshes a reusable project index so navigation context is always available without re-scanning manually. ## Core Features & Use Cases - Auto-detected create/update modes: Detects existing SOURCE_MAP.md and source_map.json artifacts to decide whether to create a new map or update an existing one, with diff reporting of added and removed files. - Dual output formats: Produces a human-readable Markdown index with directory trees, per-folder breakdowns, and file inventories, plus a structured JSON file for programmatic queries. - Persistent curated summaries: Hand-written one-line file descriptions in curated_summaries.json survive every regeneration, so curated knowledge compounds over time. - Use Case: Before starting a multi-file refactoring task in an unfamiliar repository, run the skill to index all Markdown and PDF files, then use the generated map to locate relevant documents across turns. ## Quick Start Use the update-source-map skill to build a source map of this workspace so you can navigate its files.

Frequently Asked Questions about update-source-map

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a source map for a project directory?

Run the regenerate.py script with the workspace root path, for example python3 scripts/regenerate.py <workspace_root>. It auto-detects whether to create or update, scans the workspace, and writes SOURCE_MAP.md, source_map.json, and curated_summaries.json into the x_temp output directory.

How do I update an existing source map after adding files?

Re-run the same regenerate command; the skill detects existing SOURCE_MAP.md and source_map.json files and switches to update mode automatically. The new output includes a diff section listing added and removed files, and existing curated summaries are preserved.

Does the source map tool read PDF file contents?

No, PDF files are indexed by metadata only, including size and modification date. The skill never reads PDF binary contents, and only Markdown files get word counts and H2/H3 heading extraction.

What files and directories are excluded from the workspace scan?

By default the scan skips node_modules, .git, .venv, dist, build, __pycache__, notes.assets, and x_temp directories, plus .DS_Store files. You can add custom exclusions with the --exclude flag or change scanned extensions with --ext.

Will regenerating the source map lose my curated file summaries?

No, curated_summaries.json entries are loaded and preserved across every regeneration in update mode. Only entries pointing to files that no longer exist are dropped, and new files simply start without a curated entry.

Can the source map skill modify my original project files?

No, the skill only writes inside its output directory, defaulting to x_temp. It never modifies files elsewhere in the workspace and explicitly skips files whose names contain markers like no modify, no-edit, or readonly.