Edge Case Discovery — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Edge Case Discovery (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill directs the agent to systematically work through a function, API endpoint, or user flow and enumerate all edge cases and boundary conditions that could cause incorrect behavior, errors, or security issues. It applies a structured checklist across multiple dimensions (data types, boundary values, state, concurrency, authorization) and outputs a prioritized list of cases to test or guard against.
Use this before writing tests, during code review, when designing a new feature, or when a production bug makes you wonder "what else could go wrong here."
Copy this file to .agents/skills/edge-case-discovery/SKILL.md in your project root.
Then ask:
Provide the function signature, the code, or a description of the flow.
Add the instructions below to your .cursorrules or paste them into the Cursor AI pane before sharing the function or flow you want analyzed.
Paste the function or flow description and ask Codex to follow the instructions below to generate the edge case list.
When asked to discover edge cases, apply the following checklist systematically. Not every dimension applies to every input — skip the ones that clearly don't apply and note why.
For every numeric input or value in the function/flow:
For every string input:
"")" ", "\t", "\n")' OR 1=1 --<script>alert(1)</script>"null", "undefined", "true", "123"For every collection input:
[], {})null where an object is expectedundefined where a value is expectednull explicitly## Edge Cases for [Function/Endpoint/Flow]
### Critical (must handle — will cause data loss, security issue, or crash)
1. [Edge case] — [Why it's critical] — [What currently happens / what should happen]
### High (should handle — causes incorrect behavior or poor UX)
1. [Edge case] — [Expected behavior]
### Medium (nice to handle — minor issues or uncommon paths)
1. [Edge case] — [Expected behavior]
### Out of scope / acceptable to ignore
1. [Edge case] — [Why it's acceptable to not handle]
### Suggested test cases
[List the top 5–7 cases to write as unit/integration tests, in order of priority]Input to Agent:
"Use the Edge Case Discovery skill on this function: ``ts async function transferFunds(fromAccountId: string, toAccountId: string, amount: number) { const from = await Account.findById(fromAccountId); const to = await Account.findById(toAccountId); from.balance -= amount; to.balance += amount; await from.save(); await to.save(); } ``"Output from Agent:
## Edge Cases for transferFunds>
### Critical 1. `amount` is negative — Caller passes-100, which silently reverses the transfer direction. Should throw a validation error. 2. `fromAccountId === toAccountId` — Transferring to the same account: balance unchanged but operation succeeds silently. May indicate a bug in the caller. 3. Insufficient balance —from.balancegoes negative. No guard exists. Should check balance before deducting. 4. Race condition on concurrent transfers — Two simultaneous transfers from the same account can both read the same balance and both succeed, causing a negative balance. Requires a database transaction with row-level locking. 5. `from.save()` succeeds but `to.save()` fails — Money is deducted from sender but never credited to receiver. The whole operation must be wrapped in a database transaction that rolls back on failure.
>
### High 6. `fromAccountId` or `toAccountId` not found —Account.findByIdreturnsnull, andfrom.balancethrowsCannot read properties of null. Add existence checks. 7. `amount` is `0` — Technically valid but likely a bug in the caller. Consider throwing a validation error. 8. `amount` is `Infinity` or `NaN` — JavaScript will not throw; balance becomesInfinityorNaNsilently.
>
### Suggested test cases 1. Transfer with insufficient balance → expect error thrown, balances unchanged 2. Transfer to self → expect error thrown 3. Transfer with negative amount → expect validation error 4. Either account not found → expect error thrown, no balance changes 5.to.save()throws → expectfrombalance is rolled back
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.