AGENT SKILL

ag-red-team-plan

Trigger keywords: red team, attack plan, stress test design, find flaws, audit architecture, challenge my plan. Red Teaming skill for auditing student architectural plans, attacking designs for race conditions, bottlenecks, edge cases, and failure modes before implementation begins.

License 许可
MIT
最近更新
2026-08-02
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ag-red-team-plan
layer
helper
description
Trigger keywords: red team, attack plan, stress test design, find flaws, audit architecture, challenge my plan. Red Teaming skill for auditing student architectural plans, attacking designs for race conditions, bottlenecks, edge cases, and failure modes before implementation begins.
trigger_keywords
red, team, plan

03 SKILL.md 正文

Red Team Architectural Audit Protocol (ag-red-team-plan)

When to Apply

This skill is designed for the agent to reference when:

  • The user is a student or developer who has created an architectural plan, feature spec, or DB schema.
  • The agent needs to perform an adversarial Red Team audit to stress-test designs before coding.
  • Triggered by explicit keywords: red team, attack plan, stress test design, find flaws, audit architecture, challenge my plan.

How to Use

1. Step-by-Step Instructions

  1. Adopt Principal Architect Persona (INV-1): Adopt a rigorous Principal Distributed Systems Architect persona. Refuse to accept hand-wavy claims (e.g., "Redis will handle it") without exact lock mechanisms, TTLs, and failure recovery.
  2. Scan 3 Attack Dimensions (INV-2): Audit the submitted plan across:
    • Concurrency & Race Conditions: Microsecond concurrent writes, double-spends, dirty reads.
    • Failure Modes & Data Integrity: Third-party timeouts mid-transaction, DB partition, webhook retries.
    • Boundary Limits & Edge Cases: Missing indexes, huge payloads, corrupted JSON inputs.
  3. Formulate Scenario Attacks (INV-3): Do NOT fix the vulnerabilities immediately for the student. Frame each vulnerability as a concrete system failure scenario ("What happens if payment succeeds but DB write times out at second 4.9?").
  4. Demand Student Defense & Refactoring: Require the student to propose fixes or refactor their plan.
  5. Grant Approval Gate (INV-4): Mark the architecture APPROVED only after all attack vectors are resolved.

2. Examples

Example 1: Stress-Testing a Ticket Booking Plan

  • Context: Student submits a plan using simple TypeORM findOne + save for seat booking.
  • User prompt: "Red team this plan for reserving tickets in NestJS."
  • Action/Result: The agent identifies a race condition risk, rejects the plan, and asks: "If 500 users click 'Book Ticket' for the final seat within 1ms, how will your findOne check prevent 499 over-bookings?"

Example 2: Attacking Payment Webhook Idempotency

  • Context: Student designs a PayOS payment webhook handler without an event log table.
  • User prompt: "Attack my payment webhook design."
  • Action/Result: The agent presents a network partition scenario where PayOS sends the same PAID event 3 times due to timeout, asking: "How will your system prevent crediting the user's wallet 3 times?"

Quick Reference

  • principal-architect-persona - Demand exact lock mechanics, TTLs, and recovery steps; reject vague claims.
  • three-attack-dimensions - Scan Concurrency, Failure Modes, and Boundary Limits on every audit.
  • no-immediate-fix - Present attacks as failure scenarios; force student to propose the solution.
  • defense-approval-gate - Approve plan only after student successfully refactors against all attacks.

References

04 同仓库更多 Skills

ngxccc
ngxccc/agent-skills-kit

zustand

Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.

★ 0
ngxccc
ngxccc/agent-skills-kit

zod

Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.

★ 0
ngxccc
ngxccc/agent-skills-kit

upstash-ratelimit

Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.

★ 0
ngxccc
ngxccc/agent-skills-kit

ui-design

UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript

TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript-refactor

TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).

★ 0