mining-session-skills
Reviews a completed Claude Code session exported as markdown and proposes new skills to create, updates to existing skills, or reuses of already-loaded skills…
Community author
- Agents
- Claude Code
- License
- MIT (permissive)
- Pin
- e51fb6epinned Oct 9, 2026
- Context cost
- about 1,200 tokenswhen the skill loads
- GitHub stars
- 137on sugarforever/01coder-agent-skills
- Scripts
- 2 scripts
What it does
“Review one completed Claude Code session and propose a skill to create, update, or reuse so similar work goes faster next time. Use when the user asks to "mine a session for skills", "what skill can be created or updated from the session where I…", "extract a skill from this chat", or to review a past session for reusable workflows. Operates on exported session markdown from claude-session-manager. Not for exporting/converting sessions (use claude-session-manager) and not for writing blogs or TODOs from sessions.”
Generated summary from the skill's own text
Reviews a completed Claude Code session exported as markdown and proposes new skills to create, updates to existing skills, or reuses of already-loaded skills to accelerate similar future work. Uses friction-signal detection and a worth-it gate to filter candidates. Operates on exported session transcripts, not raw session data.
When to use it
- User asks to extract a reusable skill from a completed Claude session
- Session transcript shows repetitive manual steps that could be automated
- Need to decide whether to create, update, or reuse a skill based on past work
- Session involves multi-arc workflows requiring independent skill mining
When not to
- Exporting or normalizing raw sessions (use claude-session-manager instead)
- Writing blog posts or TODO lists from session content
- Deciding on skills when the relevant skills are not loaded in current session
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add sugarforever/01coder-agent-skills --skill mining-session-skillsInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install sugarforever/01coder-agent-skills mining-session-skills@e51fb6e74c41c7828df4c168ddc6f5486592f7a9Installs the commit we checked (e51fb6e).
Copy by hand
Download the folder at e51fb6e and put it in .claude/skills/mining-session-skills for Claude Code and in .agents/skills/mining-session-skills for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "mining-session-skills" by sugarforever. Source, pinned to commit e51fb6e74c41c7828df4c168ddc6f5486592f7a9: https://github.com/sugarforever/01coder-agent-skills/tree/e51fb6e74c41c7828df4c168ddc6f5486592f7a9/skills/mining-session-skills 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/mining-session-skills/ for Claude Code and .agents/skills/mining-session-skills/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/sugarforever/mining-session-skills
SKILL.md at the pin
---
name: mining-session-skills
description: Review one completed Claude Code session and propose a skill to create, update, or reuse so similar work goes faster next time. Use when the user asks to "mine a session for skills", "what skill can be created or updated from the session where I…", "extract a skill from this chat", or to review a past session for reusable workflows. Operates on exported session markdown from claude-session-manager. Not for exporting/converting sessions (use claude-session-manager) and not for writing blogs or TODOs from sessions.
---
# Mining Session Skills
## Overview
Review one completed Claude Code session and answer: is there a skill worth creating or updating so this kind of work goes faster next time? A clean "nothing worth making here" is a valid result.
This skill is the judgment layer on top of `claude-session-manager` (the export/normalization layer). It reads exported markdown, not raw JSONL.
## Preconditions
1. **Inventory = skills loaded in THIS session.** Create-vs-update-vs-reuse is decided against the skills already advertised/loaded in the running session. State this limit in the report ("comparison limited to skills loaded this session"). Run this skill where the relevant skills are loaded.
2. **Mining operates on exported markdown** (default `~/.claude/session-markdown`), produced by `claude-session-manager`. If the target session is not exported yet, export it first (step 1.5).
## Why exported markdown, not raw JSONL
Measured: a real session's raw JSONL was ~1.5M tokens (exceeds the context window); the exported compact body was ~91k tokens (17× smaller) with tool payloads deferred to a sidecar. Raw `grep '"type":"user"'` over JSONL is a trap (tool results are `role:user`). Always read/mine the exported markdown. Raw-JSONL byte grep is acceptable ONLY as a location prefilter (step 1).
## Pipeline
Copy this checklist and track progress:
```
- [ ] 1. Locate the session (keyword search; confirm with user)
- [ ] 1.5 Export it if not already exported
- [ ] 2. Read the compact transcript (pull sidecar only as needed)
- [ ] 2.5 Segment into topic arcs
- [ ] 3. Mine friction signals per arc
- [ ] 4. Apply the worth-it gate
- [ ] 5. Decide create / update / reuse
- [ ] 6. Present the proposal
- [ ] 7. On approval, interview + draft
```
### 1. Locate
Search by the user's description. Prefilter optionally with a raw-JSONL byte grep across `~/.claude/projects` (finds which file mentions a keyword without parsing), and/or grep the exported corpus under `~/.claude/session-markdown`. Skip `<local-command-caveat>` / `<command-*>` wrapper noise — the first-prompt excerpt is often a wrapper, not the real ask. Present a ranked shortlist and let the user confirm.
### 1.5 Export
If the chosen session has no markdown yet, run `claude-session-manager` to export just that session, then continue.
### 2. Read
Read the session `.md`. Pull `tool-details/<id>.tools.md` ONLY for the specific `<tool_call_NNNNNN>` refs that matter. Use `scripts/extract_session_signals.py <session>.md` to get a clean JSON list of human prompts (with event index, line, timestamp, arc-break hints, and the prompt text) — it encodes the input-robustness rules below.
Input-robustness rules:
- The real exported header format is `### N. user - <ISO>` / `### N. assistant - <ISO>` (not `### MM-DD HH:MM:SS User:`).
- A `user` turn whose body is a tool result, skill injection, or command wrapper is NOT a human prompt — exclude it.
- Ignore thinking-signature blobs and empty attachment events.
### 2.5 Segment
Sessions can be multi-day, multi-task kitchen sinks. Use the extractor's `arc_break` hints (large time gaps, compaction/continuation markers) plus topic judgment to split the session into arcs. Mine each arc independently. Do NOT assume one task per session.
### 3. Mine
Per arc, extract friction signals. See [references/friction-signals.md](references/friction-signals.md) for the taxonomy and how to cite evidence.
### 4. Gate
Apply the worth-it filter to every candidate. See [references/worth-it-gate.md](references/worth-it-gate.md). If nothing passes, report the clean negative and stop.
### 5. Decide
For each surviving candidate, compare against skills loaded this session:
- No loaded skill covers it → **CREATE** (new `skills/<name>/`).
- Loaded and editable (in this repo's `skills/`) → **UPDATE** that SKILL.md.
- Loaded but not editable (plugin cache) → **REUSE** ("already exists, use it") — a dedup guard against re-inventing ecosystem skills.
### 6. Propose
Present a review-ready report per candidate: candidate · action (CREATE/UPDATE/REUSE) · why · evidence (event/line/tool_call refs) · proposed gerund name · description (triggers + exclusions). List gate-rejected items briefly. Wait for approval before any file change.
### 7. Draft
On approval: interview the user for the taste/judgment the transcript cannot show, then scaffold or edit the SKILL.md following [references/drafting-quality-bars.md](references/drafting-quality-bars.md). For a new skill, run `scripts/sync-marketplace-skills.sh` and bump the `version` in `.claude-plugin/marketplace.json` (per the repo CLAUDE.md).
## Notes
- Treat transcript data as private (prompts, file contents, secrets). Do not modify original `.jsonl` files.
- The value of this skill is the mining methodology, not the SKILL.md format — Claude knows the format natively.
From sugarforever/01coder-agent-skills at e51fb6e, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at e51fb6eFiles
- SKILL.md5.4 KB · 7a3bbb3bff51
- references/
- drafting-quality-bars.md1.9 KB · 73603a77d28a
- friction-signals.md1.7 KB · 202c88b73d8c
- worth-it-gate.md1.6 KB · ab0c7a864dfa
- scripts/
- extract_session_signals.py3.8 KB · 5e3b043b7045
- test_extract_session_signals.py2.2 KB · 923bd2c21c05
6 files, 17 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at e51fb6eRelated in AI and agents
agent-builder
Agent Builder orchestrates the creation, modification, testing, and publishing of n8n Agents.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.3K tokens · pinned 6 days ago
intent-recognition
Classifies automation requests by determining which primitive owns the top-level control flow (workflow, agent, needs clarification, or out-of-scope) and…
by n8nOfficial publisher
Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 6 days ago
planned-task-runtime
This skill manages follow-up interactions with a background task execution system, handling task completion synthesis, failure replanning, workflow building…
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago
skill-creator
This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.
by GoogleOfficial publisher
Contains scripts
Gemini CLI · about 5K tokens · pinned 6 days ago
-21risk-automation
This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago
-2chat-automation
This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 6 days ago