原始内容
D6E Docker STF Skills
Claude/Cursor Agent Skills for developing custom D6E Docker STFs.
📚 What is This?
This repository contains Agent Skills that teach Claude and Cursor how to help developers create custom Docker-based State Transition Functions (STFs) for the D6E platform.
What are Agent Skills?
Agent Skills are Markdown documents that provide AI assistants with domain-specific knowledge and workflows. They enable Claude/Cursor to:
- Understand D6E's Docker STF architecture
- Generate correct implementation patterns
- Guide developers through the creation process
- Provide best practices and troubleshooting
🎯 Available Skills
D6E Docker STF Development
Teaches Claude/Cursor how to help developers create custom Docker-based STFs for D6E, including:
- Input/output JSON formats
- SQL API integration
- Multi-language implementations (Python, Node.js, Go)
- Best practices and security guidelines
- The
describeoperation for self-documenting STFs - Common patterns and examples
- Troubleshooting guide
📦 Installation
Quick Install (Recommended)
Install this skill using the skills.sh CLI:
npx skills add d6e-ai/d6e-docker-stf-skills --skill d6e-docker-stf-development
This will automatically set up the skill in your Cursor environment.
Manual Installation
For Cursor
Clone the repository:
git clone https://github.com/d6e-ai/d6e-docker-stf-skills.gitAdd to Cursor:
- Open Cursor Settings (Cmd/Ctrl + ,)
- Navigate to "Features" → "Agent Skills"
- Add skill directory:
/path/to/d6e-docker-stf-skills/skills/d6e-docker-stf-development
Verify installation:
- Open Composer (Cmd/Ctrl + I)
- Type
@skillsto see available skills - You should see "d6e-docker-stf-development"
For Claude Code
Clone the repository:
git clone https://github.com/d6e-ai/d6e-docker-stf-skills.gitReference the skill:
- In your project, reference
@skills/d6e-docker-stf-development/SKILL.md - Claude will automatically load the skill content
- In your project, reference
🚀 How to Use
Quick Start (5 minutes)
New to D6E Docker STFs? Start with the Quick Start Guide to create your first Docker STF in 5 minutes!
For Cursor Users
Open this repository in Cursor
git clone https://github.com/d6e-ai/d6e-docker-stf-skills.git cd d6e-docker-stf-skills cursor .Open Composer (Cmd/Ctrl + I)
Paste a prompt (choose from AI Prompts)
Using the D6E Docker STF Development skill, create a Docker STF for data validation. Requirements: - Python implementation - Fetch data from database - Apply validation rules - Return resultsReview and test the generated code
For Claude Code Users
Open the project
Reference the skill document
Using @skills/d6e-docker-stf-development/SKILL.md, create a simple Echo Docker STF.Review and test the generated code
For Developers
📖 Documentation
- Quick Start - Create a Docker STF in 5 minutes
- Developer Guide - Detailed development guide
- AI Prompts - Copy-paste prompt collection
- Testing Guide - Testing methods
- Publishing Guide - How to publish Docker images
- D6E Docker STF Development Skill - Complete skill document
🔄 Workflow
- Develop: Generate code with Cursor/Claude Code
- Test: Test locally with Docker
- Publish: Publish to Container Registry
- Deploy: Use in D6E
For AI Assistants (Claude/Cursor)
When a user requests help with D6E Docker STFs:
- Read the relevant skill document (
skills/d6e-docker-stf-development/SKILL.md) - Apply the patterns and guidelines
- Generate code that follows D6E conventions
- Always include the
describeoperation in every generated STF - Include necessary files (Dockerfile, requirements.txt, etc.)
- Provide testing and deployment instructions
- When creating workflows, run
describefirst to discover input schema - Reference the appropriate documentation for more details
📖 What You'll Learn
- D6E Architecture: How Docker STFs fit into D6E workflows
- Input/Output Formats: Standard JSON schemas for communication
- The
describeOperation: Self-documenting STFs that expose their input schema and available operations - SQL API: Secure database access from Docker containers
- Multi-Language Support: Python, Node.js, and Go examples
- Security: Policy-based access control and best practices
- Testing: Local testing before deployment
- Publishing: Container registry setup and distribution
🛠️ Quick Example
Example 1: Simple Echo STF
Prompt:
Using the D6E Docker STF Development skill, create a simple Echo Docker STF.
Requirements:
- Python implementation
- operation: "echo"
- Error handling
- Include Dockerfile, requirements.txt, and README.md
Generated files:
main.py- Main logicDockerfile- Container definitionrequirements.txt- DependenciesREADME.md- Usage instructions
Example 2: Database Query STF
Prompt:
Using the D6E Docker STF Development skill, create a Docker STF that fetches data from the database.
Requirements:
- Node.js (TypeScript) implementation
- operation: "query_data"
- Use SQL API to fetch data
- Include policy configuration instructions
Example 3: External API Integration
Prompt:
Using the D6E Docker STF Development skill, create a Docker STF that integrates with an external API.
Requirements:
- Python implementation
- Fetch data from external API
- Store in D6E database
- Error handling and retry logic
For more prompt examples, see AI Prompts.
The describe Operation
Every Docker STF implements a describe operation that returns its input schema and available operations. This enables workflow builders and AI agents to discover capabilities before creating workflows.
# Discover what an STF supports
echo '{"workspace_id":"test","stf_id":"test","caller":null,"api_url":"http://localhost:8080","api_token":"test","input":{"operation":"describe"},"sources":{}}' \
| docker run --rm -i echo-stf:latest
This returns the full input schema, including all operations, required parameters, and optional parameters. See the skill document for details.
Real Sample Code
examples/echo-stf contains a working simple Docker STF example with the describe operation implemented.
cd examples/echo-stf
./test-local.sh # Build & test (includes describe test)
🔗 Related Resources
Documentation
- Quick Start Guide - 5-minute quick start
- AI Prompts Collection - Ready-to-use prompts
- Developer Guide - Detailed development guide
- Testing Guide - Comprehensive testing methods
- Publishing Guide - How to publish images
External Resources
- skills.sh - The Open Agent Skills Ecosystem
- D6E Platform - D6E main repository
- D6E Docker Runtime Guide - Docker Runtime details
- examples/echo-stf - Sample Docker STF in this repository
- Claude Agent Skills Documentation - Agent Skills overview
- Model Context Protocol - MCP specification
🤝 Contributing
Contributions are welcome! Help us add new skills or improve existing ones.
For detailed guidelines, see CONTRIBUTING.md.
Simple Contribution Steps
- Fork the repository
- Make changes (documentation improvements, samples, bug fixes, etc.)
- Create a Pull Request
What You Can Contribute
- 📝 Documentation improvements (typo fixes, clarifications)
- 💡 New prompt examples
- 🐛 Bug reports and fixes
- 🎯 New Agent Skills
- 📚 Sample code
Skill Document Format
New skills should include:
- Overview: Skill overview
- When to Use: When to use it
- How to: Step-by-step instructions
- Best Practices: Best practices
- Examples: Concrete code examples
- Troubleshooting: Troubleshooting
- Reference: Technical specifications
For details, see CONTRIBUTING.md.
📝 License
MIT License - see LICENSE for details
🌟 Why Agent Skills for D6E?
Traditional documentation tells developers what to do. Agent Skills teach AI assistants how to help developers create D6E Docker STFs correctly. This means:
- ✅ Faster Development: Claude/Cursor generates correct code instantly
- ✅ Fewer Errors: Follows D6E conventions automatically
- ✅ Self-Documenting STFs: The
describeoperation eliminates guesswork when building workflows - ✅ Best Practices: Security and performance baked in
- ✅ Up-to-date: Easy to update as D6E evolves
- ✅ Accessible: Developers don't need to memorize APIs
💻 Using with Cursor and Claude Code
Using with Cursor
Cursor automatically recognizes .md files as Agent Skills.
Open repository
cursor /path/to/agent-skillsUse Composer (Cmd/Ctrl + I)
- Composer automatically loads skill documents
- Paste prompts and get appropriate code generated
Use @mention feature (optional)
Using @skills/d6e-docker-stf-development/SKILL.md, create an Echo Docker STF.Also available in Chat
- Regular chat can also reference skill documents
Using with Claude Code
In Claude Code, you must explicitly reference skill documents.
Open project
Reference skill document
Using @skills/d6e-docker-stf-development/SKILL.md, implement [your requirements].Or add skill document to context
- Open file to review content
- Add to context
Prompt Best Practices
✅ Good Prompt
Using the D6E Docker STF Development skill, create a Docker STF with the following requirements:
Language: Python 3.11
Operation: "process_data"
Input format: { "data": [...], "operation_type": "validate" }
Output format: { "status": "success", "results": [...] }
Required files:
- main.py
- Dockerfile (use python:3.11-slim)
- requirements.txt
- README.md
Include error handling and logging.
❌ Bad Prompt
Create a Docker STF
Reason: Lacks specificity and expected results are unclear
🎓 Learn More
This Repository
- Quick Start - Get started in 5 minutes
- AI Prompts - Prompt examples
- Developer Guide - Detailed guide
- Testing Guide - Testing methods
- Publishing Guide - Publishing methods
External Resources
- Agent Skills Overview - Agent Skills overview
- Creating Agent Skills - How to create Agent Skills
- D6E Documentation - D6E platform
- examples/echo-stf - Sample project in this repository