Best use case
kan-extensions is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Kan Extensions Skill (ERGODIC 0)
Teams using kan-extensions should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/kan-extensions/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How kan-extensions Compares
| Feature / Agent | kan-extensions | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Kan Extensions Skill (ERGODIC 0)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Kan Extensions Skill (ERGODIC 0)
> Universal schema migration via left/right Kan extensions
**Trit**: 0 (ERGODIC)
**Color**: #26D826 (Green)
**Role**: Coordinator/Transporter
## Core Concept
Kan extensions are the "best approximation" to extending a functor along another:
```
F
C ────→ D
│ ↑
K │ │ Lan_K F (left Kan extension)
↓ │ Ran_K F (right Kan extension)
C'
```
**Adjunction**: `Lan_K ⊣ Res_K ⊣ Ran_K`
## Pointwise Formulas
### Left Kan Extension (Forward Migration)
```
(Lan_K F)(d) = colim_{(c,f: K(c)→d)} F(c)
```
- **Colimit over comma category** (K ↓ d)
- **Extends F forward** along K
- **Preserves colimits** when F does
### Right Kan Extension (Backward Migration)
```
(Ran_K F)(d) = lim_{(c,f: d→K(c))} F(c)
```
- **Limit over comma category** (d ↓ K)
- **Extends F backward** along K
- **Preserves limits** when F does
## Integration with ACSets
```julia
using Catlab, DataMigrations
# Schema migration via Kan extension
# K: SchemaOld → SchemaNew
# F: SchemaOld → Set (instance)
# Lan_K F: SchemaNew → Set (migrated instance)
function left_kan_migrate(K::DataMigration, instance::ACSet)
# Compute colimit for each new object
return colimit_representables(K, instance)
end
function right_kan_migrate(K::DataMigration, instance::ACSet)
# Compute limit for each new object
return limit_representables(K, instance)
end
```
## Schema Transport Patterns
### Pattern 1: Forward Schema Evolution
```julia
@migration SchemaV1 SchemaV2 begin
# Lan extends forward
NewTable => @join begin
old::OldTable
# computed from old structure
end
end
```
### Pattern 2: Backward Compatibility
```julia
@migration SchemaV2 SchemaV1 begin
# Ran projects backward
OldTable => @join begin
new::NewTable
# projected from new structure
end
end
```
### Pattern 3: Universal Property
```
For any H: C' → D with natural transformation α: F → H ∘ K
∃! β: Lan_K F → H such that α = β ∘ K ∘ η
```
## GF(3) Triads
```
sheaf-cohomology (-1) ⊗ kan-extensions (0) ⊗ free-monad-gen (+1) = 0 ✓
temporal-coalgebra (-1) ⊗ kan-extensions (0) ⊗ operad-compose (+1) = 0 ✓
persistent-homology (-1) ⊗ kan-extensions (0) ⊗ topos-generate (+1) = 0 ✓
```
## Commands
```bash
# Migrate schema forward (Lan)
just kan-migrate-forward old.json new_schema
# Migrate schema backward (Ran)
just kan-migrate-backward new.json old_schema
# Check universal property
just kan-universal K F H
```
## All Concepts Are Kan Extensions
| Concept | As Kan Extension |
|---------|------------------|
| Colimit | Lan along ! : C → 1 |
| Limit | Ran along ! : C → 1 |
| Yoneda | Ran along 1_C |
| Adjoint | Lan/Ran along identity |
| End | Ran along Δ |
| Coend | Lan along Δ |
## References
- Mac Lane, "Categories for the Working Mathematician" Ch. X
- Riehl, "Category Theory in Context" §6
- nLab: https://ncatlab.org/nlab/show/Kan+extensionRelated Skills
zx-calculus
Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)
zulip-cogen
Zulip Cogen Skill 🐸⚡
zls-integration
zls-integration skill
zig
zig skill
zig-syrup-bci
Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation
zig-programming
zig-programming skill
zeroth-bot
Zeroth Bot - 3D-printed open-source humanoid robot platform for sim-to-real and RL research. Affordable entry point for humanoid robotics.
xlsx
Comprehensive spreadsheet creation, editing, and analysis with support
wycheproof
Google's Wycheproof test vectors for cryptographic implementation testing.
Writing Hookify Rules
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
worldmat-tidar
worldmat-tidar
worlding
Gay.jl world_ pattern: persistent composable state builders with GF(3) conservation, Möbius invertibility, and Narya verification