/otter:logic-reviewfrom otter
Reviews existing components, services, and stores for misplaced logic — presenter leaks, componentType mismatches, and wrong store variants.
Ships in otter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Assess code that already exists against the same trees the design side uses, so a review can never contradict a design recommendation.
To decide where something new should go, use logic-placement.
Read in this order, and read the tree before judging its dimension — do not judge from memory.
| # | Look at | Read | Judge |
|---|---|---|---|
| 1 | Component classes, decorators, templates | logic-component-shape | is the split, or its absence, justified; does componentType match the role |
| 2 | What each class injects and holds | logic-state-layer | is the layer the shallowest one that works; are API calls in the right place |
| 3 | Store files, if any | logic-store-type | does the variant match the data |
Rules for the whole pass:
logic-placement.The test: can the presenter be rendered from a spec by supplying inputs only? If it needs a store or an HTTP mock, logic has leaked.
Follow the injections one level deeper than the imports. A presenter that injects no store and calls no HTTP client can still reach both through a service, which hides the dependency without removing it.
FOR each service a presenter injects:
does it select from the store, call an API, or trigger a side effect
beyond the component?
yes -> FINDING: the dependency belongs in the container
no -> allowed, if it is a presentation helper such as formatting or breakpoints
A mismatch between @O3rComponent({ componentType }) and what the class does is a reliable signal that logic sits in the wrong place.
Either the type or the logic must move — decide which from the responsibility table in logic-component-shape.
| Symptom | Reading |
|---|---|
Page or Block that injects nothing and only holds display state | it is really a presenter |
Component or ExposedComponent that dispatches store actions | it is really a container |
-pres suffix on a class that fetches its own data | the suffix or the fetch is wrong |
| Symptom | Why it is wrong | Fix |
|---|---|---|
Presenter injecting Store, dispatching, or fetching — including indirectly through a service that does | the presenter can no longer be rendered from inputs, so it cannot be reused or CMS-replaced | move the dependency to the container, pass the result down as an input |
Container with a .scss file, or doing display formatting | display concerns on the data side of the seam, so the presenter is no longer swappable | move styling and formatting into the presenter |
| Container that only forwards its inputs | indirection with no seam to absorb variation | collapse it back into a single component |
| Business logic in template bindings | components run ChangeDetectionStrategy.OnPush; the expression re-evaluates and the intent is untestable | derive in computed(), or in the container |
componentType disagreeing with the class's role | CMS metadata extraction reflects the wrong shape | see the componentType check above |
| Naming drift between file, class, selector, template, and spec | the -cont / -pres convention is what makes the roles legible | realign all five, or regenerate |
| Symptom | Why it is wrong | Fix |
|---|---|---|
| A store created to pass data between two components | six files and a serializer for a guarantee nobody needed | a service — see the shared-or-stateless step in logic-state-layer |
| API call inside a reducer | reducers must be pure; the call is untestable and re-runs on replay | move it into an effect |
.subscribe() in a container followed by a dispatch | the subscription is unmanaged and the sequencing is implicit | move it into an effect |
Hand-rolled isLoading or hasError beside an async store | duplicates AsyncStoreItem, and the copies drift | read the status off the state |
| Simple store holding records updated one at a time | no per-item status, and updates rewrite the whole model | entity store. An array of primitives is fine in a simple store |
| Sync store whose data actually comes from an API | no pending, failure, or cancellation handling exists to hook into | async variant |
| Root service holding state that should die with the screen | a root singleton outlives the screen, which is a store-like property | move to the container's providers: [] |
| Hand-written store files | naming, adapter, selectors, and sync serializer drift from convention | regenerate with ng g store* |
One block per finding, most severe first.
FINDING <one sentence: what is misplaced>
where <file>:<line>
rule <which check or anti-pattern, and which skill states it>
impact <what breaks or degrades — reuse, testability, CMS replacement, correctness>
fix <the concrete move, naming the target layer or component>
Close with a verdict on the checklist below rather than restating it item by item.
componentType agrees with the class's actual role@O3rComponent decorator and the meaning of each componentTypelogic-placement — the design-mode entry point, and the owner of the stop-and-ask ruleslogic-component-shape, logic-state-layer, logic-store-type — the three decision treesrxjs-vs-signals — reviewing the reactive primitive rather than the layerWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub amadeusitgroup/otter --plugin otter11 skills in this plugin
/logic-component-shapeDecision tree for single component versus container/presenter, which componentStructure to generate, and which componentType to declare. Invoked by `logic-placement` and `logic-review`, not directly./logic-placementDecide where new logic belongs — component shape, logic layer, and store variant — when designing a component, service, or store in an Angular/Otter workspace. Use `logic-review` to assess existing code./logic-state-layerDecision tree for whether logic belongs in the component class, a service, or an NgRx store, including service scope and where API calls go. Invoked by `logic-placement` and `logic-review`, not directly./logic-store-typeDecision tree for which NgRx store variant to generate — entity or simple, sync or async. Invoked by `logic-placement` and `logic-review` once a store is justified, not directly; it does not decide whether a store is warranted./otter-mcp-setupThis skill should be used when the `@o3r/mcp` MCP server is not available and needs to be installed, or when the user asks to "install otter mcp", "setup otter mcp", or "configure otter mcp server"./otter-new-configThis skill should be used when the user asks to "add configuration to a component", "introduce a config flag", "add a feature toggle", "add a runtime config", "create a config property", or when any new configuration flag is being introduced in an Otter workspace. Guides scope decisions, safe defaults, and absence-detection patterns.Other plugins' skills for the same job