extension-renderinglisted
Install: claude install-skill systempromptio/systemprompt-template
# Extension: Rendering
Rendering traits control how pages are composed, how templates are provided, how template context is extended, and how static pages are pre-generated. All traits live in `crates/shared/provider-contracts/src/`.
---
## 1. ComponentRenderer
Renders reusable UI components (header, footer, sidebar, partials) into page templates.
### Trait
```rust
#[async_trait]
pub trait ComponentRenderer: Send + Sync {
fn component_id(&self) -> &str;
fn applies_to(&self) -> Vec<String>;
fn partial_template(&self) -> Option<PartialTemplate>;
async fn render(&self, ctx: &dyn ComponentRenderContext) -> Result<RenderedComponent>;
}
```
### Existing Components
| Component | Renderer | Pages |
|-----------|----------|-------|
| Head assets | `HeadAssetsPartialRenderer` | All |
| Header | `HeaderPartialRenderer` | All |
| Footer | `FooterPartialRenderer` | All |
| Scripts | `ScriptsPartialRenderer` | All |
| CLI animation | `CliRemoteAnimationPartialRenderer` | Homepage |
### Registration
```rust
impl Extension for MyExtension {
fn component_renderers(&self) -> Vec<Arc<dyn ComponentRenderer>> {
vec![Arc::new(MyComponent)]
}
}
```
---
## 2. TemplateProvider
Supplies page templates (embedded or file-based) for rendering.
### Trait
```rust
pub trait TemplateProvider: Send + Sync {
fn templates(&self) -> Vec<TemplateDefinition>;
fn provider_id(&self) -> &'static str;
fn priority(&self) -> u32;
}
```
### Priority System
| Pr