logic-state-layer

logic-state-layer is a skill for Claude Code from AmadeusITGroup/otter. It costs 48 tokens per session (1,525 once invoked), scanned A, original, BSD-3-Clause.

A decision tree for placing application logic in an Angular component, service, or NgRx store. NgRx is a library for managing shared application state.

In plain words
What is it for?
Deciding where to put UI state, reusable behavior, API calls, and shared application data.
Why use it?
It prevents simple component state from gaining unnecessary layers and keeps shared or server-related logic in an appropriate place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the otter plugin — 11 skills, 3 agents shipped together

Good fit Deciding where to put UI state, reusable behavior, API calls, and shared application data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amadeusitgroup/otter/logic-state-layer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AmadeusITGroup/otter --skill logic-state-layer
Clone the repo
git clone --depth 1 https://github.com/AmadeusITGroup/otter

Made for: Claude Code.

Or install otter, the plugin that ships this one along with the rest of its 11 skills, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for logic-state-layer

README.md
[![agentmods](https://agentmods.dev/badge/skills/amadeusitgroup/otter/logic-state-layer/github.svg)](https://agentmods.dev/skills/amadeusitgroup/otter/logic-state-layer)
Your own site
<a href="https://agentmods.dev/skills/amadeusitgroup/otter/logic-state-layer"><img src="https://agentmods.dev/badge/skills/amadeusitgroup/otter/logic-state-layer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for logic-state-layer

Your own site · 80×15
<a href="https://agentmods.dev/skills/amadeusitgroup/otter/logic-state-layer"><img src="https://agentmods.dev/badge/skills/amadeusitgroup/otter/logic-state-layer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01525
Opus 5.5 $0.00019 $0.00610
Sonnet 5.5 $0.00010 $0.00305
Haiku 4.5 $0.00005 $0.00153

Measured 1mo ago against content hash 43eb9a349e85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

logic-state-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

tools/llm/plugins/otter/skills/logic-state-layer/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Decision tree — logic layer

Returns: component class, service (and its scope), or store.

Walk down and stop at the first match, except where a step tells you to read the next one before concluding. Each step down costs indirection, so earn it.

Step — component-local: does this state die with the component?

TRIGGER  the state is scoped to one component and read by nothing else
         local signals, derived values, event handlers, a form this component owns

RESULT   component class
IMPLEMENT  signal(), computed(), local form wiring — add no service for this
VERIFY     nothing outside the component reads it
           no service or store was created for it

STOP. The layer is decided.
// Search term and pagination are pure UI concerns: nothing outside this
// component reads them, so they need no service and no store.
public readonly searchTerm = signal('');
public readonly currentPage = signal(1);

public readonly displayedItems = computed(() =>
  this.items().slice((this.currentPage() - 1) * this.pageSize(), this.currentPage() * this.pageSize())
);

Step — shared or stateless: is it reused beyond one component?

CRITERION A  behaviour or state shared between components
CRITERION B  stateless and reusable regardless of sharing — a wrapper over a browser
             API, a pure computation, a cross-cutting concern such as logging
CRITERION C  orchestration across several API calls, or reusable pre/post processing

IF none is true -> go to the application-scoped step

IF any is true  -> a service covers it, but a store criterion can still apply on top.
                   Read the application-scoped step before concluding:
                     none of its criteria met -> RESULT: injectable service
                     any of its criteria met  -> RESULT: store for the state, plus a
                                                 service only for what B or C describes

CHOOSE THE SCOPE (service only)
  shared only between a container and its own subcomponents
    -> providers: [] on that container
  shared across unrelated features, and no store criterion applied
    -> providedIn: 'root'

VERIFY  the container injects it; a presenter does not, unless it is a pure
        presentation helper
        it does not select from the store — that selection belongs in the container

STOP once the application-scoped step has been read and returned no store.

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 160 lines · 48 tokens per session scan A 43eb9a349e85

Subscribe to this mod's changes

logic-state-layer is a skill published in the GitHub repository AmadeusITGroup/otter (59 stars, last pushed today), licensed BSD-3-Clause. It adds 48 tokens to every session and 1,525 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

writing-emdash-docs

Write, revise, and review EmDash documentation for technical accuracy, useful structure, house style, and natural prose. Use when working on user documentation, guides, API reference pages, migration or upgrade guides, READMEs, contributor documentation, technical specifications, or release notes in the EmDash…

emdash-cms/emdash · 85 tokens

isolating-product-facade-contracts

Plan and execute product isolation migrations to a facade plus contract layer in PostHog, following the Visual review architecture. Use when a product still exposes internals (models/logic/views) across boundaries and needs migration toward contracts.py + facade/api.py + presentation separation, with a PR strategy…

PostHog/posthog · 76 tokens

agent-upkeep

Perform one small, scoped maintenance improvement to the Elements monorepo and open a single reviewable pull request. Use this skill for scheduled or unattended upkeep runs that improve unit test coverage for one file, fix one behavioral bug in one module, or move one off ESLint rule toward enforcement to reduce…

NVIDIA/elements · 115 tokens

agent-dependencies

Perform one conservative dependency or toolchain upgrade in the Elements monorepo and open a validated pull request. Use for nightly or unattended dependency maintenance, outdated package checks, first-party actions/ GitHub Actions updates, and pinned mise tool updates. Use the github-dependabot skill instead when the…

NVIDIA/elements · 73 tokens

agent-debug-ci

Investigate failed scheduled or nightly GitHub Actions runs on the default branch, determine whether the failure is reproducible and repository-owned, implement the smallest evidence-backed fix, validate it, and open a pull request. Use when a failed nightly CI event starts an agent, or when the standard CI or…

NVIDIA/elements · 80 tokens

audit-ci

Run and analyze Elements cold CI performance profiles and propose evidence-backed build, test, lint, and dependency-graph improvements. Use whenever asked to profile or benchmark pnpm run ci, rerun ci:profile, create a CI performance audit, compare CI timings, find bottlenecks or the completion path, investigate a CI…

NVIDIA/elements · 78 tokens