CyrilXBT|Nov 04, 2026 04:45
Everyone is chasing the next model.
The real edge is boring.
Build a harness around how YOU actually work.
Your agent already logs every session.
Every prompt.
Every tool call.
Every error.
Every token.
Almost nobody reads it.
This ONE prompt turns those logs into a dashboard and tells you exactly what to fix.
Paste it into Claude Code or Codex 👇
START OF PROMPT
Build me an observability dashboard (like Langfuse) from my own AI coding sessions over the last 7 days.
SOURCES (read only, never modify):
Claude Code: ~/.claude/projects/**/*.jsonl
Codex: ~/.codex/sessions/**/*.jsonl and ~/.codex/history.jsonl
PRIVACY: Never print secrets, API keys or full prompts. Any snippet stays under 10 words with keys, paths, URLs and long IDs removed.
STEP 1: THE NUMBERS
Write a Python script using only the standard library. For each tool, calculate:
• Sessions per day, prompts, and tool calls by tool name
• Failed tool calls, grouped by tool and error type
• Models used and tokens per model per day (input, output, cache read, cache write)
• Tool call latency and session length at p50 and p95
• Biggest sessions by tokens, longest sessions, and retries (same call repeated after an error)
• Prompts sorted into task types: build, debug, deploy, research, writing, UI, review, other
• Sessions grouped by project folder, with subagent runs flagged
If something isn't in the logs, write "not logged". Never make up a number.
Save everything to harness-summary.json.
STEP 2: THE DASHBOARD
Build one self contained dashboard.html with a dark theme and animated charts:
• Top strip: tool calls, prompts, error rate, tokens, p95 latency
• Sessions table: tool, project, start time, duration, prompts, tool calls, errors, tokens, model. Searchable, sortable, filterable, with a toggle to hide subagent runs
• Click any session to see a timeline of every turn and tool call, marked ok or error, with duration
• Charts for sessions by project, tokens over time by model, and a model table with error rates
• Latency by tool and an error explorer grouped by tool and error type
• Health scores per session, clearly labeled "heuristic"
If the file gets too big, include only the top 200 sessions by tokens.
STEP 3: THE FIXES
Using only this data, write HARNESS.md with suggested changes to my CLAUDE.md or AGENTS.md:
• Model routing: which model should handle which task type, based on what worked and what failed
• Tools: keep (used a lot, rarely fails), fix (fails often), cut (barely used)
• Skills: one skill for every task I repeated 3+ times, with a trigger line and steps
• Guardrails: my 3 most common failure patterns and a check that prevents each one
• Budget: my 5 biggest token drains and one change that cuts each
Back every suggestion with the sessions it came from.
STEP 4: REVIEW FIRST
Show me my 5 headline numbers and the proposed config changes as a diff. Change NOTHING until I approve.
END OF PROMPT
Run it once a week.
Change only what the data proves.
That's how your AI gets better every week while everyone else just waits for the next model.
Share To
Timeline
HotFlash
APP
X
Telegram
CopyLink