Back to Skills

composable-primitives

majiayu000
Updated Yesterday
58
9
58
View on GitHub
Metaautomationdesign

About

This skill provides a framework for designing modular, reusable agent components that can be combined into flexible workflows. It's used when creating building blocks for software development lifecycles or agent operations that need to be adaptable. The core approach involves primitives like Classify and Plan to structure and solve engineering problems.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/composable-primitives

Copy and paste this command in Claude Code to install this skill

Documentation

Composable Primitives Skill

Guide design of composable agentic primitives for flexible workflow creation.

When to Use

  • Designing new agentic workflows
  • Customizing SDLC for specific needs
  • Mapping problem classes to primitives
  • Building organization-specific compositions

The Secret

"The secret of tactical agentic coding is that it's not about the software developer lifecycle at all. It's about composable agentic primitives you can use to solve any engineering problem class."

Core Primitives

PrimitivePurposeInputOutput
ClassifyCategorize inputIssue/taskClassification
PlanCreate implementation specIssuePlan file
BuildImplement the planPlan fileCode changes
TestValidate functionalityCode changesPass/fail
ReviewValidate alignmentSpec + codeIssue list
PatchFix specific issuesIssue descriptionTargeted fix
DocumentGenerate documentationCode changesDoc files
ShipDeploy to productionValidated codeDeployed state
BranchCreate isolated contextClassificationBranch name
CommitSave checkpointChangesCommit hash

Composition Workflow

Step 1: Identify Problem Class

What type of work?

  • Chore (simple, low risk)
  • Bug (medium complexity, clear criteria)
  • Feature (complex, full SDLC)
  • Hotfix (urgent, minimal process)
  • Documentation (content only)

Step 2: Select Primitives

Based on problem class, choose primitives:

Problem ClassPrimitives
ChoreClassify -> Build -> Test -> Ship
BugClassify -> Plan -> Build -> Test -> Review -> Ship
FeatureFull SDLC
HotfixPatch -> Test -> Ship
DocumentationDocument -> Review -> Ship

Step 3: Order by Dependencies

Ensure correct sequencing:

  • Plan before Build (Build needs plan)
  • Build before Test (Test needs code)
  • Test before Ship (Ship needs validation)

Step 4: Add Validation Points

Where should failures stop the pipeline?

Plan -> Build -> [Test GATE] -> Review -> [Review GATE] -> Ship

Step 5: Define Entry/Exit

  • Entry: What triggers this workflow?
  • Exit: What signals completion?

Standard Compositions

Full SDLC

Classify -> Plan -> Build -> Test -> Review -> Document -> Ship

ZTE (Zero-Touch)

Classify -> Plan -> Build -> Test -> Review -> Document -> Ship
                              | |
                          [GATE]         [GATE]

Quick Fix

Classify -> Patch -> Test -> Ship

Review-Driven

Review -> Patch -> Test -> Ship

Custom Composition Design

Organization Factors

Consider:

  • Testing requirements (mandatory E2E?)
  • Review processes (who reviews?)
  • Documentation standards (auto-generated?)
  • Deployment pipelines (manual approval?)
  • Compliance needs (audit trails?)

Example: Compliance-Heavy

Classify -> Plan -> [Compliance Review] -> Build -> Test ->
[Security Scan] -> Review -> Document -> [Approval] -> Ship

Example: Rapid Iteration

Build -> Test -> Ship (no planning for small changes)

Key Memory References

  • @composable-primitives.md - Detailed primitives documentation
  • @template-engineering.md - Templates as primitive definitions
  • @adw-anatomy.md - ADW as composition framework

Output Format

Provide composition design:

## Workflow Composition

**Problem Class:** {type}
**Entry Trigger:** {trigger}
**Exit Criteria:** {criteria}

### Primitives Selected
1. Classify - Categorize the task
2. Plan - Create implementation spec
3. Build - Implement changes
4. Test - Validate functionality
5. Ship - Deploy to production

### Composition Flow

Classify -> Plan -> Build -> Test -> Ship | [GATE: Must pass]


### Validation Gates

- After Test: Abort if tests fail
- After Review: Optional based on confidence

### Customizations

- [Organization-specific additions]

Anti-Patterns

  • Rigid SDLC thinking (must do all steps)
  • Over-composition (too many primitives)
  • Under-composition (missing critical steps)
  • Ignoring failure paths (no gates)
  • One-size-fits-all (same for all problem classes)

Version History

  • v1.0.0 (2025-12-26): Initial release

Last Updated

Date: 2025-12-26 Model: claude-opus-4-5-20251101

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/composable-primitives

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

creating-opencode-plugins

Meta

This skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill