context-surfing
Monitors context window health during large, long-running, multi-session, or explicitly…
[Beta] Cross-session analysis of accumulated .learnings/ files. Reads all entries, groups by pattern_key, computes recurrence across sessions, and outputs ranked promotion candidates. This is the outer loop's inspect step — it turns raw learning data into actionable gap reports.
$ npx -y skills add pskoett/pskoett-ai-skills --skill learning-aggregator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/learning-aggregatorContext preview
The summary Claude sees to decide when to auto-load this skill.
[Beta] Cross-session analysis of accumulated .learnings/ files. Reads all entries, groups by pattern_key, computes recurrence across sessions, and outputs ranked promotion candidates. This is the outer loop's inspect step — it turns raw learning data into actionable gap reports.
name: learning-aggregator description: "[Beta] Cross-session analysis of accumulated .learnings/ files. Reads all entries, groups by pattern_key, computes recurrence across sessions, and outputs ranked promotion candidates. This is the outer loop's inspect step — it turns raw learning data into actionable gap reports. Use on a regular cadence (weekly, before major tasks, or at session start for critical projects). Can be invoked manually or scheduled."
Reads accumulated `.learnings/` files across all sessions, finds patterns, and produces a ranked list of promotion candidates. This is the outer loop's **inspect** step.
Without this skill, `.learnings/` is a write-only log. Patterns accumulate but nobody synthesizes them. The same gap resurfaces two weeks later because no one looked.
A **gap report** — a ranked list of patterns that have crossed (or are approaching) the promotion threshold, with evidence and recommended actions.
Read these files in `.learnings/`:
| File | Contains | |------|----------| | `LEARNINGS.md` | Corrections, knowledge gaps, best practices, recurring patterns | | `ERRORS.md` | Command failures, API errors, exceptions | | `FEATURE_REQUESTS.md` | Missing capabilities | | `HEALS.md` | Verified runtime recoveries filed by `self-healing` — including `Handoff` blocks flagging recurring patterns ready for promotion |
Parse each entry's metadata:
fields from newer writers
Build canonical occurrences before grouping:
1. Collapse copied entries with the same entry ID and normalized content, even when they appear in multiple repo locations. 2. Collapse matching `Occurrence-ID` values across `.learnings/`, cloud/local mirrors, forks, forwarded transcripts, and trace sources. 3. When `Occurrence-ID` is absent, use explicit `Task-ID`, `Session-ID`, `Source-Ref`, and `Copied-From` lineage plus normalized evidence to identify copies. Do not infer independence from different file paths or checkpoint IDs alone. 4. Treat one `.learnings` entry and one trace event describing the same task occurrence as one occurrence, while retaining both source references as corroborating evidence. 5. For legacy entries without stable task/session provenance, label lineage `unknown`. They may contribute their declared recurrence once per canonical entry, but all unknown-lineage evidence counts as at most one distinct task and cannot by itself prove the cross-task threshold.
Then group canonical occurrences by `Pattern-Key`. For each group:
1. **Count deduplicated recurrences** across canonical occurrences. Do not sum duplicate copies of the same entry's `Recurrence-Count`. 2. **Count distinct tasks** from stable task/session lineage, not source-file count 3. **Compute time window** — days between First-Seen and Last-Seen 4. **Collect all related files** — union of all entries' file references 5. **Take highest priority** across entries in the group 6. **Collect evidence** — the Summary and Details from each entry
For entries without a `Pattern-Key`, use conservative grouping only:
Flag ungrouped entries separately with a recommendation to assign a `Pattern-Key`. Ungrouped entries are common and expected — they may be one-off issues or genuinely novel problems.
An entry is **promotion-ready** when:
Statuses are part of promotion state, not just display metadata:
occurrence. Keep them as history, but do not surface a terminal-only group as promotion-ready.
it as a regression/reopened pattern and compute readiness from the post-terminal occurrences.
re-promote an already terminal pattern.
An entry is **approaching** when:
For each promotion candidate, classify the gap type:
| Gap Type | Signal | Fix Target | |----------|--------|------------| | **Knowledge gap** | Agent didn't know X | Update project instruction files (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md) | | **Tool gap** | Agent improvised around missing capability | Add or update MCP tool / script | | *
A collection of skills for AI agents. Follows the Agent Skills specification and ships an Agent Plugins 1.0 portable package. This repository is my personal skill testing ground.
Monitors context window health during large, long-running, multi-session, or explicitly…
Control-plane workflow for coordinating multi-agent, multi-session project work from a single…
[Beta] CI-only eval regression runner using gh-aw (GitHub Agentic Workflows). Runs all eval…
[Beta] Creates permanent eval cases from promoted learnings and runs regression checks…
Frames coding-agent work sessions with explicit intent capture and drift monitoring. Use when…
[Beta] CI-only learning aggregation workflow using gh-aw (GitHub Agentic Workflows). Scans…