skills/headless-architecture/SKILL.md
Use this skill to refactor, design, or review application architecture. Trigger it when discussing clean architecture, separating business logic from UI, or cross-platform/WASM development. This skill enforces the 'Headless Core & Passive View' pattern, it proactively refactors logic out of the UI, creates platform-agnostic Core interfaces, and ensures the View is a 'Humble Object' that only reflects state.
npx skillsauth add jpc0/skills headless-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill implements a strict separation between the Application (Business Logic, State, Rules) and the Presentation (UI, Inputs, Rendering).
SubmitForm { data }).DashboardState { graphs: [...] }).Detailed code examples and pattern implementations are found in references/patterns.md.
validate(draft) -> returns Errors.validate(), and displays errors from the Core state.When generating code or designing systems:
/core for logic, /ui for presentation, and /shared or /bridge for interfaces).if user.is_admin), refuse and move it to the Core, exposing a property in the ViewModel instead.development
Apply formal verification methods (Hoare Logic, wp calculus, Design-by-Contract) to ensure software correctness. Use this skill whenever writing new functions, implementing algorithms, modifying existing logic, or performing code reviews. Trigger when asked to "prove correctness", "verify code", "check invariants", "mathematical proof of code", or "ensure the algorithm is correct".
testing
Define module boundaries, structure infrastructure layers, implement dependency inversion, and create sociable unit tests using MIM (Module-Infrastructure-Module) architecture and modular design principles. Use this skill when the user mentions "MIM", "Module-Infrastructure-Module", "Screaming Architecture", or asks for advice on modular design, high cohesion, low coupling, or sociable unit testing.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.