update-source-map

update-source-map is a skill for Codex from Immortalqx/my_codex_skills. It costs 156 tokens per session (2,034 once invoked), scanned A, original, MIT.

A tool for building or refreshing a structured index of a project directory. It produces a human-readable Markdown map, a machine-readable JSON map, and preserves hand-written file summaries across updates.

In plain words
What is it for?
Creating or updating a project source map before multi-step work, including indexing files, refreshing navigation context, and retaining curated summaries.
Why use it?
It helps an agent or developer navigate an unfamiliar or changed codebase without repeatedly scanning every file. It also keeps useful project knowledge when files are added, removed, or renamed.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Creating or updating a project source map before multi-step work, including indexing…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/immortalqx/my_codex_skills/update-source-map
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Immortalqx/my_codex_skills --skill update-source-map
Clone the repo
git clone --depth 1 https://github.com/Immortalqx/my_codex_skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for update-source-map

README.md
[![agentmods](https://agentmods.dev/badge/skills/immortalqx/my_codex_skills/update-source-map.svg)](https://agentmods.dev/skills/immortalqx/my_codex_skills/update-source-map)
Your own site
<a href="https://agentmods.dev/skills/immortalqx/my_codex_skills/update-source-map"><img src="https://agentmods.dev/badge/skills/immortalqx/my_codex_skills/update-source-map.svg" alt="Measured on agentmods" height="20"></a>
Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,034 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00156 $0.02034
Opus 5 $0.00078 $0.01017
Sonnet 5 $0.00031 $0.00407
Haiku 4.5 $0.00016 $0.00203

Measured 7d ago against content hash 8c2e7f76e242, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

update-source-map scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/build_source_map.py, scripts/detect_existing.py, scripts/extract_headings.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

update-source-map/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Update Source Map

Overview

Build (or refresh) a structured index of a project directory. The skill always produces a Markdown SOURCE_MAP.md (primary, human-readable) and a JSON source_map.json (programmatic). A hand-curated curated_summaries.json is preserved across regenerations so curated per-file knowledge compounds over time.

When this skill runs

Trigger on requests like: - "build a source map for this project" - "update the source map" - "create a project index" - any task where Codex is about to do work in a workspace it doesn't already know well

Do not trigger for: code refactoring, single-file edits, paper reading, or tasks unrelated to project navigation.

Workflow

Step 1 — Decide mode (auto-detect)

Run scripts/detect_existing.py <workspace_root> to decide between create and update mode. Detection priority:

  1. <workspace>/x_temp/SOURCE_MAP.md + x_temp/source_map.json → update
  2. <workspace>/SOURCE_MAP.md + source_map.json → update
  3. <workspace>/.codex/source_map.json → update
  4. Otherwise → create

The detection JSON has fields: mode, md_path, json_path, found_at. Pass --force-mode create|update to override.

If detection returns partial: true (only one of the two files exists), warn the user before proceeding.

Step 2 — Confirm the Run Plan

Before any execution, report the plan:

  • Which mode (create / update) and why
  • Which workspace to scan
  • Where the outputs will go (default: <workspace>/x_temp/)
  • Any custom exclusions or extensions
  • Estimated file count from a quick find (to set expectations)

If the user explicitly asked you to build or update the source map, proceed after stating the plan. If the user only asked what would happen, stop after the plan.

Step 3 — Setup

Create the output directory if it doesn't exist:

mkdir -p <workspace>/x_temp

For update mode with diff support, also keep the previous inventory:

mv <workspace>/x_temp/file_inventory.jsonl <workspace>/x_temp/file_inventory.prev.jsonl

(only if regeneration would otherwise lose it)

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 160 lines · 156 tokens per session scan A 8c2e7f76e242

Subscribe to this mod's changes

update-source-map is a skill published in the GitHub repository Immortalqx/my_codex_skills (51 stars, last pushed 1mo ago), licensed MIT. It adds 156 tokens to every session and 2,034 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.