Skip to content

Commit 5cef5c7

Browse files
committed
Split Hamilton Claude plugin into 5 focused skills
Replace single monolithic skill with 5 specialized skills for better organization: - **core**: Basic Hamilton patterns (DAG creation, decorators, testing, debugging) - **scale**: Performance & parallelization (async, Spark, Ray, Dask, caching, multithreading) - **llm**: AI/ML workflows (RAG pipelines, embeddings, vector DBs, prompt engineering) - **observability**: Hamilton UI & SDK (tracking, monitoring, lineage, debugging) - **integrations**: Orchestrators & frameworks (Airflow, FastAPI, Streamlit, Jupyter) Each skill is ~200-400 lines, focused, and independently invocable via: - /hamilton-core - /hamilton-scale - /hamilton-llm - /hamilton-observability - /hamilton-integrations Benefits: - Faster skill loading (only load what's needed) - Better context relevance (focused expertise) - Easier maintenance (separate concerns) - Scales with Hamilton's growth (can add more skills) Updated plugin.json to v2.0.0 with array of skill paths. (+6 squashed commits) Squashed commits: [137a106] Remove duplicate skill directory and ignore local settings Remove `.claude/skills/hamilton/` directory to eliminate duplication. Keep only `.claude/plugins/hamilton/skills/hamilton/` as the single source of truth. Update all references in documentation to point to the plugin location. Also remove `.claude/settings.local.json` from tracking and add it to `.gitignore` as it contains personal settings. [f5ca918] Enhance Claude skill with async, Spark, caching, and parallelism documentation Expand the Hamilton Claude Code skill to comprehensively cover I/O-bound parallelization patterns and distributed processing. Adds detailed examples and best practices for AsyncDriver (RAG pipelines, dependent API chains), Apache Spark integration (@with_columns decorator, pandas UDFs), caching strategies (LLM call optimization, automatic invalidation), and MultiThreadingExecutor for synchronous I/O concurrency. These additions help users leverage Hamilton's full parallelization capabilities for modern data and AI workflows. [e09e968] Fix Sphinx toctree warning for Claude Code plugin documentation [263e092] Update Claude Code plugin to use Apache Hamilton branding Update all references in the Claude Code plugin and skills to properly use "Apache Hamilton" as the project name throughout documentation, descriptions, and user-facing text. This ensures consistent branding and recognition of the project as part of the Apache Software Foundation. Changes include: - Plugin description and metadata - Skill descriptions and documentation - README files for both plugin and skills - Code examples and patterns documentation - Installation and contribution guidelines [b68f77b] Update Claude Code plugin references from dagworks-inc to apache Change all plugin and skill references to use Apache organization: - GitHub URLs: dagworks-inc/hamilton → apache/hamilton - Documentation URLs: hamilton.dagworks.io → hamilton.apache.org - Contact email: support@dagworks.io → dev@hamilton.apache.org - Marketplace owner: DAGWorks Inc. → Apache Software Foundation [f290bc7] Add Claude Code plugin for AI-assisted Hamilton development This commit adds a comprehensive Claude Code plugin/skill that provides AI-powered assistance for Hamilton DAG development. Features: - Create Hamilton modules with proper patterns and decorators - Understand and explain existing DAGs - Apply function modifiers (@parameterize, @config.when, @check_output, etc.) - Convert Python scripts to Hamilton modules - Debug issues (circular dependencies, missing nodes, etc.) - Optimize pipelines with caching and parallelization - Generate tests and documentation - LLM/RAG workflow patterns - Integration patterns (Airflow, FastAPI, Streamlit, etc.) Structure: - .claude/skills/hamilton/ - Auto-available for Hamilton contributors - .claude/plugins/hamilton/ - Installable plugin for external users - docs/ecosystem/claude-code-plugin.md - User documentation Installation for users: /plugin marketplace add dagworks-inc/hamilton /plugin install hamilton --scope user All files include Apache 2.0 license headers. Contributing: Users can file issues or submit PRs to improve the skill.
1 parent 5b1af5e commit 5cef5c7

12 files changed

Lines changed: 3085 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Hamilton Plugin Marketplace",
3+
"description": "Official Claude Code plugin for the Hamilton framework",
4+
"version": "1.0.0",
5+
"owner": {
6+
"name": "Apache Software Foundation",
7+
"url": "https://www.apache.org/"
8+
},
9+
"plugins": [
10+
{
11+
"name": "hamilton",
12+
"source": "./",
13+
"description": "Expert AI assistant for Hamilton framework development - create DAGs, apply decorators, debug dataflows, and optimize pipelines",
14+
"version": "1.0.0",
15+
"author": {
16+
"name": "Hamilton Team",
17+
"email": "dev@hamilton.apache.org"
18+
},
19+
"homepage": "https://github.com/apache/hamilton",
20+
"repository": "https://github.com/apache/hamilton",
21+
"license": "Apache-2.0",
22+
"keywords": [
23+
"hamilton",
24+
"dag",
25+
"dataflow",
26+
"workflow",
27+
"pipeline",
28+
"data-engineering",
29+
"ml-ops",
30+
"feature-engineering"
31+
]
32+
}
33+
]
34+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "hamilton",
3+
"version": "2.0.0",
4+
"description": "Expert AI assistant for Apache Hamilton framework development - create DAGs, apply decorators, debug dataflows, and optimize pipelines",
5+
"author": {
6+
"name": "Hamilton Team",
7+
"email": "dev@hamilton.apache.org"
8+
},
9+
"homepage": "https://github.com/apache/hamilton",
10+
"repository": "https://github.com/apache/hamilton",
11+
"license": "Apache-2.0",
12+
"keywords": [
13+
"hamilton",
14+
"dag",
15+
"dataflow",
16+
"workflow",
17+
"pipeline",
18+
"data-engineering",
19+
"ml-ops",
20+
"feature-engineering",
21+
"llm",
22+
"rag",
23+
"async",
24+
"spark",
25+
"observability"
26+
],
27+
"skills": [
28+
"./skills/core",
29+
"./skills/scale",
30+
"./skills/llm",
31+
"./skills/observability",
32+
"./skills/integrations"
33+
]
34+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Changelog
21+
22+
All notable changes to the Hamilton Claude Code plugin will be documented in this file.
23+
24+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
25+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
26+
27+
## [1.0.0] - 2025-01-31
28+
29+
### Added
30+
- Initial release of Hamilton Claude Code plugin
31+
- Comprehensive skill for Hamilton DAG development
32+
- Support for creating new Hamilton modules with best practices
33+
- Function modifier guidance (@parameterize, @config.when, @extract_columns, @check_output, etc.)
34+
- Code conversion assistance (Python scripts → Hamilton modules)
35+
- DAG visualization and understanding
36+
- Debugging assistance for common issues
37+
- Data quality validation patterns
38+
- LLM/RAG workflow examples
39+
- Feature engineering patterns
40+
- Integration examples:
41+
- Airflow
42+
- FastAPI
43+
- Streamlit
44+
- Jupyter notebooks
45+
- Parallel execution patterns (ThreadPool, Ray, Dask, Spark)
46+
- Caching strategies
47+
- Testing guidance
48+
49+
### Documentation
50+
- Comprehensive SKILL.md with all Hamilton patterns
51+
- examples.md with 60+ production-ready code examples
52+
- README.md with installation and usage instructions
53+
- Plugin manifest (plugin.json) and marketplace (marketplace.json)
54+
55+
[1.0.0]: https://github.com/apache/hamilton/releases/tag/claude-plugin-v1.0.0

.claude/plugins/hamilton/README.md

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Apache Hamilton Plugin for Claude Code
21+
22+
A comprehensive AI assistant skill for [Apache Hamilton](https://github.com/apache/hamilton) development, designed to help you build, debug, and optimize Apache Hamilton DAGs using Claude Code.
23+
24+
## What is This?
25+
26+
This is a [Claude Code plugin](https://code.claude.com/docs/en/plugins.md) that provides expert assistance for Apache Hamilton development. When active, Claude Code understands Apache Hamilton's patterns, best practices, and can help you:
27+
28+
- 🏗️ **Create new Apache Hamilton modules** with proper patterns and decorators
29+
- 🔍 **Understand existing DAGs** by explaining dataflow and dependencies
30+
- 🎨 **Apply function modifiers** correctly (@parameterize, @config.when, @check_output, etc.)
31+
- 🐛 **Debug issues** in DAG definitions and execution
32+
- 🔄 **Convert Python scripts** to Apache Hamilton modules
33+
-**Optimize pipelines** with caching, parallelization, and best practices
34+
-**Write tests** for Apache Hamilton functions
35+
- 📊 **Generate visualizations** of your DAGs
36+
37+
## Installation
38+
39+
### Option 1: Install via Plugin System (Recommended for Users)
40+
41+
```bash
42+
# Add the Hamilton plugin marketplace
43+
/plugin marketplace add apache/hamilton
44+
45+
# Install the plugin
46+
/plugin install hamilton --scope user
47+
```
48+
49+
Or in one command:
50+
```bash
51+
claude plugin install hamilton@apache/hamilton --scope user
52+
```
53+
54+
**Installation scopes:**
55+
- `--scope user` - Available in all your projects (recommended)
56+
- `--scope project` - Only in current project
57+
- `--scope local` - Testing/development only
58+
59+
### Option 2: For Apache Hamilton Contributors
60+
61+
If you've cloned the Apache Hamilton repository, the skill is already available at `.claude/plugins/hamilton/skills/hamilton/` and will be automatically discovered by Claude Code. No installation needed!
62+
63+
### Option 3: Manual Installation
64+
65+
Copy the skill to your personal or project skills directory:
66+
67+
```bash
68+
# Personal (available everywhere)
69+
cp -r .claude/plugins/hamilton/skills/hamilton ~/.claude/skills/
70+
71+
# Project-specific
72+
cp -r .claude/plugins/hamilton/skills/hamilton /path/to/your/project/.claude/skills/
73+
```
74+
75+
## Usage
76+
77+
### Automatic Invocation
78+
79+
Claude Code will automatically use this skill when it detects you're working with Apache Hamilton code. Just ask questions or give instructions naturally:
80+
81+
```
82+
"Help me create an Apache Hamilton module for processing customer data"
83+
"Explain what this DAG does"
84+
"Convert this pandas script to Apache Hamilton"
85+
"Add caching to my expensive computation function"
86+
"Why am I getting a circular dependency error?"
87+
```
88+
89+
### Manual Invocation
90+
91+
You can explicitly invoke the skill using the `/hamilton` command:
92+
93+
```
94+
/hamilton create a feature engineering module with rolling averages
95+
/hamilton explain the dataflow in my_functions.py
96+
/hamilton optimize this DAG for parallel execution
97+
```
98+
99+
## What the Skill Knows
100+
101+
This skill has deep knowledge of:
102+
103+
- **Core Apache Hamilton concepts**: Drivers, DAGs, nodes, function-based definitions
104+
- **Function modifiers**: All decorators (@parameterize, @config.when, @extract_columns, @check_output, @save_to, @load_from, @cache, @pipe, @does, @mutate, @step, etc.)
105+
- **Execution patterns**: Sequential, parallel, distributed (Ray, Dask, Spark)
106+
- **Data quality**: Validation, schema checking, data quality pipelines
107+
- **I/O patterns**: Materialization, data loaders, result adapters
108+
- **Integration patterns**: Airflow, Streamlit, FastAPI, Jupyter
109+
- **LLM workflows**: RAG pipelines, document processing, embeddings
110+
- **Testing strategies**: Unit testing functions, integration testing DAGs
111+
- **Debugging techniques**: Circular dependencies, visualization, lineage tracing
112+
113+
## Examples
114+
115+
### Creating a New Apache Hamilton Module
116+
117+
```
118+
"Create an Apache Hamilton module that loads data from a CSV, cleans it by removing
119+
nulls, calculates a 7-day rolling average of the 'sales' column, and outputs
120+
the top 10 days by sales."
121+
```
122+
123+
Claude will generate:
124+
- Properly structured functions with type hints
125+
- Correct dependency declarations via parameters
126+
- Appropriate docstrings
127+
- Driver setup code
128+
- Suggestions for visualization
129+
130+
### Converting Existing Code
131+
132+
```
133+
"Convert this script to Apache Hamilton:
134+
135+
import pandas as pd
136+
df = pd.read_csv('data.csv')
137+
df['feature'] = df['col_a'] * 2 + df['col_b']
138+
result = df.groupby('category')['feature'].mean()
139+
"
140+
```
141+
142+
Claude will refactor it into a clean Apache Hamilton module with separate functions for each transformation step.
143+
144+
### Applying Decorators
145+
146+
```
147+
"I need to create rolling averages for 7, 30, and 90 day windows.
148+
How do I do this in Apache Hamilton without repeating code?"
149+
```
150+
151+
Claude will show you how to use `@parameterize` to create multiple nodes from a single function.
152+
153+
### Debugging
154+
155+
```
156+
"I'm getting an error: 'Could not find parameter 'processed_data' in graph'.
157+
What's wrong?"
158+
```
159+
160+
Claude will help identify the issue (likely a typo or missing function definition) and suggest fixes.
161+
162+
## Skill Features
163+
164+
### Allowed Tools
165+
166+
This skill is configured with permissions to:
167+
- Read files (`Read`, `Grep`, `Glob`)
168+
- Run Python code (`Bash(python:*)`)
169+
- Search for files (`Bash(find:*)`)
170+
- Run tests (`Bash(pytest:*)`)
171+
172+
These tools are automatically permitted when the skill is active, streamlining the workflow.
173+
174+
### Reference Materials
175+
176+
The skill includes additional reference files:
177+
178+
- **[examples.md](skills/hamilton/examples.md)** - Comprehensive code examples for common patterns
179+
- Basic DAG creation
180+
- Advanced function modifiers
181+
- LLM & RAG workflows
182+
- Feature engineering patterns
183+
- Data quality validation
184+
- Parallel execution
185+
- Integration patterns (Airflow, FastAPI, Streamlit)
186+
187+
## Requirements
188+
189+
- **Claude Code CLI** - Install from https://code.claude.com
190+
- **Apache Hamilton** - The skill works with any version, but references Hamilton 1.x+ patterns
191+
- **Python 3.9+** - For running generated Apache Hamilton code
192+
193+
## Contributing
194+
195+
This plugin is open source and part of the Apache Hamilton project! We welcome contributions:
196+
197+
### Found a Bug?
198+
199+
Please [file an issue](https://github.com/apache/hamilton/issues/new) on GitHub with:
200+
- A clear description of the problem
201+
- Steps to reproduce
202+
- Expected vs actual behavior
203+
- Your Hamilton and Claude Code versions
204+
205+
### Want to Improve It?
206+
207+
Even better - submit a pull request!
208+
209+
1. **Fork the repository**: https://github.com/apache/hamilton
210+
2. **Make your changes**: Edit files in `.claude/plugins/hamilton/skills/hamilton/`
211+
3. **Test thoroughly**: Try the skill with various Apache Hamilton scenarios
212+
4. **Submit a PR**: Include a clear description of your improvements
213+
214+
**Types of contributions we love:**
215+
- 📚 Add new examples to `examples.md`
216+
- 📝 Improve instructions in `SKILL.md`
217+
- 🐛 Fix bugs or inaccuracies
218+
- ✨ Add support for new Apache Hamilton features
219+
- 📖 Enhance documentation
220+
221+
See [CONTRIBUTING.md](../../../CONTRIBUTING.md) in the Apache Hamilton repo for detailed guidelines.
222+
223+
## Philosophy
224+
225+
This skill follows Apache Hamilton's core philosophy:
226+
227+
- **Declarative over imperative**: Guide users toward function-based definitions
228+
- **Separation of concerns**: Keep definition, execution, and observation separate
229+
- **Reusability**: Encourage patterns that make code testable and portable
230+
- **Simplicity**: Prefer simple solutions over over-engineering
231+
232+
## Changelog
233+
234+
### v1.0.0 (2025-01-31)
235+
- Initial release
236+
- Comprehensive Apache Hamilton DAG creation assistance
237+
- Support for all major function modifiers
238+
- LLM/RAG workflow patterns
239+
- Feature engineering examples
240+
- Data quality validation patterns
241+
- Integration examples (Airflow, FastAPI, Streamlit)
242+
243+
## Learn More
244+
245+
- **Apache Hamilton Documentation**: https://hamilton.apache.org
246+
- **GitHub Repository**: https://github.com/apache/hamilton
247+
- **Apache Hamilton Examples**: See `examples/` directory in the repo (60+ production examples)
248+
- **DAGWorks Blog**: https://blog.dagworks.io
249+
- **Community Slack**: Join via Apache Hamilton GitHub repo
250+
251+
## License
252+
253+
This plugin is part of the Apache Hamilton project and is licensed under the Apache 2.0 License.
254+
255+
---
256+
257+
**Happy Apache Hamilton coding with Claude! 🚀**

0 commit comments

Comments
 (0)