Optimize a Model
The /semantic-model-optimizer agent skill closes the loop in the model lifecycle. It reads a live Semantius module and writes a *-semantic-model.md file that is byte-compatible with the format the Business Analyst produces and the Deployer consumes. From there you can audit it, refine it, and ship the corrected version back.
Optimize a Live Module
Point the skill at a module by its slug, or let it list everything that is live and pick:
/semantic-model-optimizer extract the crm module /semantic-model-optimizer snapshot the helpdesk module to a markdown spec /semantic-model-optimizer the live hris has drifted, regenerate the spec and suggest optimizations Why You Need It
Once a platform is live, people customize it: a teammate adds a field in the Semantius UI, an admin renames a label, an integration introduces a new enum value. The original markdown spec quietly drifts away from reality. The optimizer reads what is actually live and produces a fresh spec that reflects it, so the rest of the toolchain stays in sync.
How It Works
- Pick a module. Name one directly or browse the list.
- Read the live state. The skill pulls the module’s entities, fields, descriptions, label columns, audit-log settings, and enum values via the Semantius CLI.
- Pull in related tables. Any table referenced from the module (other modules, built-ins like
users) is included so the resulting model is self-contained. - Write the markdown. The skill produces the file with the right front-matter, a regenerated Mermaid entity-relationship diagram, an enumerations section, and implementation notes that flag external entities for the deployer.
The skill is read-only against Semantius: it never writes to the platform.
Audit and Redeploy
Once the file is saved, you can opt in to an audit pass that flags missing label columns, FK-as-label-column traps, singular table_name violations, missing descriptions, and other drift artifacts. Apply the fixes to the markdown, and the Deployer can roll the corrected shape back to Semantius, completing the loop. If you want to expand the model further before redeploying, point the Business Analyst at the optimized file in customize or extend mode.
Get the Skill
Install the Semantius CLI and the agent skills bundle to add this skill to your agent.