Master reference for categorical meta-prompting unified syntax. Contains all modifiers, operators, composition patterns, and execution protocols. Use this skill for self-reference when executing any prompt workflow, ensuring consistent syntax across all commands and skills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/meta-prompting-plugin:meta-selfThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill serves as the authoritative reference for the categorical meta-prompting framework. All commands and skills should align with this specification.
This skill serves as the authoritative reference for the categorical meta-prompting framework. All commands and skills should align with this specification.
F: Task → Prompt (Functor - structure-preserving transformation)
M: Prompt →^n Prompt (Monad - iterative refinement)
W: History → Context (Comonad - context extraction)
α: F ⇒ G (Natural Transformation - strategy switching)
E: Either Error A (Exception Monad - error handling)
[0,1]: Quality → Quality (Enriched - quality tracking)
1. Functor Identity: F(id) = id
2. Functor Composition: F(g ∘ f) = F(g) ∘ F(f)
3. Monad Left Identity: return >=> f = f
4. Monad Right Identity: f >=> return = f
5. Monad Associativity: (f >=> g) >=> h = f >=> (g >=> h)
6. Comonad Left Id: extract ∘ duplicate = id
7. Comonad Associativity: duplicate ∘ duplicate = fmap duplicate ∘ duplicate
8. Naturality Condition: α_B ∘ F(f) = G(f) ∘ α_A for all f: A → B
9. Exception Catch Id: catch(Right(a), h) = Right(a) (Phase 3)
10. Exception Catch Err: catch(Left(e), h) = h(e) (Phase 3)
11. Exception Assoc: Error handling preserves Kleisli associativity
12. Quality Monotonicity: quality(A ⊗ B) ≤ min(quality(A), quality(B))
Type: Either<Error, A> = Left(Error) | Right(A)
Operations:
a → Right(a) (pure success)m >>= f = case m of
Left(e) → Left(e) -- error propagates
Right(a) → f(a) -- continue on success
catch(m, handler) = case m of
Left(e) → handler(e) -- recover from error
Right(a) → Right(a) -- pass through success
Laws:
return(a) >>= f = f(a)m >>= return = m(m >>= f) >>= g = m >>= (λx. f(x) >>= g)catch(Right(a), h) = Right(a)catch(Left(e), h) = h(e)catch(catch(m, h1), h2) = catch(m, λe. catch(h1(e), h2))In Framework:
@catch: modifier for error handling behaviors@fallback: modifier for recovery strategies/chain and /rmp commandsAll commands support these modifiers. Place them before the task description.
| Mode | Description | Effect |
|---|---|---|
@mode:active | Default execution | Execute with auto-detection |
@mode:iterative | RMP loop | Iterate until @quality: met |
@mode:dry-run | Preview only | Show plan, no execution |
@mode:spec | Generate spec | Output YAML specification |
Example: /meta @mode:iterative "build auth system"
| Format | Description | Range |
|---|---|---|
@quality:0.85 | Target threshold | 0.0 - 1.0 |
@quality:85% | Percentage form | 0% - 100% |
Example: /rmp @quality:0.9 "optimize algorithm"
| Tier | Tokens | Pattern | Strategy |
|---|---|---|---|
@tier:L1 | 600-1200 | Single op | DIRECT |
@tier:L2 | 1500-3000 | A → B | DIRECT |
@tier:L3 | 2500-4500 | A → B → C | MULTI_APPROACH |
@tier:L4 | 3000-6000 | A || B || C | MULTI_APPROACH |
@tier:L5 | 5500-9000 | Hierarchical | AUTONOMOUS_EVOLUTION |
@tier:L6 | 8000-12000 | Iterative | AUTONOMOUS_EVOLUTION |
@tier:L7 | 12000-22000 | Ensemble | AUTONOMOUS_EVOLUTION |
Example: /meta @tier:L5 "design microservices"
| Format | Description |
|---|---|
@budget:20000 | Total tokens |
@budget:[5K,4K,6K] | Per-agent allocation |
@budget:auto | Automatic calculation |
Example: /task-relay @budget:[5000,4000,6000] [R→D→I]
| Format | Description | Action |
|---|---|---|
@variance:15% | Acceptable variance | WARN if exceeded |
@variance:20% | Default | HALT if exceeded |
Example: /hekat @budget:18K @variance:15% [R→D→I]
| Format | Description |
|---|---|
@max_iterations:5 | Maximum RMP iterations |
@max_iterations:3 | Fewer iterations |
Example: /rmp @quality:0.9 @max_iterations:3 "task"
| Format | Description | Result |
|---|---|---|
@catch:halt | Stop chain on error (default) | Left(error) |
@catch:log | Log error, continue chain | Left(error) logged |
@catch:retry:N | Retry command N times | Right(result) or Left(error) |
@catch:skip | Skip failed command | Right(empty) |
@catch:substitute:/alt | Use alternative command | Right(alt_result) |
Example: /chain @catch:retry:3 [/api→/process] "fetch data"
| Format | Description | When Used |
|---|---|---|
@fallback:return-best | Return highest quality result | Iterative refinement |
@fallback:return-last | Return last successful result | Prefer recency |
@fallback:use-default:[val] | Use specific default | Known safe value |
@fallback:empty | Return empty/neutral | Minimal context |
Example: /rmp @fallback:return-best @quality:0.9 "complex task"
| Format | Description | Output |
|---|---|---|
@quality:visualize | Show quality flow (default: bar chart) | Visual quality tracking |
@quality:visualize:bar | Bar chart format | ASCII bar chart |
@quality:visualize:flow | Flow diagram format | Arrows with quality values |
@quality:visualize:detailed | Detailed breakdown | Full quality metrics |
@quality:visualize:compact | Compact summary | Single-line summary |
Categorical Foundation: Uses [0,1]-enriched category structure where Hom_Q(A, B) = [0,1] and quality tensor follows q1 ⊗ q2 = min(q1, q2)
Example: /chain @quality:visualize [/analyze→/design→/implement] "build feature"
| Format | Description |
|---|---|
@template:{context:expert} | Single component |
@template:{context:X}+{mode:Y}+{format:Z} | Combined |
Components:
{context:expert\|teacher\|reviewer\|debugger}{mode:direct\|cot\|multi\|iterative}{format:prose\|structured\|code\|checklist}Example: /meta @template:{context:expert}+{mode:cot}+{format:code} "implement"
| Domain | Use Case |
|---|---|
@domain:ALGORITHM | Algorithmic correctness |
@domain:SECURITY | Security review |
@domain:API | API design/review |
@domain:DEBUG | Debugging |
@domain:TESTING | Test generation |
Example: /meta @domain:SECURITY "review auth code"
| Format | Description |
|---|---|
@skills:discover(domain=X) | Discover by domain |
@skills:discover(relevance>0.7) | Discover by quality |
@skills:compose(A⊗B) | Tensor composition |
@skills:compose(A→B→C) | Sequential |
@skills:compose(A>=>B) | Kleisli |
@skills:skill1,skill2 | Explicit list |
@skills:best(domain=X) | Best for domain |
Example: /meta-command @skills:compose(api-testing⊗validation) "create tests"
Unicode: U+2192
Meaning: Output of A becomes input of B
Quality: quality(A → B) ≤ min(quality(A), quality(B))
# Command syntax
/chain [/debug→/review→/test] "error in auth.py"
# Agent syntax
[R→D→I→T] "build feature"
# Skill syntax
@skills:compose(research→design→implement)
Meaning: Execute A, B, C concurrently, aggregate results
Quality: quality(A || B || C) = mean(quality(A), quality(B), quality(C))
# Parallel commands
/chain [/review-security || /review-performance] "audit code"
# Parallel agents
[R||D||A] "evaluate options"
# Mixed
[R→(D||F)→I] "full-stack with parallel design"
Unicode: U+2297
Meaning: Combine capabilities, quality degrades to minimum
Quality: quality(A ⊗ B) = min(quality(A), quality(B))
# Skill tensor
@skills:compose(api-testing⊗jest-patterns⊗validation)
# Agent tensor
[debug-detective⊗test-engineer] "fix and test"
Meaning: Composition with quality-gated iteration at each stage
Quality: quality(A >=> B) improves with each iteration
# RMP stages
/rmp @quality:0.85 [analyze>=>design>=>implement] "build feature"
# Each stage:
# 1. Execute
# 2. Assess quality
# 3. If quality < threshold: refine
# 4. Pass to next stage
/<command> @modifier1:value @modifier2:value [composition] "task description"
# Simple
/meta "implement rate limiter"
# With modifiers
/meta @mode:iterative @quality:0.85 "build API"
# With composition
/chain [/debug→/fix→/test] "TypeError in auth.py"
# Full syntax
/hekat @mode:active @tier:L5 @budget:18K [R→D→(I||T)] "build auth system"
# With skills
/meta-command @skills:discover(domain=API) @mode:iterative "create endpoint"
| Key | Agent | Domain |
|---|---|---|
[R] | deep-researcher | Research |
[D] | api-architect | Design |
[I] | practical-programmer | Implementation |
[T] | test-engineer | Testing |
[B] | build-engineer | Build |
[F] | frontend-specialist | Frontend |
[A] | analyzer | Analysis |
| Key | Effect |
|---|---|
[Ctrl+P] | L4 Parallel mode |
[Ctrl+H] | L5 Hierarchical mode |
[Ctrl+I] | L6 Iterative mode |
[R→D→I] # Research → Design → Implement
[R→D→I→T] # Full pipeline with testing
[P:R||D||A] # Parallel: Research, Design, Analyze
[R→(D||F)→I] # Mixed: Research, parallel Design/Frontend, Implement
| Dimension | Weight | Description |
|---|---|---|
| Correctness | 40% | Does it solve the problem? |
| Clarity | 25% | Is it understandable? |
| Completeness | 20% | Are edge cases handled? |
| Efficiency | 15% | Is it well-designed? |
aggregate = (0.40 × correctness) + (0.25 × clarity) +
(0.20 × completeness) + (0.15 × efficiency)
| Score | Status | Action |
|---|---|---|
| ≥0.9 | Excellent | Stop, success |
| 0.8-0.9 | Good | Stop, success |
| 0.7-0.8 | Acceptable | Continue if @mode:iterative |
| 0.6-0.7 | Poor | Refine if iterations remain |
| <0.6 | Failed | Abort or restructure |
All commands produce standardized checkpoints:
CHECKPOINT_[type]_[n]:
command: /[command]
iteration: [n]
quality:
correctness: [0-1]
clarity: [0-1]
completeness: [0-1]
efficiency: [0-1]
aggregate: [0-1]
quality_delta: [+/- from previous]
budget:
used: [tokens]
remaining: [tokens]
variance: [%]
status: [CONTINUE | CONVERGED | MAX_ITERATIONS | HALT]
trend: [RAPID_IMPROVEMENT | STEADY_IMPROVEMENT | PLATEAU | DEGRADING]
/meta "task"
/rmp @quality:0.85 @max_iterations:5 "task"
/chain [/analyze→/design→/implement→/test] "feature"
/chain [/approach-a || /approach-b || /approach-c] "evaluate options"
/hekat @tier:L5 [Lead→(Worker||Worker)→Synthesize] "complex task"
/meta-command @skills:discover(domain=API,relevance>0.7) "create endpoint command"
STATUS: HALT
reason: "Budget variance exceeded @variance: threshold"
action: "Review agent outputs, adjust budget allocation"
STATUS: NO_IMPROVEMENT
reason: "Quality improvement < 0.02 for 2 iterations"
action: "Fixed-point reached, returning best result"
STATUS: MAX_ITERATIONS
reason: "Reached @max_iterations: limit"
action: "Return best result from iterations"
When executing any command or skill:
| Command | Categorical Role | Key Modifiers |
|---|---|---|
/meta | Functor F: Task → Prompt | @mode:, @tier:, @template:, @domain: |
/rmp | Monad M: Prompt →ⁿ Prompt | @quality:, @max_iterations:, @mode: |
/context | Comonad W: History → Context | @mode:, @focus:, @depth:, @transform: |
/transform | Nat. Trans. α: F ⇒ G | @from:, @to:, @verify:, @mode: |
| Mode | Description | Type Signature |
|---|---|---|
@mode:transform | Strategy switch (default) | α_A: F(A) → G(A) |
@mode:compare | Compare strategies | Show F vs G side-by-side |
@mode:analyze | Recommend optimal | Suggest best α |
Strategy Registry (Functors):
zero-shot (F_ZS): Direct prompt, quality ~0.65few-shot (F_FS): Exemplar prompt, quality ~0.78chain-of-thought (F_CoT): Reasoning prompt, quality ~0.85tree-of-thought (F_ToT): Branching prompt, quality ~0.88meta-prompting (F_Meta): Adaptive prompt, quality ~0.90Aliases:
/cot = /transform @to:chain-of-thought/tot = /transform @to:tree-of-thought| Mode | Operation | Type Signature |
|---|---|---|
@mode:extract | Focus on current | ε: W(A) → A |
@mode:duplicate | Meta-observation | δ: W(A) → W(W(A)) |
@mode:extend | Context-aware transform | (W(A) → B) → W(A) → W(B) |
Aliases:
/extract = /context @mode:extract/focus = /context @mode:extract @depth:1| Command | Purpose | Key Modifiers |
|---|---|---|
/chain | Command composition | @mode:, @budget:, @quality:, @catch:, @fallback:, @quality:visualize |
/route | Dynamic routing | @domain: |
/build-prompt | Template assembly | @template: |
| Command | Purpose | Key Modifiers |
|---|---|---|
/review | Domain-aware code review | @domain: |
/debug | Systematic debugging | @mode: |
/hekat | Agent orchestration DSL | @tier:, @budget:, @variance: |
/meta-command | Create new commands | @skills:, @mode: |
/task-relay | Multi-agent relay | @budget:, @pattern: |
| Skill | Purpose | Integration |
|---|---|---|
categorical-meta-prompting | Core F, M, W framework | /meta, /rmp, /context |
categorical-structure-builder | Implement any categorical structure | {prompt:categorical-structure} |
recursive-meta-prompting | RMP implementation patterns | @mode:iterative |
dynamic-prompt-registry | Prompt lookup/composition | @skills:, {prompt:} |
quality-enriched-prompting | [0,1]-enriched quality | @quality: |
atomic-blocks | Composable atomic blocks | /blocks, @block: |
meta-self | This reference | Self-reference |
For power users who need fine-grained control, the framework exposes atomic blocks that underlie all commands.
Skill: atomic-blocks
Command: /blocks [composition] "task"
| Layer | Blocks | Purpose |
|---|---|---|
| Assessment | assess_difficulty, assess_domain, assess_quality, select_tier | Analyze and classify |
| Transformation | select_strategy, build_template, apply_transform, execute_prompt | Transform to outputs |
| Refinement | evaluate_convergence, extract_improvement, apply_refinement | Monad M iteration |
| Composition | sequence (→), parallel (||), kleisli (>=>), tensor (⊗) | Combine blocks |
| Layer | Users | Access |
|---|---|---|
| 1 | 90% | /meta "task" - blocks hidden |
| 2 | 9% | /meta @block:assess_domain:SECURITY "task" - override block |
| 3 | 1% | /blocks [assess_difficulty → select_tier] "task" - compose |
Full specification: skill:atomic-blocks
Before executing any prompt:
@name:value syntax→, ||, ⊗, >=>[...]"task"Specification Version: 2.5 Compatibility: 100% backward compatible Foundation: Category Theory (F, M, W, α, E, [0,1]-enriched) Last Updated: 2025-12-01 New in 2.5: Atomic blocks system with /blocks command, @block: overrides, progressive disclosure New in 2.4: Quality Visualization via @quality:visualize modifier (Phase 5) New in 2.3: Exception Monad E for error handling via @catch:/@fallback: modifiers New in 2.2: Natural Transformation α operations via /transform command New in 2.1: Comonad W operations via /context command
npx claudepluginhub manutej/meta-prompting-plugin --plugin meta-prompting-pluginProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.