/asi:cats-for-aifrom asi
Connects category theory concepts to machine learning via a lecture series organized by DeepMind and Qualcomm AI researchers.
Ships in asi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
"Category theory is compositionality made formal" — Bruno Gavranović, cats.for.ai
URL: https://cats.for.ai Trit: 0 (ERGODIC) Color: #26D826 (Green) Status: ✅ Production Ready
cats.for.ai is the definitive lecture series connecting category theory to machine learning, organized by DeepMind, Qualcomm AI, and academic researchers.
┌─────────────────────────────────────────────────────────────────────────────┐
│ cats.for.ai INTEGRATION │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ POLY INACCESSIBLE WORLDS AS COLORS MAXIMAL │
│ │
│ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
│ │ Poly(y) │ │ Inaccessible │ │ Colors │ │
│ │ Functors │────▶│ Worlds │────▶│ Maximal │ │
│ │ (-1) │ │ (0) │ │ (+1) │ │
│ └───────────────┘ └───────────────┘ └───────────────┘ │
│ │ │ │ │
│ │ Optics/Lenses │ Modal Semantics │ GF(3) Coloring │
│ │ │ │ │
│ └──────────────────────┴──────────────────────┘ │
│ │ │
│ GF(3): (-1) + 0 + (+1) ≡ 0 │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
| Name | Affiliation | Role |
|---|---|---|
| Bruno Gavranović | Strathclyde / CyberCat | Optics, Lenses, Backprop |
| Petar Veličković | DeepMind / Cambridge | GNNs, Categories |
| Pim de Haan | Amsterdam / Qualcomm | Geometric DL, Equivariance |
| Andrew Dudzik | DeepMind | Monads, RNNs |
| João G. Araújo | Cohere / USP | LLMs, Semantics |
| Speaker | Topic | Trit |
|---|---|---|
| David Spivak | Poly, Dynamic Systems | 0 (ERGODIC) |
| Jules Hedges | Categorical Cybernetics | 0 (ERGODIC) |
| Tai-Danae Bradley | CT for LLMs | +1 (PLUS) |
| Taco Cohen | Causal Abstraction | -1 (MINUS) |
| Pietro Vertechi | Parametric Spans | 0 (ERGODIC) |
| Thomas Gebhart | Sheaves for AI | -1 (MINUS) |
| Week | Topic | Speaker | Key Concepts |
|---|---|---|---|
| 1 | Why Category Theory? | Gavranović | Compositionality, Modularity |
| 2 | Categories & Functors | Veličković | Objects, Morphisms, Functors |
| 3 | Optics & Lenses | Gavranović | Bidirectional flow, Backprop |
| 4 | Geometric DL & Naturality | de Haan | Equivariance, Natural transformations |
| 5 | Monoids, Monads, LSTMs | Dudzik | Recurrence, State |
| Date | Topic | Speaker |
|---|---|---|
| Nov 14 | Neural network layers as parametric spans | Vertechi |
| Nov 21 | Causal Model Abstraction | Cohen |
| Dec 12 | Category Theory Inspired by LLMs | Bradley |
| Mar 20 | Categorical Cybernetics | Hedges |
| Mar 27 | Dynamic organizational systems | Spivak |
| May 29 | Sheaves for AI | Gebhart |
-- Poly = polynomial functors on Set
-- y = representable functor Hom(1, -)
-- ◁ = composition of polynomials
data Poly where
Poly :: { positions :: Type
, directions :: positions -> Type
} -> Poly
-- Key operations
(⊗) :: Poly -> Poly -> Poly -- parallel (tensor)
(◁) :: Poly -> Poly -> Poly -- sequential (composition)
(+) :: Poly -> Poly -> Poly -- coproduct
-- Kripke frame with inaccessibility
record KripkeFrame : Set₁ where
field
World : Set
_≺_ : World → World → Set -- accessibility
inaccessible : World → Set -- worlds with no predecessors
-- Modal operators
□ : (World → Prop) → (World → Prop) -- necessity
□ φ w = ∀ v → w ≺ v → φ v
◇ : (World → Prop) → (World → Prop) -- possibility
◇ φ w = ∃ v → w ≺ v × φ v
-- Inaccessible world: ¬∃v. v ≺ w
isInaccessible : World → Prop
isInaccessible w = ∀ v → ¬(v ≺ w)
(ns cats4ai.colors
(:require [gay.core :as gay]))
(defn color-world [world-seed trit]
"Assign maximal color to world based on trit"
(let [hue (case trit
:MINUS (+ 180 (mod (* world-seed 37) 120)) ; cold
:ERGODIC (+ 60 (mod (* world-seed 41) 120)) ; neutral
:PLUS (mod (* world-seed 43) 60)) ; warm
saturation 1.0 ; MAXIMAL
lightness 0.5]
{:hue hue :sat saturation :lit lightness
:hex (gay/hsl->hex hue saturation lightness)}))
(defn worlds-palette [n]
"Generate n inaccessible worlds with maximal colors"
(for [i (range n)
:let [trit (case (mod i 3) 0 :ERGODIC 1 :PLUS 2 :MINUS)]]
{:world-id i
:accessible? false ; inaccessible
:color (color-world i trit)
:trit trit}))
-- A lens captures forward/backward pass
data Lens s t a b = Lens
{ view :: s -> a -- forward pass
, update :: s -> b -> t -- backward pass (gradient)
}
-- Backprop is lens composition
backprop :: Lens s t a b -> Lens a b c d -> Lens s t c d
backprop l1 l2 = Lens
{ view = view l2 . view l1
, update = \s d ->
let a = view l1 s
b = update l2 a d
in update l1 s b
}
-- Chain rule emerges from lens composition!
-- d(g∘f)/dx = dg/df · df/dx
-- Parametric morphism (neural network layer)
data Para p a b = Para
{ params :: p -- learnable parameters
, forward :: p -> a -> b -- parameterized forward
}
-- Para composition
(>>>) :: Para p a b -> Para q b c -> Para (p, q) a c
(Para p f) >>> (Para q g) = Para (p, q) (\(p,q) a -> g q (f p a))
-- Optic generalizes lens, prism, traversal
type Optic p s t a b = p a b -> p s t
-- Specific optics for ML:
type Lens s t a b = Optic (Star ((->) s)) s t a b -- deterministic
type Prism s t a b = Optic (Costar (Either a)) s t a b -- optional
type Affine s t a b = Optic (Star Maybe) s t a b -- at most one
┌─────────────────────────────────────────────────────────────────────────────┐
│ cats.for.ai SKILL INTEGRATION │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ cats.for.ai │
│ │ │
│ ├──▶ open-games (Hedges) │
│ │ └── Play/Coplay bidirectional │
│ │ │
│ ├──▶ catsharp (Spivak) │
│ │ └── Cat# = Comod(P) equipment │
│ │ │
│ ├──▶ topos-catcolab (Patterson) │
│ │ └── Double theories, ACSets │
│ │ │
│ ├──▶ cybernetic-open-game │
│ │ └── Agent-O-Rama ↔ Worldnet ↔ STC │
│ │ │
│ ├──▶ elements-infinity-cats (Riehl-Verity) │
│ │ └── ∞-cosmos model independence │
│ │ │
│ ├──▶ sheaf-laplacian-coordination (Gebhart) │
│ │ └── Sheaf neural networks │
│ │ │
│ ├──▶ crdt (Automerge) │
│ │ └── Join-semilattice merge │
│ │ │
│ └──▶ derangement-crdt │
│ └── Colorable permutations │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
# Core cats.for.ai triads
optics-lenses (-1) ⊗ cats-for-ai (0) ⊗ backprop (+1) = 0 ✓
sheaves (-1) ⊗ cats-for-ai (0) ⊗ gnns (+1) = 0 ✓
cybernetics (-1) ⊗ cats-for-ai (0) ⊗ open-games (+1) = 0 ✓
poly-functors (-1) ⊗ cats-for-ai (0) ⊗ para-morphisms (+1) = 0 ✓
causal-abstraction (-1) ⊗ cats-for-ai (0) ⊗ llm-semantics (+1) = 0 ✓
For each inaccessible world (no predecessor in accessibility relation):
class InaccessibleWorld:
"""A world with no accessible predecessors - epistemic ground truth"""
def __init__(self, seed: int, trit: int):
self.seed = seed
self.trit = trit # -1, 0, +1
self.color = self._maximal_color()
self.accessible_from = set() # empty = inaccessible
def _maximal_color(self) -> dict:
"""Assign maximally saturated color based on trit"""
hue_base = {-1: 240, 0: 120, 1: 0}[self.trit] # blue/green/red
hue = (hue_base + (self.seed * 37) % 60) % 360
return {"h": hue, "s": 1.0, "l": 0.5} # MAXIMAL saturation
def poly_action(self, p: "Poly") -> "InaccessibleWorld":
"""Apply polynomial functor action"""
new_seed = (self.seed * p.positions + sum(p.directions)) % (2**64)
new_trit = (self.trit + p.trit) % 3
return InaccessibleWorld(new_seed, new_trit)
All lectures available: YouTube Playlist
| Lecture | Views | Key Insight |
|---|---|---|
| Why Category Theory? | 24K+ | Compositionality = modularity |
| Optics and Lenses | 15K+ | Chain rule = lens composition |
| Categorical Cybernetics | 10K+ | Agency via parametrised optics |
| Sheaves for AI | 8K+ | Local-to-global inference |
# Watch lecture
just cats4ai-watch LECTURE_NUM
# Run optics demo
just cats4ai-optics-demo
# Generate inaccessible worlds
just cats4ai-worlds N
# Color palette
just cats4ai-colors --maximal
# Integration check
just cats4ai-integrate SKILL_NAME
#!/usr/bin/env bb
;; cats4ai.bb - Categories for AI utilities
(ns cats4ai
(:require [babashka.http-client :as http]
[cheshire.core :as json]))
(def LECTURES
[{:week 1 :title "Why Category Theory?" :speaker "Gavranović" :trit 0}
{:week 2 :title "Categories & Functors" :speaker "Veličković" :trit 0}
{:week 3 :title "Optics & Lenses" :speaker "Gavranović" :trit -1}
{:week 4 :title "Geometric DL" :speaker "de Haan" :trit +1}
{:week 5 :title "Monads & LSTMs" :speaker "Dudzik" :trit 0}])
(defn gf3-conservation? [lectures]
(zero? (mod (reduce + (map :trit lectures)) 3)))
(defn inaccessible-world [seed]
{:seed seed
:trit (case (mod seed 3) 0 :ERGODIC 1 :PLUS 2 :MINUS)
:accessible-from #{}
:color {:h (mod (* seed 37) 360) :s 1.0 :l 0.5}})
(defn -main [& args]
(println "cats.for.ai - Categories for AI")
(println "GF(3) conserved?" (gf3-conservation? LECTURES))
(println "Inaccessible worlds:"
(map inaccessible-world (range 3))))
(when (= *file* (System/getProperty "babashka.file"))
(apply -main *command-line-args*))
open-games - Hedges' compositional gamescatsharp - Spivak's Cat# = Comod(P)topos-catcolab - Topos collaborative CTcybernetic-open-game - Cybernetic feedbacksheaf-laplacian-coordination - Gebhart sheavescrdt - Join-semilattice CRDTsderangement-crdt - Colorable derangementsSkill Name: cats-for-ai Type: Categorical Machine Learning Trit: 0 (ERGODIC) Poly: Inaccessible worlds as colors maximal GF(3): Conserved across all triads
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (plurigrid/asi) — no native marketplace selected
npx claudepluginhub p/plurigrid-asi-plugins-asi1,393 skills in this plugin
/abductive-replHypothesis-Test Loops via REPL for Exploratory Abductive Inference/academic-researchSearch academic papers across arXiv, PubMed, Semantic Scholar, bioRxiv, medRxiv, Google Scholar, and more. Get BibTeX citations, download PDFs, analyze citation networks. Use for literature reviews, finding papers, and academic research./accept-no-substitutesThis skill should be used when agents generate placeholder tokens like "pseudo-", "mock-", "temporary", "TODO", "demo-", or similar incompleteness markers. Detects substitution patterns in agent OUTPUT and triggers mandatory user interview instead of accepting incomplete work. Activates automatically on any output containing forbidden tokens.Other plugins' skills for the same job