orcaflex-model-generator-builder-registry-pattern
Sub-skill of orcaflex-model-generator: Builder Registry Pattern (+3).
Best use case
orcaflex-model-generator-builder-registry-pattern is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of orcaflex-model-generator: Builder Registry Pattern (+3).
Teams using orcaflex-model-generator-builder-registry-pattern should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/builder-registry-pattern/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How orcaflex-model-generator-builder-registry-pattern Compares
| Feature / Agent | orcaflex-model-generator-builder-registry-pattern | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of orcaflex-model-generator: Builder Registry Pattern (+3).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Builder Registry Pattern (+3)
## Builder Registry Pattern
```python
@BuilderRegistry.register("03_environment.yml", order=30)
class EnvironmentBuilder(BaseBuilder):
def should_generate(self) -> bool:
return True # Always needed
def build(self) -> dict[str, Any]:
return {"Environment": {...}}
```
Builders self-register via the `@register` decorator. The orchestrator iterates them in order without maintaining a hardcoded list.
## Core Classes
| Class | Location | Purpose |
|-------|----------|---------|
| `ModularModelGenerator` | `__init__.py` | Orchestrator: loads spec, runs builders, writes output |
| `BuilderRegistry` | `builders/registry.py` | Auto-discovery registry with ordered execution |
| `BaseBuilder` | `builders/base.py` | ABC with `build()`, `should_generate()`, entity sharing |
| `BuilderContext` | `builders/context.py` | Typed dataclass for cross-builder data sharing |
| `ProjectInputSpec` | `schema/root.py` | Pydantic root model (metadata + environment + simulation + generic/pipeline/riser) |
## Builder Execution Flow
```
1. ModularModelGenerator.generate(output_dir)
2. for (filename, builder_class) in BuilderRegistry.get_ordered_builders():
3. builder = builder_class(spec, context)
4. if not builder.should_generate(): continue
5. data = builder.build()
6. context.update_from_dict(builder.get_generated_entities())
7. yaml.dump(data, includes_dir / filename)
8. write master.yml with include directives
```
## Cross-Builder Entity Sharing
Builders register entities via `_register_entity(key, value)` for downstream builders:
```python
# VesselBuilder registers vessel name
self._register_entity("main_vessel_name", vessel.name)
# LinesBuilder reads it from context
vessel_name = self.context.main_vessel_name
```Related Skills
interactive-report-generator
Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.
OrcaFlex Specialist Skill
```yaml
orcaflex-reporting-fixture-proof-pattern
Build and extend fixture-backed OrcaFlex reporting proof paths in digitalmodel using stable metadata baselines, normalized HTML snapshots, and reusable reporting test helpers.
digitalmodel-worktree-test-execution-with-shared-venv
Run digitalmodel tests from isolated worktrees without uv editable-dependency failures by using the main repo's existing virtualenv and PYTHONPATH.
digitalmodel-orcawave-orcaflex-proof-workflows
Class-level digitalmodel OrcaWave/OrcaFlex readiness, semantic-proof, fixture-proof, and closeout workflows.
digitalmodel-code-explorer
Fast orientation guide for the digitalmodel codebase, with module lookup, source-to-test mapping, and targeted inspection patterns to avoid repeated bulk-reading of digitalmodel/src and tests.
orcawave-orcaflex-readiness-audit
Audit the real readiness of digitalmodel OrcaWave/OrcaFlex spec-driven workflows by reconciling workspace-hub issues, source/tests, semantic-equivalence boundaries, and wiki synthesis gaps.
taxact-browser-automation-patterns
Patterns for automating TaxAct Business online (Ionic SPA) via Chrome browser MCP tools — field interaction, navigation, shadow DOM handling
portable-pattern-verification-workflow
Multi-package implementation with verification strategy for cross-platform configuration hardening
portable-config-baseline-pattern
Extract machine-agnostic settings into portable template files while keeping machine-specific hooks and plugins separate
portable-baseline-pattern-implementation
Implement portable configuration baselines by separating machine-agnostic settings from machine-specific hooks and plugins
portable-baseline-pattern-extraction
Extract and separate portable baseline config from machine-specific overrides in multi-environment projects