Best use case
ctp-yoneda is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
CTP-Yoneda Skill
Teams using ctp-yoneda 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/ctp-yoneda/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ctp-yoneda Compares
| Feature / Agent | ctp-yoneda | 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?
CTP-Yoneda Skill
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
# 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](https://github.com/NoahStoryM/ctp)
**Docs**: [docs.racket-lang.org/ctp](https://docs.racket-lang.org/ctp/index.html)
**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 sets
- `Rel.rkt` - Category of relations
- `Proc.rkt` - Category of procedures
- `Pair.rkt` - Product category
- `Matr.rkt` - Matrix categories
- `List.rkt` - List monoid as category
- `Nat.rkt` - Natural numbers
### Functor Examples
- `DFA.rkt` - Deterministic finite automata
- `NFA.rkt` - Nondeterministic finite automata
- `TDFA.rkt` - Typed DFA
- `Set->Rel.rkt` - Set to Relation functor
- `P_*.rkt`, `P^*.rkt`, `P_!.rkt` - Powerset functors
- `SliF.rkt`, `coSliF.rkt` - Slice functors
## Racket Integration
```bash
# 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:
```ruby
# 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):
1. `#E67F86` (+1) - info.rkt
2. `#D06546` (-1) - main.rkt
3. `#1316BB` (0) - ctp.scrbl
4. `#BA2645` (+1) - category/main.scrbl
5. `#49EE54` (-1) - functor/main.scrbl
6. `#11C710` (0) - natural transformation/
7. `#76B0F0` (+1) - code examples
## References
- [CTP Tutorial](https://docs.racket-lang.org/ctp/index.html)
- [Qi Flow Language](https://github.com/drym-org/qi) - Inspiration for CTP
- *Category Theory in Context* - Emily Riehl
- *Category Theory for Computing Science* - Barr & Wells
- [nLab](https://ncatlab.org/nlab/show/HomePage)
- [TheCatsters YouTube](https://www.youtube.com/@TheCatsters)
## Commands
```bash
# 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.Related Skills
yoneda-directed
Directed Yoneda lemma as directed path induction. Riehl-Shulman's key insight for synthetic ∞-categories.
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