SKILL·E096E4

crystallize

avelikiy
Updated 2 days ago
70
12
70
View on GitHub
Metageneral

About

The crystallize skill analyzes session logs and lessons to identify repeating patterns, then generates draft skill files for reusable knowledge. It's triggered manually via commands like `/crystallize` or automatically after every 10 sessions. The process produces draft skills and a promotion report using a dedicated knowledge-extractor agent for pattern distillation.

Quick Install

Claude Code

Recommended
Primary
npx skills add avelikiy/great_cto -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/avelikiy/great_cto
Git CloneAlternative
git clone https://github.com/avelikiy/great_cto.git ~/.claude/skills/crystallize

Copy and paste this command in Claude Code to install this skill

Documentation

Crystallize — distil session patterns into reusable skills

Invoke when the CTO says /crystallize, "crystallize", "extract knowledge", or "what have we learned?". Also auto-suggested when session count is a multiple of 10 (the session-end hook checks .great_cto/.last-crystallize).

The knowledge-extractor agent (Opus) does the heavy lifting. This skill orchestrates the workflow and emits the final report.

Session-end hint integration: The session-end hook checks .great_cto/.last-crystallize and suggests running /crystallize when the session count exceeds last_sessions + 10. Run this skill after ≥10 sessions to keep extracted skills current.


Step 1 — Gather raw material

# Count sessions
SESSION_COUNT=$(ls .great_cto/logs/session-*-end.md 2>/dev/null | wc -l | tr -d ' ')
echo "Sessions: $SESSION_COUNT"

# Read lessons
cat .great_cto/lessons.md 2>/dev/null || echo "(no lessons yet)"

# Read cross-project decisions
cat ~/.great_cto/decisions.md 2>/dev/null | head -200 || echo "(none)"

# Find patterns that appear in ≥3 sessions
grep -h "^## pattern:" .great_cto/logs/session-*-end.md 2>/dev/null | sort | uniq -c | sort -rn | head -20

# Recent git log for context
git log --oneline --since="30 days ago" | head -30

If SESSION_COUNT is 0, tell the CTO: "No session logs found in .great_cto/logs/. Run at least 10 sessions before crystallizing." Exit.

If SESSION_COUNT < 10, tell the CTO: "Only {N} sessions found. Patterns are more reliable after ≥10 sessions. Proceed anyway? [yes/no]" Wait for confirmation before continuing.


Step 2 — Cluster patterns (via knowledge-extractor agent)

Spawn the knowledge-extractor agent with the gathered data as context:

Agent: knowledge-extractor
Task: |
  Read .great_cto/lessons.md and all files in .great_cto/logs/.
  Cluster lesson entries by pattern slug.
  For each cluster with ≥3 occurrences, write a draft skill file to
  skills/{domain}/SKILL.md (status: draft in frontmatter).
  If a skill for that domain already exists, append a new ## section instead
  of replacing the file.
  Infer domain from the pattern slug and its archetype tags.
  Return a structured summary: clusters found, drafts written, already-covered.

Wait for the agent to complete before proceeding to Step 3.


Step 3 — Emit promotion report

After the agent completes, print:

CRYSTALLIZE REPORT
════════════════════════════════════════
Sessions analysed: {SESSION_COUNT}
Lessons found:     {LESSON_COUNT}
Clusters:          {CLUSTER_COUNT}
Draft skills:      {DRAFT_COUNT}  (in skills/{domain}/SKILL.md)
Already covered:   {COVERED_COUNT}  (pattern already in existing skill)
════════════════════════════════════════
Draft files:
  {list of paths and brief description per draft}

Next: review drafts, remove `status: draft` when satisfied.
Run /crystallize again after 10 more sessions.
════════════════════════════════════════

Step 4 — Write .last-crystallize marker

After emitting the report, write the marker file:

SESSION_COUNT=$(ls .great_cto/logs/session-*-end.md 2>/dev/null | wc -l | tr -d ' ')
DRAFT_COUNT={P}   # from agent output
mkdir -p .great_cto
node -e "
const fs = require('fs');
fs.writeFileSync('.great_cto/.last-crystallize', JSON.stringify({
  ts: new Date().toISOString(),
  sessions: parseInt('$SESSION_COUNT') || 0,
  drafts: parseInt('$DRAFT_COUNT') || 0
}) + '\n');
"

Step 5 — Auto-run cadence suggestion

If SESSION_COUNT is a multiple of 10 (and > 0), append to the report:

Auto-suggestion: you've completed {SESSION_COUNT} sessions. Consider running
`/crystallize` every 10 sessions to keep skills current.

GitHub Repository

avelikiy/great_cto
Path: skills/crystallize
0
agentic-codingclaude-code-pluginclaude-code-skillsclaude-code-subagentscode-reviewcto
FAQ

Frequently asked questions

What is the crystallize skill?

crystallize is a Claude Skill by avelikiy. Skills package instructions and resources that Claude loads on demand, so Claude can perform crystallize-related tasks without extra prompting.

How do I install crystallize?

Use the install commands on this page: add crystallize to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does crystallize belong to?

crystallize is in the Meta category.

Is crystallize free to use?

Yes. crystallize is listed on AIMCP and free to install.

Related Skills

content-collections
Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill
polymarket
Meta

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

View skill
creating-opencode-plugins
Meta

This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.

View skill
sglang
Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill