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 pproenca/dot-skills --skill adversarial-ts-patternsgit clone --depth 1 https://github.com/pproenca/dot-skillsWrote 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/pproenca/dot-skills/adversarial-ts-patterns)<a href="https://agentmods.dev/skills/pproenca/dot-skills/adversarial-ts-patterns"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/adversarial-ts-patterns.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00202 | $0.01632 |
| Opus 5 | $0.00101 | $0.00816 |
| Sonnet 5 | $0.00040 | $0.00326 |
| Haiku 4.5 | $0.00020 | $0.00163 |
Grade A, and why
adversarial-ts-patterns 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adversarial TS Patterns Gate
A design-pattern usage gate for TypeScript and React application code — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
The gate judges in both directions. Over-abstraction — Gang of Four and enterprise machinery ported from Java/C# where idiomatic TypeScript reaches for a function, a module, or a tagged union. Under-modeling — implicit state machines whose impossible states compile: boolean-flag lifecycles, effect chains, hand-synced derived state, silent default branches.
When to Apply
- A TypeScript/React diff or feature is about to merge and needs an objective PASS/FAIL on pattern usage, not advisory feedback.
- An agent (Claude, Codex) authored the code and you want an independent check that it is not reproducing Java/C# training-data idioms — Singleton classes, factory hierarchies, repository wrappers, JavaBean accessors.
- A migration from another stack (Java, C#, Angular-style DI) claims completion and the ported architecture needs auditing for layers that lost their justification in TypeScript.
- Component or store state grew organically and you want the implicit-state-machine failure modes (contradictory booleans, effect chains, non-exhaustive matches) caught before they ship.
Do not apply to non-TypeScript codebases (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"), or when the user wants explanations and refactors rather than a verdict — that is the job of the curated implementation-design-patterns and implementation-functional-patterns skills. React-specific rules go N/A in non-React TypeScript projects; the rest of the gate works in any TypeScript application.
Review Protocol
Follow these steps exactly — the gate's value is that every review runs the same way.
- Identify the target. Pin down exactly what is under review (a diff, a set of files, a PR) and note the ref/paths so the review runs against an unambiguous, fixed target. Include the repo root in the target description — the
layer-no-single-impl-interfaceandlayer-no-di-container-in-apprules require searching beyond the diff for second implementations and registrations. - Load the rules. Read references/_sections.md and every rule file in
references/(allstate-*.md,create-*.md,behave-*.md,layer-*.md,react-*.md,oo-*.mdfiles). - Compose the reviewer prompt. Fill references/reviewer-prompt.md with the rules and the target. The composed prompt must be fully self-contained — a reviewer sees no conversation history, so nothing may refer to context outside the prompt.
- Dispatch one blind reviewer. Launch a single Task subagent whose entire input is the composed prompt — no conversation context, no commentary alongside it.
- Render fail-closed. The reviewer's structured output is the verdict — there is no merge step. Overall verdict is PASS only when every rule is PASS or N/A; any single FAIL fails the gate. Never average, weigh severity, or waive a rule — a "minor" FAIL is a FAIL. If the reviewer returns "GATE NOT APPLICABLE" (not a TypeScript target), stop and report that instead of a verdict.
- Render the verdict. Fill assets/templates/verdict.md. On FAIL, aggregate the reviewer's "missing for PASS" suggestions into the fix list, each with its location, ordered by category importance. Every rule whose final result is FAIL must appear in the fix list with a change concrete enough to apply as written — if the reviewer's suggestion only restates the violation, derive the fix from the rule's Correct example before rendering.
What ships with it
23 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/templates/verdict.md 1.4 KB
- gotchas.md 1.9 KB
- metadata.json 1.7 KB
- references/_sections.md 2.5 KB
- references/behave-no-event-bus-in-tree.md 2.1 KB
- references/behave-no-single-method-class.md 1.9 KB
- references/behave-union-over-state-visitor-classes.md 2.2 KB
- references/create-no-builder-for-optional-bag.md 2.1 KB
- references/create-no-factory-class-hierarchy.md 1.9 KB
- references/create-no-getinstance-singleton.md 1.8 KB
- references/layer-no-di-container-in-app.md 2.2 KB
- references/layer-no-passthrough-repository.md 2.3 KB
- references/layer-no-single-impl-interface.md 2.1 KB
- references/oo-no-static-only-class.md 1.6 KB
- references/oo-no-trivial-accessors.md 1.6 KB
- references/react-no-component-inheritance.md 2.2 KB
- references/react-no-hoc-for-logic-reuse.md 2.0 KB
- references/react-no-imperative-handle-data-flow.md 2.3 KB
- references/reviewer-prompt.md 4.3 KB
- references/state-exhaustive-match-on-unions.md 2.1 KB
- references/state-no-effect-chains.md 2.2 KB
- references/state-no-stored-derived-state.md 1.6 KB
- references/state-union-over-boolean-flags.md 1.9 KB
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.
- 5d ago First seen · 63 lines · 202 tokens per session scan A 1324dcd74ea1
adversarial-ts-patterns is a skill published in the GitHub repository pproenca/dot-skills (203 stars, last pushed 23d ago), licensed MIT. It adds 202 tokens to every session and 1,632 once invoked, about $0.0010 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-09-03.
Other skills, from other repositories
compiler-commit
Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits with the [compiler] or [rust-compiler] prefix.
compiler-verify
Use when you need to run all compiler checks (tests, lint, format) before committing. Detects whether TS or Rust code changed and runs the appropriate checks.
compiler-review
Review Rust port code for port fidelity, convention compliance, and error handling. Compares against the original TypeScript source.
recipe-front-review
Reviews completed frontend implementation for governing-source compliance, scope economy, repository quality, and security, then applies user-approved React corrections.
ss-lint
Quick automated lint — detects common design system violations in seconds.
frontend-code-review
Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.