Skip to main content
~/projects/blog-series — /sublimate:distill
Sublimate · v0.2.0 · MIT · Claude Code Plugin

The workflow is already in
your session log.

Sublimate mines the Claude Code session transcripts already on your disk under ~/.claude/projects/, clusters them by tool-call similarity, and classifies each repeated pattern against a 3-tier rubric — Subagent, Skill, or Workflow — before emitting the artifact. Paired with Anthropic’s Dynamic Workflows launch on 2026-05-28.

1,222
Sessions Mined
44
Clusters Surfaced
3
Tiers
4
Specimens Shipped
0
Fabricated Examples

Most tools pitch Workflows. This one classifies.

Sublimate treats your session history as the source of truth. It surfaces the shape of what you repeat — which tools, which order, how often — then a curator agent decides whether each pattern wants to be a Subagent, a Skill, or a Workflow.

Install. Distill. Read the clusters.

Sublimate ships as a Claude Code plugin and a standalone Python CLI. Add the marketplace and run /sublimate:distill from any project, or run the CLI directly against a corpus. Two examples below.

bashexample 1 · plugin install & distill
# 1. Add the marketplace and install the plugin.
$ claude plugin marketplace add krzemienski/sublimate
$ claude plugin install sublimate@sublimate

# 2. Distill the current project's session corpus.
$ /sublimate:distill
# Walk ........... 1,222 sessions under ~/.claude/projects/
# Cluster ........ 44 clusters at Jaccard 0.35
# PrefixSpan ..... frequent subsequences, min-support 0.4
# Classify ....... 8 candidates: 6 SKILL · 1 SUBAGENT · 1 WORKFLOW
→ out/clusters.json + out/*.workflow.js + SKILL.md candidates
bashexample 2 · standalone CLI on any corpus
# Run the deterministic miner directly — no Anthropic account needed.
$ python3 -m sublimate.cli ~/.claude/projects/-Users-nick-Desktop-myproject \
    --out ./out --max-sessions 300 --emit-all
# Deterministic through walk → shingle → cluster → PrefixSpan
$ cat out/clusters.json
$ ls out/*.workflow.js
→ hand-polish one candidate, drop into .claude/workflows/

Subagent, Skill, or Workflow?

Every cluster the miner surfaces runs through the same three-question rubric. The rubric pulls a pattern toward the lightest tier that fits — not toward the heaviest because Workflows are the new thing.

Five stages. Two layers.

Stages 01–03 are deterministic Python — no LLM in the hot path, runs in under a minute on 2,000-session corpora. Stages 04–05 are LLM-driven, running only after clustering has reduced the input to a handful of sample sessions per cluster.

PH 01
Walk
Read JSONL → (role, tool, hash) tuples
PH 02
Cluster
k=3 shingles · Jaccard ≥ 0.35 union-find
PH 03
PrefixSpan
Frequent subsequences · min-support 0.4
PH 04
Classify
cluster-curator → 3-tier rubric
PH 05
Distill
prompt-distiller → .workflow.js / SKILL.md

Coarse work cheap. Fine work expensive.

The deterministic miner (stages 01–03) runs over every JSONL in the corpus. The LLM (stages 04–05) runs only on the handful of sample sessions per cluster that survive clustering — never in the hot path.

What ships in v0.2.0.

Grounded in the on-disk plugin tree at github.com/krzemienski/sublimate and the live /sublimate:distill dogfood run against the blog-series corpus.

Category
Members
Count
Classification
3-tier rubric: Subagent (one-shot) · Skill (rubric) · Workflow (orchestration)
3
Clustering
k=3 tool-name shingles · Jaccard ≥ 0.35 · union-find collapse
0.35
Sequence mining
PrefixSpan frequent-subsequence mining · min-support 0.4
0.4
Distillation
LLM prompt-distiller reads sample sessions → real agent() prompts, no placeholders
v0.2
Specimens
dream-memory-consolidation (SKILL) · parallel-file-write-with-verify (WORKFLOW) · file-writer-worker (SUBAGENT) · audit-e2e (SKILL)
4
Engine
sublimate.cli — Python ≥ 3.10, single runtime dep (jinja2), no Docker
1

Two commands. Real corpora.

Every flag below is a real sublimate.cli flag — install the standalone miner once with pip, then point it at any project’s session directory under ~/.claude/projects/. --emit-all writes every tier (Subagent / Skill / Workflow); --max-sessions caps the walk for a fast first pass on a large corpus.

bashexample 1 · install the miner, emit every tier
# 1. Install the standalone miner (editable, straight from the repo).
$ pip install -e git+https://github.com/krzemienski/sublimate

# 2. Mine one project's session corpus — emit Subagents, Skills, AND Workflows.
$ python3 -m sublimate.cli ~/.claude/projects/-Users-nick-Desktop-myproject \
    --out ./out --emit-all
# Deterministic walk → shingle → cluster → PrefixSpan, then classify each cluster
$ ls out/*.workflow.js out/clusters.json
→ one artifact per cluster, tier-shaped by the rubric
bashexample 2 · fast first pass on a large corpus
# Cap the walk at 300 sessions for a quick pass on a multi-thousand-session corpus.
$ python3 -m sublimate.cli ~/.claude/projects/-Users-nick-Desktop-myproject \
    --out ./out --max-sessions 300 --emit-all
# Same deterministic pipeline, bounded sample — inspect before a full run
$ cat out/clusters.json
→ hand-polish one candidate, drop it into .claude/workflows/

One plugin. One CLI.

Install as a Claude Code plugin for the /sublimate:distill surface, or pip install the standalone miner. The CLI runs anywhere with Python ≥ 3.10; emitted .workflow.js scripts need Claude Code v2.1.154+ on Pro / Max / Team / Enterprise.

bashinstall sublimate
# Option A — Claude Code plugin (gives you /sublimate:distill)
$ claude plugin marketplace add krzemienski/sublimate
$ claude plugin install sublimate@sublimate

# Option B — standalone Python CLI (deterministic miner, no account)
$ pip install -e git+https://github.com/krzemienski/sublimate
$ python3 -m sublimate.cli ~/.claude/projects/<project-dir> --out ./out --emit-all

# Then: inspect, hand-polish, promote.
$ ls out/*.workflow.js
→ drop a polished candidate into .claude/workflows/ and run /workflows

Read the source. Then distill.

No SaaS, no telemetry, no closed source. The miner, the rubric, the specimens, and the prompt-distiller all live in the public repository. Eight pages worth your time on day one.

The miner refuses to invent shape. PrefixSpan only emits subsequences that actually repeated. The Python proposes. You curate.

v0.2.0 — real distillation, real specimens.

Sublimate launched 2026-05-28 alongside Anthropic’s Dynamic Workflows. v0.2 replaced v0.1’s fabricated examples with four specimens mined from real corpora — each citing its origin cluster, session count, and dominant tool sequence.

v0.2.0
May 2026
LLM distillation per cluster. The distiller now reads each cluster's original session content and writes real agent() prompts, skill rubrics, and workflow phases — so emitted artifacts ship with content, not agent("Execute pattern: Read → Edit → Bash") stubs. Shipped with 4 hand-polished specimens mined from real corpora.
v0.1.0
May 2026
First cut, paired with the Anthropic Dynamic Workflows launch (2026-05-28). Deterministic walk → shingle → cluster → PrefixSpan pipeline. v0.1 shipped fabricated examples; they were deleted and replaced by a real dogfood run for v0.2.