From godmode
Explores edge cases across 12 dimensions like invalid input, concurrency, and auth failures. Scores scenarios by likelihood x impact. Generates runnable tests for high-risk ones.
How this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:scenarioThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/godmode:scenario`, "edge cases", "failure modes"
/godmode:scenario, "edge cases", "failure modes"Read spec, plan, and code. Trace the data flow:
Input -> Validation -> Transform -> Logic -> Persist
-> Side Effects -> Response
For each stage list:
Print: [scenario:read] Feature: {name} | {N} calls | {N} mutations | {N} side effects | {N} boundaries
Entry points: API routes, CLI, UI events, cron, queues
Dependencies: services, DBs, caches, third-party APIs
Data shapes: input schemas, output schemas, models
For EACH dimension, generate 2-5 specific scenarios. Every scenario MUST reference a code path (file:line).
| # | Dimension | What to explore |
|---|---|---|
| 1 | Invalid Input | SQL injection, XSS, >64KB strings |
| 2 | Boundary | 0, -1, MAX_INT+1, empty, null |
| 3 | Concurrency | Race conditions, double-submit |
| 4 | Network | Timeout, partial response, DNS |
| 5 | Data Integrity | Orphans, constraint violations |
| 6 | Auth | Expired tokens, privilege escalation |
| 7 | Time | Timezone, DST, leap seconds, TTL |
| 8 | Scale | 10x load, large payloads, N+1 |
| 9 | Failure | Crash mid-write, OOM, disk full |
| 10 | Migration | Schema change, data backfill |
| 11 | User Error | Double-click, back button, paste |
| 12 | Config | Missing env var, wrong region |
IF dimension truly N/A: one-sentence justification. "N/A" alone is not acceptable.
CRITICAL: Score >= 20 (e.g., L=5 x I=4)
HIGH: Score 12-19
MEDIUM: Score 6-11
LOW: Score 1-5
Minimum valid score is 1. Zero is invalid.
IF scenario covers <80% of edge cases: add more. WHEN risk score >7: escalate to team lead.
Sort by score descending. Within same score:
DIMENSION | SCENARIO | L | I | SCORE
Invalid Input | SQL injection search | 4 | 5 | 20
Concurrency | Race on balance | 3 | 5 | 15
For every scenario scored 12+:
# Detect test framework
ls package.json pytest.ini Cargo.toml 2>/dev/null
cat package.json 2>/dev/null | grep -E "vitest|jest|mocha"
# Run generated tests
npx vitest run tests/scenarios/ 2>&1
tests/scenarios/{feature}.scenario.test.{ext}test_cmd -- tests/scenarios/{feature}.scenario.test.{ext}
BUG_FOUNDScenario Analysis: {feature}
{total} scenarios across 12 dimensions
{critical} CRITICAL | {high} HIGH | {medium} MEDIUM
{tests} tests generated | {bugs} bugs found
File: .godmode/scenario-log.tsv
timestamp feature dimension scenario L I score severity test_file code_ref status
Status: TEST_PASS, TEST_FAIL, BUG_FOUND, NO_TEST
KEEP if: test is valid AND uses real code paths
AND follows ARRANGE/ACT/ASSERT
DISCARD if: syntax errors after 2 fixes
OR references nonexistent code
On discard: log as NO_TEST. No stub tests.
STOP when FIRST of:
- All 12 dimensions explored AND HIGH+ have tests
- 3 consecutive dimensions produce 0 HIGH+ scenarios
- >5 test generation failures with no output
npx claudepluginhub arbazkhan971/godmodeDocuments edge cases, error states, boundary conditions, race conditions, and recovery paths for a feature to ensure comprehensive coverage during specification and QA planning.
Hunts cross-component bugs in assembled features by dispatching 5 parallel adversarial test dimensions against the full diff. Use for integration issues, wiring faults, and state mismatches between tasks.
Analyzes any task or proposal for failure modes, security vulnerabilities, race conditions, and edge cases. Useful for risk assessment before implementation.