Distill your Claude Code session history into reusable Workflow scripts.
A 3-tier session miner that turns Claude Code JSONL history into Subagents, Skills, and Workflows — classified by rubric, not by guess.
“The workflow you have been running in your head is already in your session log. Sublimate just looks for it — and tells you whether it wants to be a Subagent, a Skill, or a Workflow.”
Sublimate is a Claude Code plugin that mines ~/.claude/projects/ JSONL files, clusters sessions by tool-call similarity (k=3 shingles + Jaccard), mines frequent subsequences with PrefixSpan, and classifies each candidate against a 3-tier rubric — Subagent, Skill, or Workflow — before emitting polished plugin artifacts.
Pipeline composes a deterministic miner with an LLM prompt-distiller per cluster. The miner surfaces the shape (which tools, which order, how often); the distiller reads the original session content for the cluster and writes the agent prompt, skill SKILL.md, or workflow phases that ride on top.
Validated by a live /sublimate:distill dogfood run against the blog-series corpus (500 sessions sampled from 2,067, 17 clusters) — 8 candidates emitted (6 Skill, 1 Subagent, 1 Workflow), 4 hand-polished into examples/. Cross-corpus reproducibility confirmed on yt-transition-shorts-detector (13 clusters) and ils-ios (9 clusters).
01. ARCHITECTURE
How it's built
MODULE 00
Parser
Walks ~/.claude/projects/**/*.jsonl, yields (session_id, tool_event_list) tuples. Phase boundaries cut at user-prompt edges.
MODULE 01
Shingle
k=3 tool n-grams per session as Jaccard-comparable sets. Padding for sessions shorter than k.
MODULE 02
Cluster
Union-find on pairwise Jaccard ≥ 0.35. Singletons dropped. Output is cluster_id → session_id list.
MODULE 03
PrefixSpan
Per-cluster frequent subsequence mining with min support 0.4. Surfaces the ordered tool-call backbone per cluster.
MODULE 04
Cluster Curator
Applies the 3-tier rubric (Subagent / Skill / Workflow) to each cluster based on session shape, branching, and re-entry patterns.
MODULE 05
Prompt Distiller
LLM pass over the cluster's original session content. Writes the agent prompt, skill SKILL.md rubric, or workflow phases that ship in the polished specimen.
MODULE 06
Emit
Jinja templates render the tier-shaped artifact: agent .md for Subagents, SKILL.md for Skills, .workflow.js for Workflows. Banned-API lint enforced on Workflow output.
02. FEATURES
3-tier classification (Subagent / Skill / Workflow)
Each cluster is rated against a rubric: single-context lookup → Subagent, repeatable rubric → Skill, multi-phase orchestration → Workflow. Output is tier-shaped, not one-size-fits-all.
k=3 shingle Jaccard cluster
Tool n-gram shingles compared with Jaccard ≥ 0.35. Union-find collapses near-duplicates. Same corpus, same clusters, every run.
PrefixSpan subsequence mining
Per-cluster frequent subsequence mining with min support 0.4. Surfaces the ordered tool-call backbone that distinguishes one workflow from the next.
LLM prompt distillation per cluster
v0.2 reads the cluster's original session content and writes the agent prompt, skill rubric, or workflow phases — so emitted artifacts ship with real content, not placeholders.
03. QUICK START
04. INSTALL
- 01pip install -e git+https://github.com/krzemienski/sublimate
- 02python3 -m sublimate.cli ~/.claude/projects/<project-dir> --out ./out --emit-all
- 03Inspect out/clusters.json and out/*.workflow.js, hand-polish a candidate
- 04Drop the polished .workflow.js into .claude/workflows/ and run /workflows
05. FEATURE MATRIX
06. DOCS
06. RESOURCES
- v0.2.02026-05-28Pivoted from Python-CLI surface to Claude Code plugin: skills, commands, agents added on top of existing miner. Replaced 3 fake examples with 4 specimens mined from real corpora (blog-series, ils-ios, yt-detector, claude-mem). 3-tier rubric (Subagent / Skill / Workflow) classifies each emitted candidate.
- v0.1.02026-05-28Initial release paired with Anthropic Dynamic Workflows launch. Parser + shingle + cluster + PrefixSpan + emitter. Heuristic-only candidate Workflow scripts ready for the v2.1.154+ runtime.
RELATED PRODUCTS
MORE PRODUCTS