mining-session-patterns

mining-session-patterns is a skill for Claude Code from qte77/claude-code-plugins. It costs 37 tokens per session (958 once invoked), scanned A, original, Apache-2.0.

A tool for examining Claude Code session transcripts, which are saved conversation logs in JSONL files. It looks for repeated patterns such as errors followed by fixes and tool failures.

In plain words
What is it for?
Use it to scan recent Claude Code sessions and write findings to a patterns document. You can choose a time period and an output file.
Why use it?
It turns many raw session logs into a shorter record of what tends to go wrong and what fixes work. This helps identify recurring problems and track how much work or cost different tasks require.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the cc-meta plugin — 9 skills, 1 hook shipped together

Good fit Use it to scan recent Claude Code sessions and write findings to a patterns document. You can choose a time period and an output file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/mining-session-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add qte77/claude-code-plugins --skill mining-session-patterns
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install cc-meta, the plugin that ships this one along with the rest of its 9 skills, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mining-session-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/mining-session-patterns/github.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/mining-session-patterns)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/mining-session-patterns"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/mining-session-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mining-session-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/mining-session-patterns"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/mining-session-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 958 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00958
Opus 5.5 $0.00015 $0.00383
Sonnet 5.5 $0.00007 $0.00192
Haiku 4.5 $0.00004 $0.00096

Measured 17d ago against content hash 043cc919f392, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mining-session-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cc-meta/skills/mining-session-patterns/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Pattern Mining

Target: $ARGUMENTS

Mines Claude Code session transcripts for recurring patterns that feed compound learning. Converts raw session data into actionable improvements.

Arguments

Position Name Required Default Description
1 time-range no 7d Period to scan. E.g. 7d, 30d, this-week.
2 output-path no docs/patterns/session-patterns.md Where to write findings.

Examples:

/mining-session-patterns                    # Last 7 days, default output
/mining-session-patterns 30d                # Last 30 days
/mining-session-patterns 7d ./patterns.md   # Custom output path

Data Source

~/.claude/projects/*/*.jsonl    # Session transcripts

Critical: Never bulk-read full .jsonl files. Use sampling strategy below to respect context budget.

Workflow

  1. Discover session files — Glob ~/.claude/projects/*/*.jsonl. Filter by mtime within time-range. Select up to 10 files, preferring recent.

  2. Sample each file — Read first 20 lines + last 20 lines per file. This captures session setup (tools, config) and final outcomes (errors, completions). Skip files smaller than 5 lines.

  3. Extract patterns from sampled lines:

    • Error-fix sequences: Tool call with error response followed by a successful retry or different approach. Look for type: "tool_error" or error messages in tool results, then the next tool call on the same target.
    • Tool failure rates: Count tool calls and failures per tool type (Bash, Edit, Read, Grep, Glob, Write). A failure is any tool result containing error indicators.
    • Cost signals: Estimate token usage per session from message counts and approximate message sizes. Map to task complexity (small/medium/large) based on message count thresholds: <20 small, 20-80 medium, >80 large.
  4. Format findings — Structure as tables per Output Format below. Every row must suggest a concrete improvement or be omitted.

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago Changed 043cc919f392
  2. 23d ago Changed · +37 tokens per session f4eb5d4e942b
  3. 1mo ago First seen · 109 lines · 0 tokens per session scan A 374514a6300b

Subscribe to this mod's changes

mining-session-patterns is a skill published in the GitHub repository qte77/claude-code-plugins (3 stars, last pushed 4d ago), licensed Apache-2.0. It adds 37 tokens to every session and 958 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

android-kotlin-compose

Android development with Kotlin and Jetpack Compose. Use when user mentions "Compose", "Jetpack Compose", "Material3", "Hilt", "Room", "ViewModel", or needs to build Android UI, implement MVVM architecture, manage Compose state, or integrate Jetpack libraries (Navigation, Room, Hilt, ViewModel). Triggers on…

and3r817/dot-claude-plugins · 84 tokens

android-kotlin-coroutines

Android development with Kotlin Coroutines and Flow. Use when user mentions "coroutines", "suspend", "Flow", "StateFlow", "SharedFlow", "viewModelScope", "lifecycleScope", or needs to implement async programming, handle structured concurrency, integrate coroutines with Retrofit/Room/WorkManager, or write coroutine…

and3r817/dot-claude-plugins · 87 tokens

codex-advisor

Advisory consultation skill for architectural reviews, design decisions, code analysis, and technology evaluation. Codex provides recommendations without making code changes. Invoked by phrases like "consult Codex", "get Codex's opinion", "ask Codex about", "have Codex review", "Codex analysis", "validate this…

and3r817/dot-claude-plugins · 85 tokens

ast-grep

Structural code search and rewriting using AST patterns. Use when user mentions "ast-grep", "sg", or needs to search codebases using Abstract Syntax Tree patterns, find specific code structures, perform complex queries beyond text search, or rewrite code at scale. Triggers on requests for pattern matching, code…

and3r817/dot-claude-plugins · 75 tokens

github-cli

This skill should be used when working with GitHub CLI (gh) for repository management, pull requests, issues, API access, GitHub Actions, or automation workflows. Provides comprehensive guidance on gh command patterns, security considerations, and best practices.

and3r817/dot-claude-plugins · 52 tokens

android-analysis

Expert Android and Java reverse engineering for APK/AAR/JAR decompilation and inspection. Use when user mentions "decompile", "jadx", "apktool", "reverse engineer", or needs to analyze Android binaries, unpack libraries, understand obfuscated apps, or extract resources from compiled artifacts.

and3r817/dot-claude-plugins · 63 tokens