klai: Skill for Claude Code

.agents/skills/audit-context-building/SKILL.md

audit-context-building is a skill for Claude Code, Codex from GetKlai/klai. It costs 55 tokens per session (867 once invoked), scanned A, original, MIT.

A method for understanding an unfamiliar codebase before searching for security bugs or reviewing its architecture. It maps what functions expect, guarantee, and depend on elsewhere.

In plain words
What is it for?
Use it at the start of an audit, threat model, or architecture review, especially when examining a whole codebase or several related functions.
Why use it?
It prevents findings from being judged without knowing how the system fits together. The resulting context makes later security or architecture work more accurate.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is GetKlai/klai's own configuration. It tells Claude Code and Codex how to work on klai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything klai configures →

View source ↗ GetKlai/klai
Reuse

Borrowing it

Nothing to install: this file belongs to GetKlai/klai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/GetKlai/klai/main/.agents/skills/audit-context-building/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/GetKlai/klai

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 audit-context-building

README.md
[![agentmods](https://agentmods.dev/badge/skills/getklai/klai/audit-context-building.svg)](https://agentmods.dev/skills/getklai/klai/audit-context-building)
Your own site
<a href="https://agentmods.dev/skills/getklai/klai/audit-context-building"><img src="https://agentmods.dev/badge/skills/getklai/klai/audit-context-building.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 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.00055 $0.00867
Opus 5 $0.00028 $0.00434
Sonnet 5 $0.00011 $0.00173
Haiku 4.5 $0.00006 $0.00087

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

Security

Grade A, and why

audit-context-building 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.

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.

.agents/skills/audit-context-building/SKILL.md · 73 lines

How it starts

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

Audit Context Building

Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.

When to Use

At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits together.

When NOT to Use

Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the hunting phase, which runs next and with the whole picture in hand. When the code counts on something and nothing checks it, record that plainly and move on — whether it matters is decided later.

Not worth the tokens on code you already understand.

Do not analyze in this context

The analysis is long, and this context needs to survive to use it. Dispatch it:

  • A codebase, or more than one function — run /audit-context-building:audit-context <path>. It orients, analyzes each function in its own subagent, and writes audit-context/DOSSIER.md plus one file per function under audit-context/functions/. Only compact records return here.
  • A single function — dispatch the audit-context-building:function-analyzer agent at it. It writes its prose to disk and returns a record.

Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's file when you need its detail.

The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose. Treat this section as routing, and route.

What comes back, and how to read it

Each record lists what must always be true (with the line that shows it), what the function takes on faith (with whatever establishes it), which functions it calls and what it needs from each, and anything still unclear. The dossier adds the rules that span several functions, who can reach what, and where the complicated parts cluster.

Two things matter more than the rest:

Read the full file on GitHub · 73 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 73 lines · 55 tokens per session scan A 222efa737435

Subscribe to this mod's changes

audit-context-building is a skill published in the GitHub repository GetKlai/klai (11 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 867 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.