Agent skill

Adversarial TS Patterns

by pproenca in pproenca/dot-skills

A skill your agent uses to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against…

MITAuto-check passedDevelopment

Install Adversarial TS Patterns

skills CLI
$ npx skills add pproenca/dot-skills --skill adversarial-ts-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pproenca/dot-skills adversarial-ts-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/adversarial-ts-patterns .claude/skills/adversarial-ts-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
adversarial-ts-patterns
GitHub stars
214
Token cost
~1.8k tokens
SKILL.md length
829 words
Files
24 (incl. references, assets)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against…

  • Works in 6 steps: Identify the target. Pin down exactly… → Load the rules. Read… → Compose the reviewer prompt. Fill… → …
  • File set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles
  • SKILL.md covers When to Apply, Review Protocol, Verdict Format and Rule Categories, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Adversarial TS Patterns is an agent skill from pproenca/dot-skills. Use this skill to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles, useEffect chains, stored derived state, non-exhaustive union matches) and over-engineered OO/enterprise ports (getInstance singletons, factory and builder classes, single-method strategy classes, State/Visitor hierarchies, event buses inside a React…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 26 other files, including reference files and assets (for example `assets/templates/verdict.md`, `gotchas.md` and `metadata.json`).

It sits in Development, covering Design patterns and Subagents. It works with React, TypeScript, C# and Java. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • File set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles
  • UseEffect chains
  • Stored derived state
  • Non-exhaustive union matches) and over-engineered OO/enterprise ports (getInstance singletons

Example prompts

  • “/adversarial-ts-patterns”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. 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…
  2. Load the rules. Read references/_sections.md and every rule file in references/ (all state-*.md, create-*.md, behave-*.md, layer-*.md…
  3. Compose the reviewer prompt. Fill references/reviewer-prompt.md with the rules and the target. The composed prompt must be fully…
  4. Dispatch one blind reviewer. Launch a single Task subagent whose entire input is the composed prompt — no conversation context, no…
  5. Render fail-closed. The reviewer's structured output is the verdict — there is no merge step. Overall verdict is PASS only when every rule…
  6. Render the verdict. Fill assets/templates/verdict.md. On FAIL, aggregate the reviewer's "missing for PASS" suggestions into the fix list…

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Adversarial TS Patterns loads about 1.8k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 248 tokens; SKILL.md has 829 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~248
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 829 words, ~1,843 tokens.

Download SKILL.mdSave it as .claude/skills/adversarial-ts-patterns/SKILL.md (or your agent's skills folder). This skill also uses 23 other files; get the full folder from GitHub.
name
adversarial-ts-patterns
description
Use this skill to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles, useEffect chains, stored derived state, non-exhaustive union matches) and over-engineered OO/enterprise ports (getInstance singletons, factory and builder classes, single-method strategy classes, State/Visitor hierarchies, event buses inside a React tree, pass-through repositories, DI containers, single-implementation interfaces, component inheritance, logic-only HOCs, static-only classes, trivial accessors). Trigger it before merging TS/React work, when asked to gate or pass/fail pattern usage, or as a check that agent-authored code is not porting Java/C# idioms. It renders verdicts only; for teaching-style guidance use implementation-design-patterns or implementation-functional-patterns.

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.

  1. 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-interface and layer-no-di-container-in-app rules require searching beyond the diff for second implementations and registrations.
  2. Load the rules. Read references/_sections.md and every rule file in references/ (all state-*.md, create-*.md, behave-*.md, layer-*.md, react-*.md, oo-*.md files).
  3. 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.
  4. Dispatch one blind reviewer. Launch a single Task subagent whose entire input is the composed prompt — no conversation context, no commentary alongside it.
  5. 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.
  6. 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.

If the same rule flips verdicts across re-reviews of an unchanged target, or a human reads the evidence and overrides the verdict, that is a decidability bug in the rule — record it in gotchas.md and sharpen the rule; do not override the gate.

Show full SKILL.md (245 more words)Show less

Verdict Format

The reviewer returns, per rule: PASS | FAIL | N/A, evidence (file:line or a quote — required for PASS as well as FAIL), and for every FAIL, the fix that flips the rule to PASS once applied — the named change plus its location, never a restatement of the violation. The final report follows assets/templates/verdict.md.

Rule Categories

#CategoryPrefixCovers
1State Modeling & Machinesstate-Discriminated unions over boolean flags, no effect chains, no stored derived state, exhaustive matches with never
2Creational Portscreate-No getInstance() singletons, no factory-class hierarchies, no builders for option bags
3Behavioral Portsbehave-Functions over single-method classes, unions over State/Visitor hierarchies, no event buses inside a React tree
4Enterprise Layerslayer-No pass-through repositories, no DI containers with single implementations, no single-implementation interfaces
5React Compositionreact-No component inheritance, hooks over logic-only HOCs, props over imperative handles
6OO Ceremonyoo-No static-only container classes, no trivial accessor pairs
  • implementation-design-patterns (curated) — the teaching-style reference for when a GoF class form is warranted; use it when the goal is guidance or refactoring rather than a verdict.
  • implementation-functional-patterns (curated) — the GoF-to-functional map this gate's create-/behave- rules enforce the reviewable subset of.
  • adversarial-tanstack / adversarial-zod — framework- and library-level gates for TanStack Start apps; run alongside this gate for full coverage of a Start diff.

Reference Files

FileDescription
references/reviewer-prompt.mdSelf-contained prompt template for the blind reviewer
assets/templates/verdict.mdVerdict report template
references/_sections.mdCategory definitions and ordering
metadata.jsonVersion and source references

© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 23 other files (references, assets) in skills/.experimental/adversarial-ts-patterns of pproenca/dot-skills.

  • SKILL.md
  • assets/templates/verdict.md
  • gotchas.md
  • metadata.json
  • references/_sections.md
  • references/behave-no-event-bus-in-tree.md
  • references/behave-no-single-method-class.md
  • references/behave-union-over-state-visitor-classes.md
  • references/create-no-builder-for-optional-bag.md
  • references/create-no-factory-class-hierarchy.md
  • references/create-no-getinstance-singleton.md
  • references/layer-no-di-container-in-app.md
  • references/layer-no-passthrough-repository.md
  • references/layer-no-single-impl-interface.md
  • references/oo-no-static-only-class.md
  • references/oo-no-trivial-accessors.md
  • references/react-no-component-inheritance.md
  • references/react-no-hoc-for-logic-reuse.md
  • … and 6 more

Open the folder on GitHubat commit cf93c57

Compare with similar skills

Adversarial TS Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Adversarial TS Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adversarial TS Patterns this skillpproenca/dot-skills214—~1.8kAutomated safety check: PassMIT
Dynamo Webview Component ScaffoldDynamoDS/Dynamo2k—~991Automated safety check: PassApache-2.0
Design Patternswaybarrios/opencode-power-pack533—~2.2kAutomated safety check: PassMIT
React Render Types CompositionHorusGoul/eslint-plugin-react-render-types111—~1.1kAutomated safety check: PassMIT
Developing Softwaretelagod/code-abyss244—~410Automated safety check: PassMIT
Build Teaql Appteaql/teaql-agent-kit2.8k—~4.6kAutomated safety check: PassMIT

Similar skills

  • Scaffolds a new Dynamo package repo that hosts a view extension with a WebView2-embedded React frontend.

    2k GitHub stars~991 tokensUpdated today
    DevelopmentAuto-check passed
  • Design Patterns

    waybarrios/opencode-power-pack

    Agents should invoke this skill when choosing patterns, designing traits/interfaces/components, deciding abstraction boundaries, evaluating dependency injection/callbacks, or comparing…

    533 GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Render Types Composition

    HorusGoul/eslint-plugin-react-render-types

    Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types.

    111 GitHub stars~1.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Developing Software

    telagod/code-abyss

    Software development knowledge reference covering Python, Go, Rust, TypeScript, Java, C++, and Shell.

    244 GitHub stars~410 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Build Teaql App

    teaql/teaql-agent-kit

    Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries.

    2.8k GitHub stars~4.6k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Growing Outside In Systems

    lexler/skill-factory

    Drive feature development using Outside-In TDD with Hexagonal Architecture.

    239 GitHub starsUsed in 1 repo~1.9k tokens
    Testing & QAAuto-check passed

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Adversarial TS Patterns

What does Adversarial TS Patterns do?

A skill your agent uses to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against…. Adversarial TS Patterns is an agent skill from pproenca/dot-skills.

When should I use Adversarial TS Patterns?

Adversarial TS Patterns fits situations like: file set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles; useEffect chains; stored derived state; non-exhaustive union matches) and over-engineered OO/enterprise ports (getInstance singletons.

How do I install Adversarial TS Patterns in Claude Code?

Run `npx skills add pproenca/dot-skills --skill adversarial-ts-patterns -a claude-code`. Or copy the skill folder (skills/.experimental/adversarial-ts-patterns in pproenca/dot-skills) into .claude/skills/adversarial-ts-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Adversarial TS Patterns in Codex?

Run `npx skills add pproenca/dot-skills --skill adversarial-ts-patterns -a codex`. Or copy the skill folder (skills/.experimental/adversarial-ts-patterns in pproenca/dot-skills) into .agents/skills/adversarial-ts-patterns in your project. Codex loads it when a task matches its description.

Can I use Adversarial TS Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill adversarial-ts-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adversarial-ts-patterns, .gemini/skills/adversarial-ts-patterns, .github/skills/adversarial-ts-patterns and .opencode/skills/adversarial-ts-patterns in your project.

What does Adversarial TS Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Adversarial TS Patterns is instructions for the agent only.

Does Adversarial TS Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Adversarial TS Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Adversarial TS Patterns use?

Adversarial TS Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Adversarial TS Patterns use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Adversarial TS Patterns?

Skills that share tags, products or a category with Adversarial TS Patterns: Dynamo Webview Component Scaffold (DynamoDS/Dynamo, 2k stars), Design Patterns (waybarrios/opencode-power-pack, 533 stars), React Render Types Composition (HorusGoul/eslint-plugin-react-render-types, 111 stars) and Developing Software (telagod/code-abyss, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adversarial TS Patterns?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.