agentleFS
LuciowayLucioway/way-stack/skills/session-audit/SKILL.md

session-audit

Skill0 starsChanged 2 months agoMITView on GitHub

Monthly audit of recent Claude Code sessions — cluster repeated manual tasks, propose new skills/automations. Diagnosis-only, writes report. Trigger: /session-audit, "audit my sessions", "what skills am I missing".

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write report to <vault>/00_INBOX/session-audit-YYYY-MM-DD.md: table cluster · freq · verdict · proposed skill name.

    line 16
  2. Distinctive:

    Run alongside the steps above.

    line 20
  3. Very specific:

    Hook: if the rule is mechanical (a pattern in the prompt or in the closing text can detect it) — e.g.

    line 44
  4. Distinctive:

    Skill: if it is a procedure with steps.

    line 45
  5. Distinctive:

    Memory line: only if neither fits. A rule that was already in memory and still got repeated is proof memory alone does not enforce it.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Session Audit (Chase — Agentic OS 2.0 workflow audit)

Diagnosis-only. NEVER create skills/automations in this run — only propose.

Steps

  1. List recent session transcripts: ls -t ~/.claude/projects/*/ | head — take last ~30 sessions across projects (use the recall archive index if available, see recall skill).
  2. Spawn 3-4 parallel subagents (model: sonnet), each reads a slice of sessions and returns: repeated user-requested tasks (task, frequency, output produced, manual back-and-forth involved).
  3. Cluster results yourself: merge duplicates, drop one-offs (<3 occurrences), drop tasks already covered by an existing skill/agent (check ~/.claude/skills/ and ~/.claude/agents/ names first).
  4. Per cluster decide: new skill / automation (cron/loop) / fix existing skill / nothing. One line of rationale each.
  5. Write report to <vault>/00_INBOX/session-audit-YYYY-MM-DD.md: table cluster · freq · verdict · proposed skill name. Show the user the table, ask which to build.

Log mining (repeated asks → enforcement)

Run alongside the steps above. Scan user messages from the last ~30 days and count repeats:

import collections, glob, json, os, re, time
cut, c = time.time() - 30 * 86400, collections.Counter()
for f in glob.glob(os.path.expanduser("~/.claude/projects/*/*.jsonl")):
    if os.path.getmtime(f) < cut:
        continue
    for ln in open(f, errors="ignore"):
        try:
            m = json.loads(ln)
        except Exception:
            continue
        msg = m.get("message") or {}
        t = msg.get("content") if msg.get("role") == "user" else None
        if isinstance(t, list):
            t = " ".join(x.get("text", "") for x in t if isinstance(x, dict))
        if isinstance(t, str) and 3 < len(t) < 200:
            c[re.sub(r"\W+", " ", t.lower()).strip()[:60]] += 1
print(c.most_common(40))

Cluster near-duplicates by hand (same intent, different words: "go", "proceed", "continue" = one cluster). For every cluster with ≥10 hits propose the cheapest enforcement that actually works:

  1. Hook if the rule is mechanical (a pattern in the prompt or in the closing text can detect it) — e.g. prompt-reflex, closing-guard.
  2. Skill if it is a procedure with steps.
  3. Memory line only if neither fits. A rule that was already in memory and still got repeated is proof memory alone does not enforce it.

Rules

  • Existing-skill check is mandatory — a mature setup has ~100 skills; false "missing skill" proposals are noise.
  • Cadence: monthly. If last report in 00_INBOX is <3 weeks old, say so and stop.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.