.cursor/skills/gap-analysis/SKILL.md
Find gaps, stubs, broken workflows, and incomplete features in code. Use before implementing features (to find implicit requirements) or for code audits (to find TODO, FIXME, empty handlers, broken workflows). Keywords - gap analysis, audit, find stubs, incomplete, broken workflow.
npx skillsauth add dmitryprg-ai/cursor-develop-autorules gap-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find implicit requirements and incomplete code. 90% of AI failures are due to specification gaps.
## EXPLICIT REQUIREMENTS
**Task:** [one sentence]
**What's specified:**
- [ ] [requirement 1 -- quote]
- [ ] [requirement 2 -- quote]
**Constraints:** [limitations]
Check each category:
| Category | Questions | Example Gaps | |----------|-----------|-------------| | Data | Formats? Null/empty? Boundaries? | max length, encoding, special chars | | UX | Loading state? Error state? Empty state? | skeleton, retry button, placeholder | | Integration | What else affected? Side effects? | cache invalidation, events | | Security | Access rights? Validation? | authorization, input sanitization | | Performance | Data volume? Pagination? | batch limits, timeouts | | Errors | What if fails? Retry? | graceful degradation, error messages |
Ask: "A week passed, the feature broke. Why?"
## GAP ANALYSIS REPORT
### Category: [DATA/UX/ERRORS/etc]
| # | GAP | Severity | Action |
|---|-----|----------|--------|
| 1 | [description] | HIGH/MED/LOW | [what to do] |
### TOTALS:
- HIGH (blockers): [count]
- MED (desirable): [count]
- LOW (later): [count]
For HIGH gaps -- ASK user, don't assume!
Run scan script for automated detection:
bash .cursor/skills/gap-analysis/scripts/scan-gaps.sh
| Check | How to find | GAP if |
|-------|-------------|--------|
| Buttons without actions | onClick={() => {}} | Button does nothing |
| Forms without submit | onSubmit missing or empty | Form doesn't send data |
| Links to nowhere | href="#" or href="" | Link leads nowhere |
| Loading without timeout | isLoading without error boundary | May hang forever |
| Error without recovery | catch {} empty | Error swallowed |
| Partial CRUD | Create exists but no Update/Delete | Incomplete |
## FEATURE COMPLETENESS
| Feature | Create | Read | Update | Delete | Status |
|---------|--------|------|--------|--------|--------|
| [Entity] | ok/no | ok/no | ok/no | ok/no | COMPLETE/INCOMPLETE |
| Severity | Criteria | Action | |----------|----------|--------| | HIGH | Without it, feature doesn't work | BLOCKER -- fix before implementation | | MED | Works but bad UX/quality | Fix during implementation | | LOW | Nice-to-have | Backlog or ask user |
Before creating a new feature:
rg "X" -- maybe it already exists?rg "TODO.*X" -- maybe there's a stub?If found stub -> COMPLETE existing, don't create new!
development
Scan codebase for technical debt and fix safely with TDD. Use to find oversized files, duplicated code, code smells, and refactor safely. Workflow - SCAN, TEST CASES, REFACTOR, VERIFY. Keywords - techdebt, tech debt, duplicates, code quality audit.
development
Test-Driven Development workflow with strict Red-Green-Refactor cycle. Use when developing features with TDD, writing tests before code, or when test-driven approach is needed. MANDATORY order - test cases table BEFORE code, failing tests BEFORE implementation.
testing
Review work session quality and capture improvements. Use at end of session, after large tasks, after series of errors, or when user asks for session review, retrospective, lessons learned. Records improvements to backlog.
data-ai
Analyze data, investigate datasets, work with CSV/parquet/pandas/dataframes. Use when analyzing data, exploring datasets, running experiments, or when user mentions data, analysis, parquet, csv, pandas, dataframe, statistics, investigation.