edge-case-sweep
Skill98 starsChanged 2 months agoMITView on GitHub
Enumerate edge cases against a fixed checklist — empty, absent, boundaries, huge, weird text, duplicates, repeated/concurrent calls, stale state, time, failing dependencies — before declaring code complete. Use after the happy path of any new or changed function, handler, parser, validator, CLI, or data transformation works, and when reviewing one, before reporting done. Not for test structure or mocking decisions (see test-design).
In this repository38 other files it gives its agents.
- ambiguity-commitSkill
- api-surface-careSkill
- calibrated-recommendationSkill
- codebase-orientationSkill
- concurrency-reasoningSkill
- config-and-flagsSkill
- context-checkpointSkill
- cross-platform-careSkill
- data-loss-guardSkill
- data-migration-safetySkill
- dependency-changesSkill
- docs-as-contractSkill
- environment-firstSkill
- error-message-qualitySkill
- escalate-vs-decideSkill
- estimation-and-scopingSkill
- explain-at-the-right-levelSkill
- generalize-the-correctionSkill
- git-hygieneSkill
- incident-diagnosisSkill
- leave-no-messSkill
- llm-app-codeSkill
- numerical-careSkill
- performance-investigationSkill
- perf-sanitySkill
- question-vs-taskSkill
- resource-lifecycleSkill
- reviewing-a-changeSkill
- root-cause-debuggingSkill
- security-reflexesSkill
- stop-thrashingSkill
- subagent-fanoutSkill
- surgical-refactoringSkill
- task-decompositionSkill
- test-designSkill
- untrusted-content-guardSkill
- verify-ui-visuallySkill
- workmanshipSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Do not add guards for inputs the code cannot receive.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
edge-case-sweep
Weak sweeping looks like: happy path passes, one if (!input) return added, done. Strong sweeping walks a fixed list against every new or changed code path, decides each applicable case, and proves the decision with a run.
Procedure
- List the changed entry points (functions, handlers, commands) and the inputs each receives.
- Walk the checklist below against each. For every case that can reach the code, record one of: handle (a code path exists), reject loudly (specific error, non-zero exit, 4xx — and say what the caller sees), or note (deliberately unhandled, listed in the report). Silent wrong behavior is the one unacceptable outcome.
- For every handle/reject decision, exercise it: run a test or a one-off call with that input and observe the outcome. "Handled" without an observed run is a claim, not a result.
- Do not add guards for inputs the code cannot receive; state the invariant that excludes them instead. Defensive noise hides the real checks.
Checklist
Inputs
- empty:
"",[],{}, zero rows, zero-byte file - absent: null / undefined / missing key / missing flag — distinct from empty, and the distinction must survive the whole path, not just the entry check
- boundaries: 0, -1, exactly-at-limit, limit+1, first and last element, single element
- huge: 10^6 items, multi-GB file, pathologically long string — does it stream or load everything?
- weird text: unicode, emoji, RTL, newlines in fields, quotes, leading/trailing whitespace, case variants, path separators
- duplicates and unsorted order wherever uniqueness or order is assumed
State & time
- called twice (idempotency), called concurrently, retried after partial success — is any output left half-written?
- stale state: file changed since read, record deleted between fetch and update
- timezone, DST, end-of-month/year, leap day, clock skew
Environment
- dependency down / slow / returning errors or malformed data: what does the caller see, and does it time out?
- permissions denied, disk full, network cut mid-operation
Outputs
- the reject path returns the documented type (exception class, status code, exit code), never a success-shaped value with bad contents
- partial results are impossible or clearly marked as partial
Report
List the cases you exercised and the cases you deliberately left unhandled. A stated limitation is fine; a hidden one is a bug report waiting.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

