task-debrief
Use when the user invokes a task debrief to verify the agent's completed work and audit its child agents, time, logged model cost, and workflow lessons in a…
by J-StaR-Films-Studios★ 27 GitHub stars
Install task-debrief in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Task debrief
Run this only when explicitly invoked by the user (/skill:task-debrief, /task-debrief, or a direct request for a task debrief). Optional arguments may name a task or time range.
Rules
- Read-only audit: write only inside
~/.agents/task-audits/. Do not modify project files, skills, config, or external services. - Suggest improvements in the report; ask for separate approval before applying any of them.
- Do not spawn agents to audit agents by default.
- Never copy full transcripts, raw prompt dumps, personal records, or credential values into reports.
- On re-runs, use a new dated report directory or get explicit consent before replacing an existing report.
1. Completion gate (before any audit work)
Check your live todo list and Takomi board (if used) for items belonging to the audited task:
- Verify completed items against real deliverables and checks, not status labels alone. Report any relevant
pending,in_progress, orblockeditems. - Do not confuse unrelated tasks with this task's unfinished work, silently mark items done, or treat deferred work as finished.
- Do not ask the user whether their to-do list is done; this is the agent's own completion check.
- If the task has unfinished work or its task state cannot be inspected, report that and stop before opening transcripts, collecting usage, or writing notes. Continue only if the user explicitly requested an interim audit, and label the report as interim.
Once the gate passes, set the audit window and report directory:
- Use the invoking user message timestamp as
--cutoffso the audit does not count itself (if unavailable, state the chosen cutoff and its limitation). - Use
PI_SESSION_FILEfrom a Pi shell tool as the parent journal. If it spans multiple tasks, bound--startand--cutoffusing user messages and completion; ask if ambiguous. An ephemeral session or missing journal means costs are unknown, not zero. - Use the repo root (or working directory) name as
<project>(add a short path hash if needed to disambiguate) and the task's thread ID or journal session ID as<task-id>. Create~/.agents/task-audits/<project>/<task-id>/.
2. Establish child ownership
- In T3 Code / Takomi Code: get the current thread ID via
t3_thread_listand paginateincludeSubagents: trueacross the project. Select only descendants with an unbrokenparentThreadIdchain to this thread (never match by similar title alone). - Call
t3_thread_read(view: "activity") for each owned child to record its runs, statuses, and timestamps. - Match each child to a local Pi journal by unique session name, creation time, and worktree/session provenance. Inspect candidate session headers only, not unrelated chat bodies. Leave ambiguous matches unmatched and disclose the gap.
- Outside T3 Code / Takomi Code: use explicit task/child IDs from local execution artifacts or user-supplied manifests, and report ownership as unverified. For Pi-only sessions with no thread metadata, ask for a child manifest or report only the verified parent rather than inventing an all-agent total.
- Count other providers' agents without local Pi journals as missing-usage children, never as
$0. Never infer child ownership from a project-wide file count.
3. Calculate usage
Write a small private manifest.json inside the report directory containing the parent and each owned child's exact thread ID, parent ID, title, optional sessionFile, and returned run records.
Run the bundled Pi JSONL collector:
node <skill-directory>/scripts/collect.cjs \
--parent "$PI_SESSION_FILE" \
--parent-thread <thread-id> \
--expected-children <count> \
--manifest <report-dir>/manifest.json \
--out <report-dir> \
--start <ISO-time> \
--cutoff <ISO-time>
- Pass
--expected-children 0with an empty manifest only when zero children is verified. - Inspect the generated
usage.jsonandusage.mdto verify child count, matched journals, timestamp bounds, and warnings before quoting totals. - When any usage records or child journals are missing, report both the known logged estimate and the unknown remainder, never a complete cost.
- On non-Pi runtimes, use that runtime's verified session and usage records instead of the Pi JSONL collector.
4. Read the task's evidence
Inspect relevant user requests and corrections, task packets, child conclusions, test/release receipts, and real blockers (sample large logs and cite concrete messages, files, or dated events).
- Separate user-authored prompts from system notifications and compaction summaries.
- Evaluate what went well, where friction happened, what in the user's prompting helped or complicated the work, and what the agent should do differently.
- Attribute failures fairly and label hypotheses as hypotheses.
- Distinguish calendar duration, summed child run intervals (which overlap and include waits), active tool work, and billed compute.
- Treat Pi's
usage.costas a lo
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- scripts/collect.cjs
- scripts/collect.test.cjs
FAQ
What does the task-debrief skill do?
Use when the user invokes a task debrief to verify the agent's completed work and audit its child agents, time, logged model cost, and workflow lessons in a private report.
How do I install the task-debrief skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the task-debrief skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…