agent-run-forensics
Ce qu’il fait
Cette compétence fait répondre l'agent aux questions sur son propre travail passé à partir de la session enregistrée, sans deviner. Elle s'adresse aux personnes qui doivent savoir pourquoi un fichier a changé ou si les tests ont vraiment réussi.
Quand l’utiliser
- ✓Quand vous voulez savoir pourquoi un agent a modifié un fichier lors d'une session précédente.
- ✓Quand vous devez vérifier qu'une série de tests a réellement réussi avant de faire confiance à un résumé.
- ✓Quand vous voulez comparer le résumé d'un agent sur ce qu'il a fait avec l'enregistrement.
Lien du skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-run-forensics/skills/agent-run-forensics/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Vérifie la session enregistrée et dis-moi pourquoi config.yaml a été modifié et si les tests ont vraiment réussi.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent retrouve l'exécution concernée parmi les sessions sauvegardées, puis construit une chronologie des étapes et des modifications de fichiers à partir de la transcription. Il vérifie chaque affirmation par rapport à l'enregistrement avant de la reprendre comme un fait.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Agent Run Forensics
Portability: 3 stdlib Python CLIs and one hook. Read-only, no network, no model calls. Secrets in transcripts are redacted in every output, with no switch to turn that off.
Agents are confidently wrong about their own history. Asked "why did you change
config.yaml?", an agent answers from what it remembers, and memory drops the
parts that matter: the test run that failed, the file a sed -i one-liner
rewrote, the edit made after the last green run. The harness recorded all of it.
This skill makes the answer come from that recording.
The rule: when a question is about something that already happened, read the trace before answering.
Workflow
# 1 - Find the run (skip if the question is about this session: the hook gives you its path)
python scripts/trace_finder.py --since 7d --touched config.yaml
# 2 - Read it: what happened, in order, and which files changed
python scripts/trace_timeline.py --trace <path> --files # SILENT = changed, never named by the agent
python scripts/trace_timeline.py --trace <path> --grep timeout # or --errors, --file PATH, --around N
# 3 - Walk back from the step in question
python scripts/trace_timeline.py --trace <path> --why 9
# 4 - Before repeating any summary as fact, check it
python scripts/claim_checker.py --trace <path> --claim "passed:pytest" --claim "not-edited:config.yaml"
Step 3 prints two lists and you keep them apart in the answer:
| Label | Means | Example |
|---|---|---|
recorded |
The harness wrote it down when it happened | the command, its exit code, the agent's words in the same message |
inferred |
Derived now by a named rule | prior-write, read-before-write, retry-after-failure, target-seen-in-output |
Say "the trace shows" only for recorded edges. Name an inferred edge as inferred, with its rule. The agent's own stated reason is recorded as a claim, not as the cause.
Step 4 turns each sentence of a summary into a typed claim (ran:, not-run:,
passed:, failed:, edited:, not-edited:, read:). STALE means the tests
passed but files changed afterwards; PARTIAL means exit 0 came from the last
command of a pipe or ; chain. Exit 4 is a contradiction: correct the account first.
Hard rules
- No trace, no answer. If the finder returns nothing (exit 2), say the run is not recorded here. Do not reconstruct it.
- Cite steps. Every factual sentence about the run points at a step number.
- Recorded and inferred stay separate. Never merge them into one confident sentence.
- Shell effects are inferred unless the harness diff (
bashEditDiff) confirms them. A command's text says what it was meant to do, not what it did. - Exit 0 of a compound line is the last command's.
pytest | tee logpassing says nothing about pytest. - Quote no secrets. Outputs are redacted; do not paste raw transcript lines around the redaction.
Scripts
| Script | Role | Exit codes |
|---|---|---|
scripts/trace_finder.py |
Lists recorded sessions by repo, window, touched file, text | 0 found · 2 none · 3 bad input |
scripts/trace_timeline.py |
Numbered steps, --files table, --why STEP chain |
0 · 2 filter matched nothing · 3 |
scripts/claim_checker.py |
Typed claims vs the recording | 0 all supported · 2 weak · 3 · 4 contradicted |
All support --help, --sample and --output json. trace_core.py is the shared parser.
The plugin's UserPromptSubmit hook (hooks/forensics_hint.py) adds one line naming this
session's transcript when a prompt asks about past work; disable it with AGENT_RUN_FORENSICS_HOOK=0.
References and assets
references/trace_sources.md: where each harness records, what is in a record, retention and limits (7)references/recorded_vs_inferred.md: why self-reports are not evidence, and the inference rules (7)references/claim_verification.md: turning a summary into claims, verdicts, and how to correct an account (7)assets/forensic_answer_template.md: the shape of an answerassets/claims_example.txt: a claims file for--claims-file
Questions fréquentes
Modifie-t-elle des fichiers ou envoie-t-elle des données ?
Non. La compétence est en lecture seule, n'utilise pas le réseau et n'effectue aucun appel de modèle.
Peut-elle montrer des secrets des anciennes sessions ?
Non. Les secrets sont toujours masqués dans sa sortie, et ce comportement ne peut pas être désactivé.
Comment retrouve-t-elle une exécution passée ?
Elle peut chercher parmi les sessions récentes par période ou par fichier modifié.
Détails
Description originale de l’auteur
Use when asked why an agent did something, what a past session or run changed, whether tests really passed, or to verify a session summary. Answers from the recorded transcript, not memory, with trace_finder.py, trace_timeline.py and claim_checker.py.
Popularité
- Étoiles GitHub
- 29k
- Position au classement
- #9527
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
agent-launcher-orchestrator
29kAide votre agent à planifier, construire, tester et programmer un agent géré Claude dans votre propre compte, étape par étape, à partir d'un objectif clair.
grade-iterate
29kPermet à votre agent d'évaluer le travail d'un agent IA géré selon une grille et de l'améliorer en un nombre fixe de tours, pour qu'il ne boucle jamais.
interview
29kPermet à votre agent de vous interroger sur une idée d'agent IA et de transformer vos réponses en un plan de construction simple avant tout lancement.
run-without-you
29kAide votre agent à configurer un agent géré IA pour qu'il s'exécute selon un planning ou lorsqu'un événement se produit, avec le calendrier vérifié avant le lancement.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.