# Edge Case Coverage

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-viktorbezdek-skillstack-edge-case-coverage`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [viktorbezdek](https://agentstack.voostack.com/s/viktorbezdek)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [viktorbezdek](https://github.com/viktorbezdek)
- **Source:** https://github.com/viktorbezdek/skillstack/tree/main/edge-case-coverage/skills/edge-case-coverage

## Install

```sh
agentstack add skill-viktorbezdek-skillstack-edge-case-coverage
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Edge Case Coverage

Systematically identify and handle boundary conditions.

## Decision Tree: Which Edge Case Category?

```
What kind of edge case are you looking for?
├─ Input validation? → Check null, wrong type, empty, overflow, malformed
├─ Boundary values? → Check 0, 1, min, max, just-above, just-below
├─ State transitions? → Check uninitialized, concurrent, stale, partial
├─ Resource limits? → Check timeout, OOM, disk full, connection pool exhaustion
├─ Network failures? → Check offline, slow, partial failure, retry exhaustion
├─ Permission issues? → Check unauthorized, expired, revoked, insufficient scope
└─ Multi-system interaction? → Check race conditions, ordering, idempotency
```

## Edge Case Categories

| Category | Examples | Detection Heuristic |
|----------|----------|---------------------|
| Boundary | 0, 1, max, min, empty | Any numeric or size parameter |
| Input | null, undefined, wrong type | Any external-facing function |
| State | uninitialized, concurrent, stale | Any stateful operation |
| Resource | timeout, no memory, disk full | Any I/O or long-running operation |
| Network | offline, slow, partial failure | Any remote call |
| Permission | unauthorized, expired, revoked | Any auth-gated operation |

## Boundary Analysis

### Numeric Boundaries
```
Value: age
├── Below min: -1
├── At min: 0
├── Just above min: 1
├── Normal: 25
├── Just below max: 119
├── At max: 120
└── Above max: 121
```

### String Boundaries
```
Value: username
├── Empty: ""
├── Single char: "a"
├── Max length: "a" * 255
├── Over max: "a" * 256
├── Special chars: "user@#$"
└── Unicode: "user"
```

## Error Scenario Template

```markdown
## Scenario: [Name]

**Trigger**: [What causes it]
**Symptoms**: [What user sees]
**Root cause**: [Why it happens]
**Prevention**: [How to avoid]
**Recovery**: [How to fix]
```

## Validation Checklist

### Input Validation
- [ ] Required fields present
- [ ] Type correct
- [ ] Format valid (email, URL, etc.)
- [ ] Range within bounds
- [ ] Length within limits
- [ ] Characters allowed

### State Validation
- [ ] Object initialized
- [ ] Resources available
- [ ] Permissions granted
- [ ] Dependencies met
- [ ] No conflicts

## Coverage Matrix

| Input | Valid | Empty | Null | Overflow | Malformed |
|-------|-------|-------|------|----------|-----------|
| Name | [x] | [x] | [x] | [x] | [x] |
| Email | [x] | [x] | [x] | [x] | [x] |
| Age | [x] | [x] | [x] | [x] | [x] |

## Anti-Patterns

- **Happy path only** — designing and testing only the expected flow; every production failure starts as an edge case someone assumed would not happen
- **Ignoring nulls** — null is the most common edge case in production; always handle explicitly
- **Assuming valid input** — external input is never trustworthy; validate at the boundary
- **Missing timeout handling** — every network or I/O operation must have a timeout; without one, the system hangs indefinitely
- **Silent failures** — swallowing errors without logging or surfacing hides bugs until they cascade
- **Testing only one layer** — edge cases at the integration boundary (API + DB, UI + API) are the most common production failures
- **Forgetting idempotency** — retries on failed operations cause duplicates if endpoints are not idempotent

## When to Use

- Before implementing a feature — identify edge cases in the spec
- During code review — check for unhandled boundaries
- When hardening an existing system — systematic enumeration of failure modes
- When writing error handling — ensure all categories are covered

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [viktorbezdek](https://github.com/viktorbezdek)
- **Source:** [viktorbezdek/skillstack](https://github.com/viktorbezdek/skillstack)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-viktorbezdek-skillstack-edge-case-coverage
- Seller: https://agentstack.voostack.com/s/viktorbezdek
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
