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.
npx skills add HuginnIndustries/CodeCartographer --skill contractsgit clone --depth 1 https://github.com/HuginnIndustries/CodeCartographerWrote 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.
[](https://agentmods.dev/skills/huginnindustries/codecartographer/contracts)<a href="https://agentmods.dev/skills/huginnindustries/codecartographer/contracts"><img src="https://agentmods.dev/badge/skills/huginnindustries/codecartographer/contracts/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.
<a href="https://agentmods.dev/skills/huginnindustries/codecartographer/contracts"><img src="https://agentmods.dev/badge/skills/huginnindustries/codecartographer/contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.00910 |
| Opus 5.5 | $0.00024 | $0.00364 |
| Sonnet 5.5 | $0.00012 | $0.00182 |
| Haiku 4.5 | $0.00006 | $0.00091 |
Grade A, and why
extract-behavioral-contracts 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 2mo 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.
What it actually says
Extract Behavioral Contracts
Recover what the system does from the outside in.
Prioritize sources in this order:
- READMEs, docs, and built-in help text
- examples, demos, screenshots, sample sessions
- tests and fixtures
- schemas, default settings, and changelogs
- source code for gaps and contradictions
Split the analysis by user-facing surface:
- CLI
- TUI
- web UI
- API or SDK
- bot or background worker
- storage or export formats — as user-visible behavior (what is written where, when it changes, what survives a restart). The byte-level catalog of on-disk and wire formats belongs to the protocols phase; name the format here and let protocols own its shape, so the two phases do not each write it.
For each feature, capture a contract with these fields:
featuretrigger or inputdefaultsobservable outputside effectspersisted stateerror behaviorretry or recovery behavior
Treat tests as executable contracts:
- Prefer them for edge cases, ordering, and failure handling.
- Compare them against docs to detect drift.
- Call out any doc/test conflict instead of silently picking one.
Separate essential behavior from source-specific ergonomics:
- Preserve user-visible semantics.
- Do not overfit to exact class names, file names, or UI implementation tricks.
- Keep keyboard shortcuts, command aliases, or display details only if they matter to parity.
Pay special attention to these high-value behaviors:
- cancellation and abort handling
- streaming and partial output
- queueing or follow-up behavior
- compaction and summarization
- persistence and resume flows
- tool execution and validation
Document the security and authorization model (if the system has one):
- Authentication method(s): OAuth, API keys, session tokens, SSO, etc.
- Authorization model: RBAC, ABAC, ACLs, capability-based, etc.
- Trust boundaries: what input is trusted vs untrusted.
- Permission checks: how and where permissions are enforced.
- Secret management: how tokens, keys, and credentials are stored and rotated.
- Session lifecycle: expiration, refresh, invalidation.
- Skip this area entirely if the system has no auth model (e.g., a pure library).
Document the configuration model:
- Config sources and their precedence (env vars > config file > defaults, etc.).
- Config file format, location, and discovery mechanism.
- Feature flags and how they are toggled.
- Environment-specific overrides (dev, staging, prod).
- Config validation and error handling for malformed config.
- If the config model is complex, use the secondary output at
findings/config-model/config-model.md.
Map every contract back to its owner:
- package or module
- shared core vs surface wrapper
- platform-specific adapter, if any
End with a black-box acceptance list:
- Write scenario-style checks that another implementation can run without referencing the source.
- Favor exact preconditions and expected outcomes over vague quality statements.
Mark every finding with one of these evidence levels:
observed fact: direct statement from docs, tests, schemas, types, or code.strong inference: behavioral conclusion drawn from multiple facts.external-behavior claim: a claim about what a system outside this source tree does (a server, engine, driver, third-party API, OS); unverifiable by reading this code, so it stays unsettled until a runtime probe or that system's own source confirms it.portability hazard: assumption tied to the source language, runtime, terminal, OS, or third-party SDKs.open question: missing or conflicting behavior that still needs evidence.
If behavior is hard to infer from docs alone, read the companion protocol skill next. Many user-visible quirks are really protocol or state-machine rules.
Use the output template at templates/behavioral-contracts.md.
The source code to analyze is in the parent directory (../ relative to .codecarto/). This is the repository root.
What ships with it
1 file 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.
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.
- 2mo ago Changed · +3 lines fdae51013d1e
- 2mo ago Changed · +1 lines ef9858990779
- 3mo ago First seen · 90 lines · 59 tokens per session scan A 209b05abf5b7
extract-behavioral-contracts is a skill published in the GitHub repository HuginnIndustries/CodeCartographer (7 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 910 once invoked, about $0.0002 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-08-31.
extract-behavioral-contracts compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| extract-behavioral-contractsHuginnIndustries/CodeCartographer | Skill | 7 | 1mo ago | MIT | A | 59 | Claude Code, Codex |
| repomixyamadashy/repomix | Skill | 30k | today | MIT | A | 58 | Claude Code, Codex |
| ixix-infrastructure/Ix | Skill | 1.3k | yesterday | Apache-2.0 | A | 44 | Claude Code, Codex |
| ctf-pwncyberkaida/reverse-engineering-assistant | Skill | 997 | 3d ago | Apache-2.0 | A | 46 | Claude Code |
| ctf-revcyberkaida/reverse-engineering-assistant | Skill | 997 | 3d ago | Apache-2.0 | A | 52 | Claude Code |
| pyghidra-scriptingcyberkaida/reverse-engineering-assistant | Skill | 997 | 3d ago | Apache-2.0 | A | 209 | Claude Code |
| ctf-cryptocyberkaida/reverse-engineering-assistant | Skill | 997 | 3d ago | Apache-2.0 | A | 46 | Claude Code |