Delegate independent tasks to specialized agents working concurrently with isolated context.
SKILL.md
Full skill instructions
CTP-Yoneda Skill
"The Yoneda lemma is arguably the most important result in category theory." — Emily Riehl
Category Theory in Programming (CTP) by NoahStoryM - Racket tutorial mapping abstract CT concepts to programming constructs with GF(3) colored awareness.
Overview
Source: NoahStoryM/ctp
Docs: docs.racket-lang.org/ctp
Local: .topos/ctp/
Chapters (GF(3) Colored)
| # | Chapter | Trit | Color | Status |
|---|---|---|---|---|
| 1 | Category | +1 | #E67F86 | ✓ Complete |
| 2 | Functor | -1 | #D06546 | ✓ Complete |
| 3 | Natural Transformation | 0 | #1316BB | ✓ Complete |
| 4 | Yoneda Lemma | +1 | #BA2645 | Planned |
| 5 | Higher Categories | -1 | #49EE54 | Planned |
| 6 | (Co)Limits | 0 | #11C710 | Planned |
| 7 | Adjunctions | +1 | #76B0F0 | Planned |
| 8 | (Co)Monads | -1 | #E59798 | Planned |
| 9 | CCC & λ-calculus | 0 | #5333D9 | Planned |
| 10 | Toposes | +1 | #7E90EB | Planned |
| 11 | Kan Extensions | -1 | #1D9E7E | Planned |
GF(3) Sum: (+1) + (-1) + (0) + (+1) + (-1) + (0) + (+1) + (-1) + (0) + (+1) + (-1) = 0 ✓ BALANCED
Core Concepts
Category (Chapter 1)
- Objects, morphisms, composition, identity
- Digraphs → Free categories
- Subcategories, product/coproduct categories
- Quotient categories, congruence relations
Functor (Chapter 2)
- Structure-preserving maps between categories
- Constant, opposite, binary functors
- Hom functors (covariant/contravariant)
- Free monoid/category functors
- Finite automata as functors (DFA, NFA, TDFA)
Natural Transformation (Chapter 3)
- Morphisms between functors
- Functor categories
- Vertical/horizontal composition
- Whiskering
Yoneda Lemma (Key Insight)
Nat(Hom(A, -), F) ≅ F(A)
Every object is completely determined by its relationships to all other objects.
Code Examples
Located in .topos/ctp/scribblings/code/:
Category Examples
Set.rkt- Category of setsRel.rkt- Category of relationsProc.rkt- Category of proceduresPair.rkt- Product categoryMatr.rkt- Matrix categoriesList.rkt- List monoid as categoryNat.rkt- Natural numbers
Functor Examples
DFA.rkt- Deterministic finite automataNFA.rkt- Nondeterministic finite automataTDFA.rkt- Typed DFASet->Rel.rkt- Set to Relation functorP_*.rkt,P^*.rkt,P_!.rkt- Powerset functorsSliF.rkt,coSliF.rkt- Slice functors
Racket Integration
# Install CTP package
cd .topos/ctp && raco pkg install
# Build documentation
raco setup --doc-index ctp
# Open docs
open doc/ctp/index.html
Connection to Music-Topos
| CTP Concept | Music-Topos Implementation |
|---|---|
| Category | ACSets schema |
| Functor | Geometric morphism |
| Natural Transformation | Schema migration |
| Yoneda | Representable presheaves |
| Limits | Pullbacks in DuckDB |
| Adjunctions | Galois connections |
| Monads | Computation contexts |
Colored Awareness Protocol
When reading CTP files, each touched file gets a deterministic color:
# Track file access with Gay.jl colors
seed = 1069
files_touched = []
def touch_file(path, index)
color = gay_color_at(seed, index)
files_touched << { path: path, color: color, trit: color[:trit] }
end
Current session colors (seed=1069):
#E67F86(+1) - info.rkt#D06546(-1) - main.rkt#1316BB(0) - ctp.scrbl#BA2645(+1) - category/main.scrbl#49EE54(-1) - functor/main.scrbl#11C710(0) - natural transformation/#76B0F0(+1) - code examples
References
- CTP Tutorial
- Qi Flow Language - Inspiration for CTP
- Category Theory in Context - Emily Riehl
- Category Theory for Computing Science - Barr & Wells
- nLab
- TheCatsters YouTube
Commands
# View CTP docs
just ctp-docs
# Run CTP examples
just ctp-examples
# Verify GF(3) coloring
just ctp-colors
Scientific Skill Interleaving
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
Graph Theory
- networkx [○] via bicomodule
- Universal graph hub
Bibliography References
category-theory: 139 citations in bib.duckdb
Cat# Integration
This skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:
Trit: 0 (ERGODIC)
Home: Presheaves
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
GF(3) Naturality
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
