Get the FREE Ultimate OpenClaw Setup Guide →

compone

Scanned
npx machina-cli add skill kissgyorgy/coding-agents/compone --openclaw
Files (1)
SKILL.md
1.8 KB

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

  1. Type all props: Use type hints for better IDE support and static type checking
  2. Single responsibility: Keep components focused on one concern
  3. Composition over complexity: Build complex UIs from simple components
  4. Descriptive names: Use clear component and prop names
  5. Default values: Provide sensible defaults for optional props
  6. Framework agnostic: Don't tie components to specific web frameworks

Official Documentation

Source

git clone https://github.com/kissgyorgy/coding-agents/blob/master/skills/compone/SKILL.mdView on GitHub

Overview

Compone is a Python framework for building type-safe, reusable components that generate HTML, XML, and RSS markup. It brings React-like patterns to Python, enabling developers to build framework-agnostic component libraries and colocate markup with logic.

How This Skill Works

Developers define components with typed props, nest child components, and render to markup in Python. Compone enforces type safety and uses a component tree approach to produce structured output that can work across frameworks.

When to Use It

  • 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

Quick Start

  1. Step 1: Install compone and review core-concepts.md to learn the basic component model.
  2. Step 2: Define a simple Component with typed props and a basic render output.
  3. Step 3: Compose components and render to HTML/XML/RSS in Python, then reuse across projects.

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

Example Use Cases

  • Build a framework-agnostic UI library of reusable components for multiple Python apps
  • Generate type-safe HTML dashboards directly in Python without templates
  • Co-locate markup with business logic in modular components
  • Produce XML or RSS feeds from content pipelines using components
  • Create a set of reusable UI patterns across projects for consistency

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers