apache/hamilton/hamilton-dev-workflow
- community
Checking that the SKILL.md file is still in the repository.
Systematic 5-step workflow for building Hamilton DAGs - DOT graphs, signatures, validation, TDD implementation. Use this workflow when creating new Hamilton modules from scratch.
Install
npx vskill@latest install apache/hamilton/hamilton-dev-workflowSKILL.md
Hamilton Development Workflow for Claude Code
TL;DR: Build Hamilton DAGs systematically using DOT → Signatures → Validation → TDD implementation.
Why This Workflow?
This workflow optimizes for:
- Token efficiency: DOT language is extremely concise
- Early validation: Catch graph errors before implementation
- LLM-friendly: Well-structured, incremental approach
- Testability: Build complex systems node-by-node with tests
- Pragmatic typing: Handle type annotations strategically
The 5-Step Workflow
Step 1: Natural Language → DOT Graph
Convert user requirements into DOT language representation
DOT language is:
- Simple and well-understood by LLMs
- Extremely token-efficient
- Perfect for representing DAG structure
- Easy to validate visually
Example:
Best Practices:
- Use descriptive node names (snake_case)
- Mark inputs with
[shape=box, color=blue] - Add comments for clarity
- Keep it simple - just the graph structure
Step 2: DOT Graph → Function Signatures + Docstrings
Convert DOT nodes into Python function signatures
This step is mechanical and can be automated. For each node:
- Create a function with the node name
- Add parameters based on incoming edges
- Add return type annotation (use
Anyif uncertain) - Write a clear docstring explaining what the node computes
Example:
Type Annotation Strategy:
- Known types: Use specific types (pd.DataFrame, pd.Series, int, str)
- Uncertain: Use
Any- you'll fix this later with MonkeyType - Complex types: Start with
Any, refine incrementally
Step 3: Validate DAG with Hamilton CLI
Verify the graph structure before implementing logic
Use the Hamilton CLI to validate:
What to check:
- ✅ No circular dependencies
- ✅ All edges connect properly
- ✅ Input nodes are identified correctly
- ✅ Output nodes are what you expect
- ✅ No typos in function/parameter names
If validation fails:
- Fix the function signatures (parameter names, function names)
- Re-run
hamilton build - Don't proceed to implementation until validation passes
Step 4: Function Signatures → TDD Implementation
Implement nodes incrementally with test-driven development
This is where the workflow shines for LLMs. Instead of writing all code at once:
Process:
- Pick ONE node to implement (start with inputs, work forward)
- Write a test for that node first
- Implement the node to pass the test
- Run the test to verify
- Move to the next node
Example - Node by node:
Why this works:
- Focused context: LLM only thinks about one node at a time
- Immediate validation: Each node is tested before moving on
- Easy refactoring: Well-tested nodes can be safely refactored
- Handles complexity: Build complex pipelines without "spaghetti code"
- Clear progress: Know exactly what's done and what's left
Step 5: Handle Type Annotations Pragmatically
Use MonkeyType or runtime inference to add accurate types
Don't spend time guessing types upfront. Instead:
Option A: Use `Any` everywhere initially
Option B: Disable type validation in Driver
Option C: Run MonkeyType to infer types
After implementing and testing:
MonkeyType will:
- Observe actual values passed at runtime
- Infer concrete types from observations
- Generate accurate type annotations
- Update your source files
Result: Accurate types without upfront guessing!
Important: MonkeyType isn't perfect, but it's:
- ✅ Much faster than manual annotation
- ✅ Based on real runtime behavior
- ✅ Good enough for first drafts
- ✅ Easy to refine manually later
Complete Example
User Request: "Create a pipeline that loads JSON data, filters by status='active', enriches with external API data, and outputs to Parquet"
Step 1: DOT Graph
Step 2: Function Signatures
Step 3: Validate
Step 4: TDD Implementation
Test 1:
Implementation 1:
Test 2:
Implementation 2:
...continue for each node...
Step 5: Add Types with MonkeyType
Result: Accurate type annotations added automatically!
Key Benefits of This Workflow
For LLMs (Claude):
- Structured thinking: Each step has clear boundaries
- Token efficient: DOT is concise, avoids redundant code
- Incremental: Build one piece at a time
- Validatable: Check work at each step
- Manageable complexity: Never overwhelmed with full implementation
For Developers:
- Visual validation: See the DAG before coding
- Test coverage: Every node is tested
- Maintainable: Well-structured, documented code
- Debuggable: Issues isolated to specific nodes
- Refactorable: Safe to modify with test coverage
Advanced Patterns
Using Function Modifiers
Add decorators in Step 2:
Update DOT graph to reflect expanded nodes:
Async Functions
Mark async in Step 2:
Use async driver:
Common Pitfalls
❌ Implementing before validating
Don't write function bodies before running hamilton build. Validate structure first!
❌ Writing all code at once
Don't implement all nodes before testing. Go node-by-node with TDD.
❌ Guessing type annotations
Don't waste time guessing types. Use Any + MonkeyType or disable validation initially.
❌ Skipping the DOT step
Don't jump straight to code. The DOT graph is your blueprint - validate it first.
❌ Not running tests
Don't implement the next node until the current one passes its test.
Quick Reference
Summary
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.claude-plugin/skills/hamilton-dev-workflow/SKILL.md
Popularity
- Repository stars
- 2,546
- Repository forks
- 198
- 7-day trend score
- 39
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/apache/hamilton/hamilton-dev-workflow)