self-map

self-map is a skill for Claude Code, Codex from smixs/iva-agent. It costs 85 tokens per session (3,800 once invoked), scanned A, original, MIT.

A set of instructions for tracing an AI assistant's own turns, events, failures, logs, schedules, and usage data. It explains how to follow an event back to its cause and identify who or what owns the problem.

In plain words
What is it for?
Use it to investigate failed turns, inspect traces and service journals, check usage data, and report what happened and why.
Why use it?
It prevents diagnosis from relying on incomplete memory and avoids unsafe commands that could restart services or change state. It also limits large log reads to the relevant failure details.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; positional $N argument.

Good fit Use it to investigate failed turns, inspect traces and service journals, check usage data, and report what happened and why.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smixs/iva-agent/self-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 smixs/iva-agent --skill self-map
Clone the repo
git clone --depth 1 https://github.com/smixs/iva-agent

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 self-map

README.md
[![agentmods](https://agentmods.dev/badge/skills/smixs/iva-agent/self-map/github.svg)](https://agentmods.dev/skills/smixs/iva-agent/self-map)
Your own site
<a href="https://agentmods.dev/skills/smixs/iva-agent/self-map"><img src="https://agentmods.dev/badge/skills/smixs/iva-agent/self-map/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-map

Your own site · 80×15
<a href="https://agentmods.dev/skills/smixs/iva-agent/self-map"><img src="https://agentmods.dev/badge/skills/smixs/iva-agent/self-map.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,800 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.00085 $0.03800
Opus 5.5 $0.00034 $0.01520
Sonnet 5.5 $0.00017 $0.00760
Haiku 4.5 $0.00009 $0.00380

Measured yesterday against content hash 3845615fef55, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-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 yesterday.

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.

agent/skills/self-map/SKILL.md · 260 lines

How it starts

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

Self-map

Paths are relative to the bash folder — the running Version (~/iva/versions/<v>; ~/iva/current points at it). Your own code is here, not in ~/iva. Data is $ASSISTANT_DATA_DIR (default ./data). Everything below only reads.

Keep the output small

bash gives you only the last 30 000 characters of each stream; read_file stops at 24 000. Never cat a day file of the Trace or data/usage.jsonl: they run to megabytes. A long turn — print only what is around its failures:

iva trace show <session>/<turn> | grep -B4 -A2 -e 'failure=' -e 'turn.failed' -e 'step.failed'

Never in a turn without the owner

  • iva doctor — blocked: its repairs restart iva.service.
  • iva diagnose — read-only; in a turn only through report-problem.
  • iva logs, iva trace tail — they follow forever and end only on the bash timeout. Use journalctl … --no-pager -n N and iva trace show.
  • iva proactive on|off|set, iva jobs ack — they change state; only on the owner's word.

One turn = session + turn

turn_N starts again at turn_0 in every session, so a turn is named by both: <session>/<turn>, for example wrun_01M43YEKCW0FRANBS1E510CWX5/turn_0. Nobody tells you your own session; find the turn from what you have:

  • A line of the failure list in your prompt — it ends with the command; run it.
  • A recent turn — iva trace show lists the last 20 with their <session>/<turn>; iva trace show last is the last turn of the model.
  • A chat message — iva trace show tg:<chat>:<message>.
  • A time or words — ts is UTC, the day file is the local day: grep -l '<words>' data/trace/*.jsonl, then grep -h '<words>' data/trace/<day>.jsonl | cut -c1-200 shows turn and session.

A turn without a chat (Watch, Brief, Insight, a Reminder) starts with an eve.message.received whose prompt begins Watch:, Brief:, Insight: or Reminder. The lines that sent its answer (gate.outbound, outbox.*) carry no session: they are the sends right after its turn.completed.

Read the full file on GitHub · 260 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. yesterday Changed · +8 lines 3845615fef55
  2. 4d ago Changed · +64 lines · +3 tokens per session 7705bffedb4b
  3. 7d ago First seen · 188 lines · 82 tokens per session scan A c8b7dd331e83

Subscribe to this mod's changes

self-map is a skill published in the GitHub repository smixs/iva-agent (240 stars, last pushed today), licensed MIT. It adds 85 tokens to every session and 3,800 once invoked, about $0.0003 per session on Opus 5.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-10-09.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.

moltis-org/moltis · 33 tokens

code-review

Performs structured code review on a file or directory.

Alex8791-cyber/cognithor · 13 tokens

regex

Write, test, and debug regular expressions for pattern matching, search, and text extraction across programming languages. Use when the user asks to match patterns in text, validate input formats (email, URL, IP, phone, date), extract data with capture groups, build search patterns with lookahead or lookbehind, or…

bug-ops/zeph · 85 tokens

code-analysis

LSP-based code analysis via mcpls MCP server. Use for compiler-accurate type inspection, go-to-definition, find-all-references, diagnostics, call hierarchy, workspace symbol search, code actions, rename refactoring, and document formatting. Provides real compiler errors — not guesses. Keywords: LSP, language server…

bug-ops/zeph · 105 tokens

network

Network diagnostics, DNS lookup, port scanning, and connectivity testing. Use when the user asks to check if a host is reachable, trace network routes, resolve DNS records, inspect open ports, debug HTTP requests, check SSL/TLS certificates, test bandwidth, diagnose network latency, or troubleshoot connectivity issues…

bug-ops/zeph · 83 tokens

self-ops

Runtime self-diagnosis knowledge: database layout, observability APIs, timeout hierarchy, restart procedure, failure replay. Use when the user asks to debug this runtime itself — inspect its database, traces, prompt snapshots, timeouts, service health, or configuration.

spytensor/openmozi · 56 tokens