| name | compone |
| description | Builds Python components using the compone framework for type-safe HTML/XML/RSS generation. Use when working with compone, creating Python components, generating markup in Python, or building framework-agnostic component libraries. |
| allowed-tools | Read, Write, Edit, Grep, Glob, Bash, WebFetch |
Compone - Python Component Framework
Helps developers create type-safe, reusable components using compone, a modern
Python framework for generating markup (HTML, XML, RSS) with React-like patterns.
ALWAYS read core-concepts.md for basic usage.
When to Use Compone
- Building framework-agnostic component libraries
- Type-safe HTML generation in Python
- Colocating markup with Python logic
- Generating XML, RSS, or other markup formats
- Creating reusable UI patterns across projects
- Teams preferring Python over template languages
Best Practices
- Type all props: Use type hints for better IDE support and static type checking
- Single responsibility: Keep components focused on one concern
- Composition over complexity: Build complex UIs from simple components
- Descriptive names: Use clear component and prop names
- Default values: Provide sensible defaults for optional props
- Framework agnostic: Don't tie components to specific web frameworks
Official Documentation