lat-md-knowledge-graph

lat-md-knowledge-graph is a skill for Claude Code, Codex from stevesolun/ctx. It costs 60 tokens per session (391 once invoked), scanned A, original, MIT.

A repository-local Markdown knowledge graph: a set of linked notes about a codebase, with references back to source files and symbols. A knowledge graph connects related pieces of information so they can be searched together.

In plain words
What is it for?
Use it to organize durable project knowledge with wiki links, source-code backlinks, searchable sections, and checks for broken or outdated links.
Why use it?
It keeps architecture, business rules, workflows, and test intent from being buried in one large instruction file or rediscovered repeatedly.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/stevesolun/ctx/lat-md-knowledge-graph
Any agent
npx skills add stevesolun/ctx --skill lat-md-knowledge-graph
Clone the repo
git clone --depth 1 https://github.com/stevesolun/ctx

Made for: Claude Code, 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 lat-md-knowledge-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/stevesolun/ctx/lat-md-knowledge-graph.svg)](https://agentmods.dev/skills/stevesolun/ctx/lat-md-knowledge-graph)
Your own site
<a href="https://agentmods.dev/skills/stevesolun/ctx/lat-md-knowledge-graph"><img src="https://agentmods.dev/badge/skills/stevesolun/ctx/lat-md-knowledge-graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 391 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00060 $0.00391
Opus 5 $0.00030 $0.00196
Sonnet 5 $0.00012 $0.00078
Haiku 4.5 $0.00006 $0.00039

Measured 5d ago against content hash e630e7e16769, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lat-md-knowledge-graph 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 5d ago.

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.

imported-skills/lat-md/skills/lat-md-knowledge-graph/SKILL.md · 50 lines

What it actually says

lat.md Knowledge Graph

Purpose

Turn durable project knowledge into linked markdown files that agents can search, cite, and keep synchronized with code.

When to Use

  • One root instruction file is too large or hides domain decisions.
  • Agents repeatedly rediscover the same architecture or business rules.
  • Test intent needs explicit specs linked to test code.
  • A custom harness needs persistent memory outside conversation history.

Design Pattern

  1. Create a repo-local knowledge directory such as lat.md/ or docs/knowledge/.
  2. Split pages by durable concepts: architecture, domain rules, workflows, interfaces, test specs, and operational constraints.
  3. Link concepts with [[wiki links]].
  4. Link knowledge pages to source symbols or files.
  5. Add code backlinks such as comments or metadata where the code implements a documented rule.
  6. Add a check that fails on broken links, missing backlinks, stale indexes, or test specs without code mentions.

ctx Fit

Use this alongside ctx's LLM-wiki when a project needs its own local memory graph. ctx recommends skills/MCPs/agents from its catalog; the repo-local graph stores project-specific facts that should not live in the global catalog.

Quality Bar

  • Page titles and section anchors are stable.
  • Links resolve both ways where needed.
  • Code backlinks are narrow and reviewable.
  • Checks run in CI before merge.
  • Sensitive facts stay out unless the repo already allows them.
  • The graph explains current behavior, not a speculative roadmap.
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. 5d ago First seen · 50 lines · 60 tokens per session scan A e630e7e16769

Subscribe to this mod's changes

lat-md-knowledge-graph is a skill published in the GitHub repository stevesolun/ctx (583 stars, last pushed 5d ago), licensed MIT. It adds 60 tokens to every session and 391 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

hs-release

Cut a core Hindsight release (vX.Y.Z) and open the changelog + blog PR. Use when asked to cut/start a release, bump the version, or publish a new Hindsight version.

vectorize-io/hindsight · 45 tokens

hindsight-local

Store user preferences, learnings from tasks, and procedure outcomes. Use to remember what works and recall context before new tasks. (user).

vectorize-io/hindsight · 32 tokens

handoff

Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.

rohitg00/agentmemory · 55 tokens

agentmemory-hooks

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

rohitg00/agentmemory · 42 tokens

agentmemory-agents

How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent, when asked which agents are supported, or when a connect adapter writes the wrong config path.

rohitg00/agentmemory · 46 tokens

last30Days

Resolve "last30Days" to a concrete ISO date range relative to your run time — a rolling 30-day window ending today. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a "last 30 days" / trailing-month task…

chaitanyagiri/munder-difflin · 83 tokens