universalist
Use when code smells point to a structural refactor that should ship: flag or state matrices, repeated boundary validation, shared-key agreement checks, branchy policy logic, or syntax mixed with execution. Default to one seam, one smallest honest construction, adapter-first staging, and one proof signal.
Best use case
universalist is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when code smells point to a structural refactor that should ship: flag or state matrices, repeated boundary validation, shared-key agreement checks, branchy policy logic, or syntax mixed with execution. Default to one seam, one smallest honest construction, adapter-first staging, and one proof signal.
Teams using universalist 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/universalist/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How universalist Compares
| Feature / Agent | universalist | 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?
Use when code smells point to a structural refactor that should ship: flag or state matrices, repeated boundary validation, shared-key agreement checks, branchy policy logic, or syntax mixed with execution. Default to one seam, one smallest honest construction, adapter-first staging, and one proof signal.
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
# Universalist Use this skill when the highest leverage comes from changing the *shape of truth* in a codebase, not from adding another ordinary feature branch. This is an **inner lens** for choosing the right structural move. It is not a generic implementation skill. Use it to decide and stage the structure, then let the repo's normal implementation flow carry the change. ## Do not trigger for - Routine feature work with no structural smell - Pure performance tuning, infra, UI polish, or docs work - Broad rewrites with no stable seam - Cases where the domain rules are still too unstable to freeze into a stronger model ## Quick start: pick a track ### Track A — Diagnosis only Use when the user wants analysis, design review, refactor advice, or a structural reading of the current code. Deliver: - observed signal - chosen construction - why nearby alternatives are worse - first seam to attack - proof signal - compatibility notes ### Track B — One-seam refactor Use when the user wants code changes, but the right move is narrow and reviewable. Deliver: - one seam only - smallest honest construction - adapter-first staging when a public boundary exists - fastest credible proof signal - explicit stop point after the first verified seam ### Track C — Staged migration Use when the internal model should improve while API, JSON, DB row, or message shapes stay stable for now. Deliver: - boundary decoder or adapter - internal stronger model - parity or differential tests - migration notes - clear cut line between legacy shape and internal shape ## Non-negotiables - One signal, one seam, one smallest honest construction - Prefer products, coproducts, refined types, pullbacks, exponentials, and free constructions before advanced machinery - Keep wire and storage shapes stable behind adapters unless the user explicitly wants a breaking change - Use the repo's current language, framework, and test stack before proposing new libraries - Say what remains runtime-only in dynamic or weakly typed environments - Stop after the first verified seam unless the user asked for a sweep ## Step 0 — Create or update `.universalist-plan.md` This file is the progress record for the current run. Create it in the project root for Track B or Track C. Use `scripts/init_universalist_plan.sh` if helpful. Minimum fields: ```md # Universalist Plan ## Track: ## Signal: ## Construction: ## Why this construction: ## Seam / files: ## Public boundaries touched: ## Wire/storage compatibility plan: ## Verification command(s): ## Runtime-only leftovers: ## Status: planned / editing / verified / staged ## Next seam: ``` If context compacts, read this file first and resume from its status line. ## Operator loop 1. **Inspect repo reality** - language and type features - framework conventions - serializer, ORM, and API boundaries - current test runner and proof tools 2. **Find candidate signals** Start from code smells and pressure, not category labels: - flag, enum string, boolean, or nullable field matrices - the same predicate enforced in several places - repeated shared-id or shared-version agreement checks - branchy policy logic that really wants supplied behavior - syntax mixed with execution, logging, or explanation 3. **Pick one seam** Choose the smallest stable seam where the stronger shape can land with low blast radius. Good first seams: - DTO -> domain conversion - controller or handler boundary - constructor or factory - one central service or evaluator - one join helper or aggregate constructor 4. **Choose the smallest honest construction** - independent fields -> product - exclusive states -> coproduct - repeated stable predicate -> refined type / equalizer - shared projection agreement -> pullback witness - configurable behavior -> exponential - syntax separate from execution -> free construction / initial algebra 5. **Plan the boundary** Decide whether the seam can change in place or whether it needs: - decoder - adapter - DTO / row mapping - persistence converter - legacy-to-new translation layer 6. **Encode idiomatically** Use the strongest encoding the repo can actually support: - native ADT - sealed hierarchy / enum with payload - interface + tag - checked constructor or wrapper - witness type - closure or strategy - AST + interpreters 7. **Verify with the fastest credible proof signal** Prefer: - compile or typecheck - targeted unit tests - exhaustive handling checks - constructor-only entry - decode / encode round-trip - mismatch rejection - parity or differential tests during migration 8. **Stop or name the next seam** Do not turn one structural insight into a repo-wide rewrite. Verify one seam, record it, and stop unless the user asked for a broader sweep. 9. **Update `.universalist-plan.md`** Record: - what changed - which boundary stayed stable - which proof passed - what still remains runtime-only - next seam, if any ## Practical decision guide | Repo smell | Default construction | Nearby alternative to reject first | First seam | Proof signal | | --- | --- | --- | --- | --- | | `status`, booleans, and nullable fields describe one lifecycle | Coproduct | Product with optional fields | Decoder + core state type | exhaustive handling + invalid legacy fixture tests | | Same input predicate repeated at controllers, services, serializers | Refined type / equalizer | Keep raw primitive plus helper validation | Parse / constructor boundary | accept valid, reject invalid, normalization idempotence | | `customer.accountId != subscription.accountId` appears in several places | Pullback witness | Plain pair + scattered assertions | checked constructor | mismatch rejection + preserved projections | | Large branch decides pricing, rendering, or policy | Exponential | Bigger state machine | function / strategy seam | fixture parity against old branch | | Rule syntax mixed with execute / explain / log | Free construction | More conditionals inside existing class | AST + one interpreter | interpreter consistency + differential tests | | Several fields always travel together and are consumed independently | Product | Coproduct | record / struct / object | constructor and projection consistency | ## Output contract For any non-trivial response, produce these headings in order: 1. **Track** 2. **Signal** 3. **Construction** 4. **Why this instead of nearby alternatives** 5. **Seam / files** 6. **Boundary and compatibility plan** 7. **Before -> After** 8. **Verification** 9. **Runtime-only leftovers** 10. **Next seam** (optional) For Track B or Track C, also update `.universalist-plan.md`. ## Guardrails - Prefer plain engineering language over category jargon when both say the same thing - Do not claim a universal construction without naming the constructor, eliminator, or factorization behavior it buys - Do not recommend HKT-heavy or typeclass-heavy patterns where the language cannot carry them cleanly - Do not propose new validation or property-test libraries without user approval - Do not widen the seam just because the larger design looks elegant - Call out persistence, serialization, and public API breakage explicitly - Say when a validator is only runtime protection ## Hand-offs and companion skills - Use **`invariant-ace`** when the main job is discovering or pinning down invariants before choosing structure - Use **`accretive-implementer`** after the construction is chosen and the task becomes ordinary implementation - Use **`repeatedly-apply-skill`** when sweeping the repo for multiple seams or doing a multi-pass campaign ## References - `references/universalist-overview.md` - `references/discovery-signals.md` - `references/language-encoding-matrix.md` - `references/framework-boundaries.md` - `references/cost-model-and-false-positives.md` - `references/structures-and-laws.md` - `references/testing-playbook.md` - `references/migration-playbooks.md` - `references/case-studies.md` - `references/examples-haskell.md` - `references/examples-go.md` - `references/examples-typescript.md` - `references/examples-python.md` - `references/examples-java-kotlin.md` - `references/examples-rust-swift.md` - `references/sources.md` ## Scripts - `scripts/init_universalist_plan.sh` - `scripts/detect_signals.py` - `scripts/emit_scaffold.py` - `scripts/emit_boundary_adapter.py` - `scripts/emit_verification_plan.py` - `scripts/emit_law_test_stub.sh` ## Templates - `templates/universalist-plan.md` - `templates/universalist-report.md`
Related Skills
zig
Use when implementing, reviewing, migrating, linting, testing, fuzzing, profiling, optimizing, or hardening Zig 0.16.0 code: .zig files, build.zig/build.zig.zon, std.Io/process.Init migration, C interop, expert comptime/metaprogramming/reflection/codegen, allocator ownership, FFI boundaries, concurrency, dependencies, and measured performance work.
verification-closure
Use this skill to decide whether the current artifact set is actually ready by consuming a canonical Closure Handoff Packet, running the narrowest decisive checks, and assigning a grounded readiness state. Trigger for requests like verify this patch is ready, run closure gates, decide if the branch reached a material fixed point, or close the loop on the current artifact state. Do not trigger for broad redesign or de novo code review without a closure question.
ux-audit
Systematic UX evaluation using Nielsen heuristics and accessibility checks. Use when reviewing UI, "is this usable", improving user experience, or pre-launch.
synesthesia
Cross-modal diagnostic and review workflow for software systems. Use this skill to understand, explain, compare, critique, debug, profile, review, or refactor code by mapping technical signals into sensory models, then translating those models back into precise engineering language. Best fits include architecture review, readability or maintainability assessment, strange or flaky behavior, performance bottlenecks, API or UX critique, onboarding explanations, and comparing implementations or designs by feel, friction, weight, rhythm, sharpness, smoothness, coupling, or complexity. Also use when prompts ask what a codebase, bug, logs, API, or system feels, sounds, or looks like, or ask to make it lighter, smoother, cleaner, tighter, quieter, or more coherent. Do not use for exact API syntax, compliance or legal interpretation, security sign-off, rote code edits, or terse factual tasks.
st
Manage persistent task plans in `.step/st-plan.jsonl`, with an explicit first-use choice between repo-committed storage and local-only ignore via `.git/info/exclude`, so state survives turns/sessions and can stay reviewable in git when desired. Use when users ask to "use $st", "resume the plan", "export/import plan state", "checkpoint milestones", "track dependencies/blocked work", "show ready next tasks", "keep shared TODO status on disk", "store backlog tasks on disk without loading them into `update_plan` yet", "select which durable tasks enter the mirrored plan", "map a `$select` plan into durable execution state", "prove `$st` works for implementation tracking", mirror the durable plan into Codex `update_plan` or OpenCode `TodoWrite`, or diagnose/repair `st-plan.jsonl` concerns (for example append-only vs mutable semantics, lock-file ignore policy, or seq/checkpoint integrity).
simplify-and-refactor-code-isomorphically
Shrink and unify code without changing behavior. Use when: simplify, refactor, reduce duplication, remove lines, extract helper, reuse component, DRY, collapse, better abstraction.
ship
Finalize work after validation: confirm a signal, capture proof in the PR description, and open a PR (no merge). Use when asked to run `$ship`, ship/finalize a branch, prepare or open a PR without merging, or publish validation proof before handoff.
seq
Mine Codex sessions JSONL (`~/.codex/sessions`) and file-based memories (`~/.codex/memories`) for explicit `$seq` and artifact-forensics questions, preferring `artifact-search`, then specialized follow-ups such as `skill-blocks`, `plan-search`, `session-prompts`, `session-tooling`, and `orchestration-concurrency`, then `query-diagnose`, and generic `query` only when needed. Opencode mining is explicit-only and requires a literal `opencode` cue in the request.
review-adjudication
Discriminately adjudicate PR review comments before implementation. Treat each comment as a claim to test, build the strongest no-change countercase, recover PR rationale with explicit `$seq` when needed, and decide what to act on, rebut, defer, or investigate. Trigger for `$review-adjudication`, review the review, adjudicate PR comments, are these comments relevant, which comments matter, or should we act on these comments. Not for implementing fixes, writing rebuttals only, or final merge closure.
refine
Refine an existing Codex skill in place with minimal diffs, then validate with quick_validate. Trigger when asked to improve a skill's trigger description/frontmatter, workflow text, metadata, scripts/references/assets, or agents/openai.yaml; also for requests to iterate, refactor, rename, or fix a skill using usage/session-mining evidence (for example from $seq).
reduce
Deconstruct high-cost abstractions and recommend lower-level primitives that reduce tooling, indirection, and hidden steps. Use when requests ask for fewer layers (for example "too many layers", "remove this framework/plugin/DI", "ditch codegen/task runners", "replace with plain scripts/config/SQL"), or when prompts say "it feels over-engineered", "start simpler", or "reduce the size of the codebase" (analysis-only unless implementation is explicitly requested).
prove-it
Autonomous multi-turn proof/disproof gauntlet for absolute claims. Default Auto Gauntlet runs exactly one numbered round per assistant turn and auto-continues the same conversation until a terminal proof/disproof certificate or round 10 Oracle synthesis.