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.
npx skills add ychampion/cskill-agents --skill empty-trigger-short-circuit-before-app-stategit clone --depth 1 https://github.com/ychampion/cskill-agentsWrote 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.
[](https://agentmods.dev/skills/ychampion/cskill-agents/empty-trigger-short-circuit-before-app-state)<a href="https://agentmods.dev/skills/ychampion/cskill-agents/empty-trigger-short-circuit-before-app-state"><img src="https://agentmods.dev/badge/skills/ychampion/cskill-agents/empty-trigger-short-circuit-before-app-state/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.
<a href="https://agentmods.dev/skills/ychampion/cskill-agents/empty-trigger-short-circuit-before-app-state"><img src="https://agentmods.dev/badge/skills/ychampion/cskill-agents/empty-trigger-short-circuit-before-app-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.00394 |
| Opus 5 | $0.00015 | $0.00197 |
| Sonnet 5 | $0.00006 | $0.00079 |
| Haiku 4.5 | $0.00003 | $0.00039 |
Grade A, and why
empty-trigger-short-circuit-before-app-state 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 10d 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.
What it actually says
SKILL: Empty Trigger Short-Circuit Before App State
Domain: context-management
Trigger: Use when nested memory attachment triggers may be empty and you want to avoid React render-cycle work unless there is actual work to do.
Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.
Core Method
Before calling expensive or render-bound helpers, check the cheap trigger state. If nestedMemoryAttachmentTriggers is missing or empty, return immediately so that the expensive getAppState() call does not fire on every turn. Only when work exists do you fetch the React-bound state and iterate over the trigger set, ensuring each attachment run still has access to the required context but only when needed.
Key Rules
- Check
nestedMemoryAttachmentTriggersfor truthiness and non-zero size before doing anything else. - Keep the early exit path separate from the work path so future readers recognize the guard without parsing the loop logic.
- Only call
getAppState()or other render-dependent helpers after you confirm there are triggers to process. - Treat the guard as part of the method contract; stateful or async helpers should not run unless this simple check passed.
Example Application
In a turn that has no nested memory triggers, return [] right away so getAppState() is never invoked; when triggers exist, call getAppState(), collect each nested attachment, and clear the set afterward as usual.
Anti-Patterns (What NOT to do)
- Do not fetch the React
appStatebefore validating that the trigger set requires it. - Do not assume the triggers will always be non-empty and let React-dependent helpers run every turn.
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.
- 10d ago First seen · 28 lines · 30 tokens per session scan A 646cf1f43090
empty-trigger-short-circuit-before-app-state is a skill published in the GitHub repository ychampion/cskill-agents (36 stars, last pushed 5mo ago), licensed MIT. It adds 30 tokens to every session and 394 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
expo-config-plugin
Writing Expo config plugins, withInfoPlist, withAndroidManifest, withDangerousMod, mod compose, plugin testing, and registration in app.config.ts. Triggers on config plugin, with-plugin, withInfoPlist, withAndroidManifest, withDangerousMod, withEntitlementsPlist, withGradleProperties, mod, native config, expo plugin…
expo-router
File-based routing with Expo Router, dynamic routes, layout hierarchy, deep linking, and navigation patterns. Triggers on expo-router, file-based routing, app dizini, layout.tsx, [id].tsx, deep linking, expo-linking, tab navigation, stack navigation, drawer, prefetch, parallel routes, redirects, navigation, useRouter…
frontend-development
Build robust frontend systems with React, Next.js, and TypeScript. Use when implementing components, hooks, data fetching, state management, or optimizing frontend performance.
react-best-practices
Use when writing, reviewing, or optimizing React or Next.js code — component architecture, hooks rules, server vs. client components, data fetching patterns, bundle size, and accessibility in React.
open-slide-best-practices
Best practices for authoring presentations with open-slide, the React slide framework with a fixed 1920×1080 canvas, with full Hebrew and RTL support. Covers the slides/[id]/index.tsx file contract, type scale, DesignSystem tokens, themes/ system, @slide-comment inspector markers, current.json deictic resolution…
grape
Use Grape MCP for Codex context continuity in coding repositories. Use when a task needs repeated-turn context, omitted context restore, stale-context checks, invalidation checks, or safe continuity across branch and dirty-worktree changes.