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 Pisama-AI/pisama-claude-code --skill pisama-diagnosegit clone --depth 1 https://github.com/Pisama-AI/pisama-claude-codeWrote 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/pisama-ai/pisama-claude-code/pisama-diagnose)<a href="https://agentmods.dev/skills/pisama-ai/pisama-claude-code/pisama-diagnose"><img src="https://agentmods.dev/badge/skills/pisama-ai/pisama-claude-code/pisama-diagnose/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/pisama-ai/pisama-claude-code/pisama-diagnose"><img src="https://agentmods.dev/badge/skills/pisama-ai/pisama-claude-code/pisama-diagnose.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.00150 | $0.01751 |
| Opus 5.5 | $0.00060 | $0.00700 |
| Sonnet 5.5 | $0.00030 | $0.00350 |
| Haiku 4.5 | $0.00015 | $0.00175 |
Grade B, and why
pisama-diagnose scanned grade B with 1 finding 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.
Enumerates other installed skillsmediumAgent snooping
Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.
SKILL_DIR="$(dirname "$(find . ~/.claude/skills ~/.codex/skills -name diagnose.py -path '*pisama-diagnose*' 2>/dev/null | head -1)")" How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pisama Diagnose
You are diagnosing a failing AI agent run using the live Pisama backend. Pisama runs failure detectors over the trace, localizes the primary failure, explains the root cause, and returns a fix. With a connected key it also returns an apply-ready CLAUDE.md/.cursorrules guardrail and (for n8n) can apply the fix directly. Your job is to run the bundled engine, read the report back to the user clearly, and offer to apply the guardrail.
The engine is a self-contained, standard-library Python script next to this file:
diagnose.py. It needs Python 3.8+ and network access to api.pisama.ai. The
diagnosis call is public, so no API key is required to diagnose. A key
unlocks the apply-ready patch and stored-detection lookups.
When to use
- The user has an agent trace, trajectory, or eval that failed or looks wrong.
- The user asks "why did my agent fail / loop / give up / hallucinate here?"
- The user wants a root-cause report or a fix they can apply.
Inputs the engine accepts
- An ATIF / trajectory JSON file (the common case). ATIF is Pisama's trace interchange format; exporters exist for LangGraph, n8n, Dify, OpenClaw, and raw OTEL. If the user has a different trace shape, ask them to export ATIF or point you at the trajectory JSON.
- A pasted trace on stdin (
-). - A Pisama detection id (
--detection-id), which fetches a stored detection. This path needs a connected key (pisama-cc connect).
Flow
-
Find the script. It sits beside this SKILL.md. Resolve its path, for example:
SKILL_DIR="$(dirname "$(find . ~/.claude/skills ~/.codex/skills -name diagnose.py -path '*pisama-diagnose*' 2>/dev/null | head -1)")"If the user installed via
pisama-cc install, it is at~/.claude/skills/pisama-diagnose/diagnose.py. -
Run the diagnosis and write a report file the user can keep:
python3 "$SKILL_DIR/diagnose.py" path/to/trace.json --out diagnosis.mdTo diagnose a pasted trace:
pbpaste | python3 "$SKILL_DIR/diagnose.py" - --out diagnosis.md
What ships with it
2 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.
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 First seen · 138 lines · 150 tokens per session scan B 50f63584a4e7
pisama-diagnose is a skill published in the GitHub repository Pisama-AI/pisama-claude-code (2 stars, last pushed 2d ago), licensed MIT. It adds 150 tokens to every session and 1,751 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
hermes-s6-container-supervision
Modify or debug s6 services in the Hermes Docker image.
ast-grep
AST-aware structural code search and rewrite via ast-grep.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
node-inspect-debugger
Debug Node.js via --inspect + Chrome DevTools Protocol CLI.
inspecting-hermes-desktop-dom
Read the live Hermes desktop DOM/CSS over CDP.
module-regression
Govern cross-module regression in large repositories with a REGRESSION.md ledger that records each module's downstream consumers and executable acceptance command. After a change, run the changed module and every affected downstream command, and use observed exit codes as regression evidence under the project's…