feat(skills): workflow-audit — mine CC chat corpus for self-optimization patterns#5
Open
jamestexas wants to merge 1 commit into
Open
feat(skills): workflow-audit — mine CC chat corpus for self-optimization patterns#5jamestexas wants to merge 1 commit into
jamestexas wants to merge 1 commit into
Conversation
…ion patterns New skill, sibling to self-audit. Different surface: - self-audit reviews PR code before a human reviewer. - workflow-audit reviews the user's interaction patterns with agents, from the Claude Code chat corpus. Designed to be dispatched as a sub-agent so the caller's context stays clean. Output is a single ranked markdown report at $OUTPUT_PATH (default ~/workflow-audit-<date>.md). Three load-bearing rules: 1. Anti-temporal-bias — bucket by ISO week, exclude the 2 most recent weeks, rank by bucket_coverage × cost (not raw count), drop findings appearing in <3 buckets. The user dispatches many agents; recent weeks are dense and biased. 2. PII scrub — deterministic mapping table built on first encounter, applied to ALL output. Mapping never leaves the machine. Enables running the same audit on a work machine without leaking either work or personal-project specifics into the report. 3. Don't fabricate — minimum corpus threshold (50 sessions), example snippets must be real (scrubbed) quotes, contradictions surfaced rather than collapsed. Tools used: - mache ingest claude-chats to consolidate transcripts to sqlite db - chat-embed index/query (LLO crate, fastembed/MiniLM) for semantic clustering of repeated user phrasings - Python stdlib for bucketing + scoring Eight pattern shapes detected: repeated corrections, tool-use thrash, pre-action over-asking, post-action under-asking, dropped threads, restated constraints, long-cycle recurrence, phrasing-shift markers. Output skeleton includes a "Ready-to-apply (3 hand-picked)" section so the audit converts to action without requiring the user to read all 15 findings. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New skill
workflow-audit. Sibling to existingself-audit— distinct surface.self-auditworkflow-audit(new)Designed to be dispatched as a sub-agent so the caller's context stays clean and the analysis is reproducible across machines (including the user's work machine).
What it does
Mines the Claude Code chat corpus at
~/.claude/projects/*/*.jsonland outputs a single ranked markdown report (~/workflow-audit-<YYYYMMDD>.mdby default) with 10–15 findings, each carrying a concrete one-line intervention.Three load-bearing rules
bucket_coverage × cost, drop findings appearing in <3 buckets.Tools used
mache ingest claude-chats— consolidates transcripts → sqlitechat-embed index/query(LLO crate, fastembed/MiniLM) — semantic clustering of repeated phrasingsIf mache/chat-embed aren't installed, the skill clones their repos from
agentic-researchand builds them.Eight pattern shapes detected
Repeated corrections · tool-use thrash · pre-action over-asking · post-action under-asking on high-impact ops · dropped threads · restated constraints · long-cycle recurrence · phrasing-shift markers.
Output skeleton
Top findings (ranked) → dropped findings (transparency) → corpus health stats → Ready-to-apply (3 hand-picked) — the section that converts the audit into action without reading all 15.
Test plan
/workflow-audit(or dispatch as sub-agent) on personal machine — produces a reportWORKFLOW_AUDIT_SKIP_PATHSenv set — work projects excludedbucket_coverage × cost, not raw count🤖 Generated with Claude Code