Agentic Primitives Guide
This guide helps you choose the right type of agentic primitive for your use case in the AI Primitives Hub ecosystem.
Decision Tree
flowchart TD
A[Start: What do you want to create?] --> B{Is it for a specific task or scenario?}
B -->|Yes| C{Do you need reusable behavior?}
B -->|No| D{Do you want to share knowledge or standards?}
C -->|Yes| E{Does it require multiple files/assets?}
C -->|No| F[Create a Prompt]
E -->|Yes| G[Create a Skill]
E -->|No| H[Create an Agent]
D -->|Yes| I[Create an Instruction]
D -->|No| J[Create a Collection]
F --> K[.prompt.md file]
H --> L[.agent.md file]
G --> M[SKILL.md with assets]
I --> N[.instructions.md file]
J --> O[.collection.yml file]
Primitive Types Comparison
| Primitive | Purpose | Complexity | When to Use | File Format | Key Features |
|---|---|---|---|---|---|
| Prompt | Single-task instructions | Low | Quick, specific tasks | .prompt.md | Simple, focused, reusable |
| Instruction | Team standards & guidelines | Medium | Sharing best practices | .instructions.md | Contextual, educational |
| Agent | AI persona with behavior | Medium-High | Specialized AI roles | .agent.md | Personality, expertise areas |
| Skill | Complex capabilities with assets | High | Multi-file functionality | SKILL.md + assets | Bundled resources, tools |
| Collection | Organized groups of primitives | Variable | Curating related content | .collection.yml | Metadata-driven grouping |
Detailed Guide
🎯 Prompts (.prompt.md)
Use when you need:
- Quick, task-specific instructions
- Reusable single-purpose prompts
- Simple formatting without complex behavior
Examples:
- "Generate unit tests for this function"
- "Explain this code in simple terms"
- "Convert this SQL to MongoDB query"
Structure:
# Code Review Prompt
You are a senior developer reviewing code for:
- Performance issues
- Security vulnerabilities
- Code style violations
Please analyze the provided code and suggest improvements.
📚 Instructions (.instructions.md)
Use when you need:
- Team coding standards
- Best practices documentation
- Educational content for developers
- Process guidelines
Examples:
- "JavaScript coding standards for our team"
- "Security review checklist"
- "API design guidelines"
Structure:
# React Component Standards
## Overview
Guidelines for creating React components in our projects.
## Rules
- Use functional components with hooks
- Implement proper TypeScript types
- Follow naming conventions
## Examples
[Code examples and patterns]
🤖 Agents (.agent.md)
Use when you need:
- Specialized AI personas
- Domain-specific expertise
- Consistent behavior patterns
- Role-based interactions
Examples:
- "Senior React Architect"
- "Security Auditor"
- "Performance Optimization Expert"
Structure:
# React Architect Agent
You are a senior React architect with 10+ years experience.
## Expertise
- React ecosystem
- Performance optimization
- Architecture patterns
## Behavior
- Ask clarifying questions about requirements
- Suggest multiple implementation approaches
- Consider scalability and maintainability
## Limitations
- Focus on React/JavaScript solutions
- Ask for business context when needed
🛠️ Skills (SKILL.md)
Use when you need:
- Complex multi-file functionality
- External tool integration
- Custom workflows with assets
- Advanced capabilities
Examples:
- "Database Migration Tool"
- "API Documentation Generator"
- "Test Suite Builder"
Structure:
skills/my-skill/
├── SKILL.md
├── assets/
│ ├── templates/