edge-cases

0
0
Source

Analyze a PRD for edge cases, failure modes, and scenarios that might be missed. Use after creating a PRD to strengthen it. Triggers on: analyze edge cases, find edge cases, what could go wrong, edge case analysis.

Install

mkdir -p .claude/skills/edge-cases && curl -L -o skill.zip "https://mcp.directory/api/skills/download/9107" && unzip -o skill.zip -d .claude/skills/edge-cases && rm skill.zip

Installs to .claude/skills/edge-cases

About this skill

Edge Case Analysis

Systematically analyze a PRD to identify edge cases, failure modes, race conditions, and scenarios that might be overlooked during implementation.


The Job

  1. Read the provided PRD thoroughly
  2. Analyze each user story and functional requirement
  3. Identify potential edge cases across multiple categories
  4. Propose updates to the PRD (new acceptance criteria, new stories, or updates to existing stories)

Output: A list of edge cases with recommended PRD updates.


Edge Case Categories

1. Input Edge Cases

  • Empty/null values: What if required fields are empty?
  • Boundary values: Max lengths, min/max numbers, date ranges
  • Invalid formats: Wrong data types, malformed input
  • Unicode/special characters: Emojis, RTL text, HTML injection attempts
  • Large data: What if there are 10,000 items instead of 10?

2. State Edge Cases

  • Race conditions: Two users editing the same thing simultaneously
  • Stale data: Data changed by another process between read and write
  • Partial completion: What if the operation fails halfway?
  • Concurrent operations: Multiple tabs, multiple sessions
  • Offline/reconnection: What happens when connection drops?

3. User Behavior Edge Cases

  • Rapid clicks: User clicks submit multiple times quickly
  • Back button: User navigates back during an operation
  • Browser refresh: User refreshes during a multi-step flow
  • Abandoned flows: User leaves in the middle of a process
  • Unexpected navigation: User directly accesses URLs they shouldn't

4. Error Handling Edge Cases

  • Network failures: API timeouts, server errors
  • Validation errors: How are errors displayed and recovered from?
  • Permission errors: User loses access mid-operation
  • Resource exhaustion: Rate limits, storage limits

5. Data Edge Cases

  • First-time use: No data exists yet (empty states)
  • Legacy data: Old data that doesn't match new schema
  • Data migration: What happens to existing data when schema changes?
  • Cascade effects: Deleting something that other things depend on

6. Security Edge Cases

  • Authentication expiry: Session times out during operation
  • Authorization changes: Permissions change while user is active
  • Input sanitization: XSS, SQL injection, command injection
  • Data leakage: Error messages exposing sensitive info

7. Performance Edge Cases

  • Cold start: First load performance
  • Large payloads: Response times with lots of data
  • Memory leaks: Long-running sessions
  • N+1 queries: Database performance at scale

Analysis Process

For each user story in the PRD:

Step 1: Read the Story

Understand what the story is trying to accomplish.

Step 2: Apply Category Checklist

Go through each edge case category above and ask:

  • Does this category apply to this story?
  • What specific edge cases might occur?

Step 3: Rate Severity

For each identified edge case:

  • Critical: Could cause data loss, security breach, or system crash
  • High: User-facing error or broken functionality
  • Medium: Poor UX or minor functionality issue
  • Low: Minor annoyance or cosmetic issue

Step 4: Propose PRD Update

For each edge case, propose one of:

  • New acceptance criteria for existing story
  • New user story if scope is significant
  • Update to functional requirements
  • Note in Technical Considerations

Output Format

# Edge Case Analysis for [PRD Name]

## Summary
- Total edge cases identified: X
- Critical: X | High: X | Medium: X | Low: X

## Edge Cases by Story

### US-001: [Story Title]

| Edge Case | Category | Severity | Recommended Action |
|-----------|----------|----------|-------------------|
| User submits empty form | Input | High | Add acceptance criteria: "Empty form shows validation errors" |
| User double-clicks submit | User Behavior | Medium | Add acceptance criteria: "Submit button disabled after first click" |

### US-002: [Story Title]
...

## New Stories Recommended

### US-NEW-001: Handle concurrent edits
**Description:** As a user, I want to see a warning if someone else has edited the item since I started editing.

**Acceptance Criteria:**
- [ ] System checks for updates before saving
- [ ] Warning shown if data has changed
- [ ] User can choose to overwrite or refresh

**Rationale:** Addresses race condition edge case in US-003 and US-004.

## Updated Functional Requirements

- FR-NEW-1: The system must validate all user input on both client and server side
- FR-NEW-2: All destructive operations must be idempotent

## Technical Considerations to Add

- Implement optimistic locking for concurrent edit detection
- Add retry logic with exponential backoff for network failures
- Use database transactions for multi-step operations

Checklist Before Completing

  • Analyzed each user story against all edge case categories
  • Rated severity for each edge case
  • Provided concrete, actionable recommendations
  • Grouped related edge cases to avoid duplicate stories
  • Kept recommendations focused (don't over-engineer)
  • Prioritized critical and high severity items

Tips

  • Don't go overboard: Focus on likely scenarios, not every theoretically possible edge case
  • Be specific: "User enters > 255 characters in name field" is better than "Input validation"
  • Consider the context: A personal project needs less edge case handling than a banking app
  • Look for patterns: If you find one race condition, there are probably more
  • Think like an attacker: What would someone try to break the system?

sca-trivy

rohunj

Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identifying CVE vulnerabilities in dependencies, container images, IaC misconfigurations, and license compliance risks. Use when: (1) Scanning container images and filesystems for vulnerabilities and misconfigurations, (2) Analyzing dependencies for known CVEs across multiple languages (Go, Python, Node.js, Java, etc.), (3) Detecting IaC security issues in Terraform, Kubernetes, Dockerfile, (4) Integrating vulnerability scanning into CI/CD pipelines with SARIF output, (5) Generating Software Bill of Materials (SBOM) in CycloneDX or SPDX format, (6) Prioritizing remediation by CVSS score and exploitability.

11

pytm

rohunj

Python-based threat modeling using pytm library for programmatic STRIDE analysis, data flow diagram generation, and automated security threat identification. Use when: (1) Creating threat models programmatically using Python code, (2) Generating data flow diagrams (DFDs) with automatic STRIDE threat identification, (3) Integrating threat modeling into CI/CD pipelines and shift-left security practices, (4) Analyzing system architecture for security threats across trust boundaries, (5) Producing threat reports with STRIDE categories and mitigation recommendations, (6) Maintaining threat models as code for version control and automation.

21

test-and-break

rohunj

Autonomous testing skill that opens a deployed app, goes through user flows, tries to break things, and writes detailed bug reports. Use after deploying to staging. Triggers on: test the app, find bugs, QA the deployment, break the app, test staging.

51

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,4071,302

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,2201,024

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

9001,013

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

958658

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

970608

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,033496

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.