audit-pi-session
Skill1 starsChanged 3 months agoMITView on GitHub
Decode and audit Pi coding-agent HTML session exports with branch-aware metrics, tool-call correlation, and entry-level evidence. Use when a user provides or references a Pi `/export` HTML file and asks to analyze, review, summarize, debug, compare branches, evaluate agent behavior, investigate tool failures or inefficiency, verify completion claims, or improve prompts, skills, and coding workflows from the recorded session.
In this repository14 other files it gives its agents.
- bash-scriptSkill
- cli-uxSkill
- code-quality-gateSkill
- docs-pesapSkill
- external-reviewSkill
- githubSkill
- gitlabSkill
- good-apiSkill
- prekSkill
- pythonSkill
- rust-pesapSkill
- tdd-pesapSkill
- torcSkill
- uvSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Read references/session-schema.md when interpreting Pi entry types, branches, or extractor output.
- Distinctive: line 38
Read references/audit-rubric.md, apply only dimensions relevant to the user's question, and cite entry IDs, tool-call IDs, timestamps, or …
- Distinctive: line 43
Use active-path metrics for the work Pi would continue from.
- Distinctive: line 46
Treat command output and exit status as evidence of execution, not proof that the resulting code is correct.
- Distinctive: line 47
Treat final assistant claims as claims until supported by tool output or repository evidence.
- Very specific: line 48
Do not grade or reproduce private reasoning.
- Distinctive: line 53
Default to a concise report:
- Distinctive: line 75
Keep extraction local. Do not upload or web-search export contents unless the user explicitly requests it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit Pi Session
Analyze the structured session embedded in a Pi HTML export. Prefer decoded session data over scraping rendered HTML.
Workflow
- Confirm the target
.htmlfile. Treat it as sensitive: exports can contain source code, prompts, local paths, images, credentials, and tool output. - Resolve this skill's directory and run the bundled extractor locally:
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> summary- Read references/session-schema.md when interpreting Pi entry types, branches, or extractor output.
- Choose the smallest useful evidence view:
# Entries on the active branch; thinking text is omitted by default
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> active-path
# Branch leaves and their sizes
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> branches
# Tool calls correlated with results across the full tree
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> tools
# Inspect one abandoned or selected branch
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> active-path --leaf-id <entry-id>
uv run <skill-dir>/scripts/extract_pi_session.py <export.html> tools --leaf-id <entry-id>- Increase
--max-text-charsonly when truncated evidence matters. Userawonly for fields unavailable in the bounded views; it emits the complete decoded payload. - Read references/audit-rubric.md, apply only dimensions relevant to the user's question, and cite entry IDs, tool-call IDs, timestamps, or exact bounded excerpts.
- Separate direct observation, reasoned inference, and facts requiring repository inspection.
Scope Rules
- Use active-path metrics for the work Pi would continue from. Do not describe global tree totals as active-branch behavior.
- Inspect abandoned branches only when they explain retries, alternatives, useful discoveries, or wasted effort.
- Correlate assistant tool calls with
toolResultentries before judging success. A call without a result is pending or interrupted, not successful. - Treat command output and exit status as evidence of execution, not proof that the resulting code is correct.
- Treat final assistant claims as claims until supported by tool output or repository evidence.
- Do not grade or reproduce private reasoning. Evaluate observable prompts, responses, tool use, branch choices, and validation. The extractor reports thinking size but omits thinking text unless
--include-thinkingis explicitly requested. - Preserve unknown entry types as evidence rather than assuming they are irrelevant.
Reporting
Default to a concise report:
# Pi Session Audit
## Executive summary
## Requested and claimed outcome
## Material findings
- Severity: high | medium | low
Evidence: entry/tool ID and timestamp
Observation: directly recorded behavior
Impact: why it matters
Improvement: concrete alternative
## Validation evidence and gaps
## Better workflow
## MetricsReport only material findings. Avoid generic praise, checklist dumping, unsupported intent attribution, and precise duration claims unless timestamps establish them.
Privacy
Keep extraction local. Do not upload or web-search export contents unless the user explicitly requests it. Never repeat suspected secrets in the report; identify their location by entry ID and recommend rotation or redaction instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

