
Session Archaeology
Mine past agent session transcripts to extract winning prompt patterns, reliable tool chains, and new Skill.md recipes for your domain.
Install
npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill session-archaeologyWhat is this skill?
- Systematic excavation of full agent transcripts (reasoning, tools, errors, corrections, outcomes)
- Identifies reusable prompt patterns and reliable tool-call sequences from real runs
- Surfaces recurring failure modes and successful error-recovery strategies
- Codifies findings into new or refined Agent Skills for a continuous-improvement flywheel
- Methodology drawn from high-volume Google Ads analysis session mining
Adoption & trust: 1 installs on skills.sh; 18 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Operational session logs are the richest signal once you are running agents in production, so the canonical shelf is Operate even though insights feed Build. Iterate is where teams turn execution history into process improvements rather than one-off debugging.
Common Questions / FAQ
Is Session Archaeology safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Session Archaeology
# Session Archaeology Part of [Agent Skills™](https://github.com/itallstartedwithaidea/agent-skills) by [googleadsagent.ai™](https://googleadsagent.ai) ## Description Session Archaeology is the systematic excavation and analysis of past agent sessions to extract reusable patterns, identify recurring failure modes, and derive new skills from operational history. Every agent session produces a rich artifact — a complete transcript of reasoning, tool usage, errors, corrections, and final outcomes. Most teams discard this data. Session Archaeology treats it as the most valuable training signal available: real-world execution traces from your specific domain, your specific codebase, and your specific workflows. This skill formalizes the methodology used at [googleadsagent.ai™](https://googleadsagent.ai) to continuously improve Buddy™ by mining thousands of past Google Ads analysis sessions. The archaeology process identifies which prompt patterns led to accurate recommendations, which tool call sequences completed reliably, and which error recovery strategies succeeded. These findings are then codified into new Agent Skills™ or refinements to existing ones, creating a flywheel of continuous improvement. The process operates at three levels: individual session review (what went wrong in this specific run), cross-session pattern analysis (what patterns recur across many runs), and trend identification (how is agent behavior evolving over time). Each level yields different insights and different types of improvements. ## Use When - Agent quality has plateaued and you need new optimization signals - You want to derive new skills or rules from real execution data - Recurring failures suggest systematic issues rather than random errors - Onboarding new team members who need to understand agent behavior patterns - Building regression test suites from real session transcripts - Preparing for model version migrations (comparing behavior across model versions) ## How It Works ```mermaid graph TD A[Session Transcripts] --> B[Session Parser] B --> C[Event Extraction] C --> D[Pattern Classifier] D --> E{Pattern Type} E -->|Success Pattern| F[Skill Candidate] E -->|Failure Pattern| G[Mistake Taxonomy Entry] E -->|Neutral| H[Archive] F --> I[Pattern Validation] G --> I I --> J[Cross-Session Correlation] J --> K{Frequency > Threshold?} K -->|Yes| L[Skill Codification] K -->|No| M[Watch List] L --> N[Agent Skills™ Repository] M --> J ``` The archaeology workflow begins with parsing raw session transcripts into structured event streams — each tool call, each model response, each error, each human intervention becomes a discrete event. A pattern classifier assigns each event sequence a type: success patterns (tool chains that reliably accomplish tasks), failure patterns (recurring errors with identifiable root causes), and neutral patterns (neither clearly good nor bad). Success and failure patterns enter validation, where they are cross-correlated across sessions. Patterns exceeding a frequency threshold are codified into formal skills or rules. ## Implementation **Session Transcript Parser:** ```python from dataclasses import dataclass, field from typing import Literal @dataclass class SessionEvent: timestamp: str event_type: Literal["tool_call", "model_response", "error", "human_input", "correction"] content: dict duration_ms: int = 0 token_count: int = 0 success: bool = True @dataclass class ParsedSession: session_id: str events: list[SessionEvent] = field(default_factory=list) total_tokens: int = 0 total_duration_ms: int = 0 outcome: Literal["success", "partial", "failure"] = "succes