Invariants

Find the rules your app assumes but never enforces.

By

Raphael Salaja

Price

Free

Invariants is an agent skill by Raphael Salaja that reads an app for rules its code relies on but never writes down. It finds flags that only make sense together and assumptions nothing checks, then returns one numbered report.

What it does

  • Groups booleans and status values that are written or read together, and counts the combinations they allow.
  • Lists each impossible state with the line that can produce it.
  • Suggests collapsing each group into one status or reducer with a single writer.
  • Searches for risky shapes like non-null assertions, casts, blind [0] reads and defaults that hide gaps.
  • Names where each rule should be enforced, such as a type or a schema parse at the fetch, then waits for you to pick fixes.

When to use it

Use it when UI state feels fragile, before a refactor, or after a bug that came from two flags disagreeing.

How to get it

The skill is free on GitHub under the MIT license, in Raphael Salaja's skills repo. Install the set with npx skills add raphaelsalaja/skills. You call it by name, as /invariants; your agent won't load it on its own.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.

Invariants

Find the rules your app assumes but never enforces.

By

Raphael Salaja

Price

Free

Invariants is an agent skill by Raphael Salaja that reads an app for rules its code relies on but never writes down. It finds flags that only make sense together and assumptions nothing checks, then returns one numbered report.

What it does

  • Groups booleans and status values that are written or read together, and counts the combinations they allow.
  • Lists each impossible state with the line that can produce it.
  • Suggests collapsing each group into one status or reducer with a single writer.
  • Searches for risky shapes like non-null assertions, casts, blind [0] reads and defaults that hide gaps.
  • Names where each rule should be enforced, such as a type or a schema parse at the fetch, then waits for you to pick fixes.

When to use it

Use it when UI state feels fragile, before a refactor, or after a bug that came from two flags disagreeing.

How to get it

The skill is free on GitHub under the MIT license, in Raphael Salaja's skills repo. Install the set with npx skills add raphaelsalaja/skills. You call it by name, as /invariants; your agent won't load it on its own.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.

Invariants

Find the rules your app assumes but never enforces.

By

Raphael Salaja

Price

Free

Invariants is an agent skill by Raphael Salaja that reads an app for rules its code relies on but never writes down. It finds flags that only make sense together and assumptions nothing checks, then returns one numbered report.

What it does

  • Groups booleans and status values that are written or read together, and counts the combinations they allow.
  • Lists each impossible state with the line that can produce it.
  • Suggests collapsing each group into one status or reducer with a single writer.
  • Searches for risky shapes like non-null assertions, casts, blind [0] reads and defaults that hide gaps.
  • Names where each rule should be enforced, such as a type or a schema parse at the fetch, then waits for you to pick fixes.

When to use it

Use it when UI state feels fragile, before a refactor, or after a bug that came from two flags disagreeing.

How to get it

The skill is free on GitHub under the MIT license, in Raphael Salaja's skills repo. Install the set with npx skills add raphaelsalaja/skills. You call it by name, as /invariants; your agent won't load it on its own.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.