Loading...
Loading...
Analyzes code for algorithm/data structure correctness, concurrency safety, and edge case handling, producing fitness scores (1-10) across algorithm choice, data structure selection, complexity awareness, concurrency safety, edge case handling, and correctness patterns. Use when the user says /review:review-algorithms, requests an algorithm review, asks about correctness of data structure choices, wants a concurrency safety check, asks about edge case coverage, or wants to verify algorithmic complexity. This is NOT a performance review -- it asks "is this correct and appropriate?" not "is this fast enough?" Only reports findings with confidence >= 7/10.
npx skill4agent add jeffabailey/skills review-algorithmsreferences/rubric.mdreferences/checklist.mdreferences/wisdom.mdgrep -n "^### " references/wisdom.mdfitness-config.jsonpython3 "${CLAUDE_SKILL_DIR}/../../scripts/fitness-config.py" show --path <target>${CLAUDE_SKILL_DIR}scripts/SKILL.md<target>Config:Effective weights:effective<!-- BEGIN_EFFECTIVE_CONFIG_JSON --><!-- END_EFFECTIVE_CONFIG_JSON -->references/rubric.mdreferences/checklist.mdN/A -- <reason>[:n][:n+1]zipreferences/checklist.mdnull[]"1"1PYTHONHASHSEEDreferences/rubric.mdreferences/rubric.mdreferences/rubric.mdreferences/checklist.mddocs/algorithms-review.mddocs/algorithms-review-<scope-slug>.mddocs/algorithms-review-scripts-fitness-config.md# Algorithm & Data Structure Fitness Review
**Target:** <path(s) or scope reviewed>
Config: <copied from resolver output>
Effective weights: <copied from resolver output>
## Direct Answer
(Only when the user asked specific questions. Answer each in one to three sentences, citing the finding numbers below.)
## Summary
Overall fitness score: X.X / 10 (mean of <named scored dimensions>; status <band>)
| Dimension | Score | Key Finding |
|-----------|-------|-------------|
| Algorithm Choice | X/10 | ... |
| Data Structure Selection | X/10 | ... |
| Complexity Awareness | X/10 | ... |
| Concurrency Safety | X/10 or N/A -- reason | ... |
| Edge Case Handling | X/10 | ... |
| Correctness Patterns | X/10 | ... |
## Detailed Findings
### Finding 1: [Title]
- **Severity:** CRITICAL / HIGH / MEDIUM / LOW
- **Confidence:** X/10
- **Dimension:** [which scoring dimension]
- **Location:** file:line
- **Description:** What the issue is and why it matters.
- **Evidence:** The specific code pattern found.
- **Reproduction:** (required for HIGH/CRITICAL) command or snippet run, and the observed output.
- **Impact:** What goes wrong, and on which input.
- **Remediation:** Concrete fix with code example or specific steps.
(repeat for each finding, ordered by severity)
### Algorithm Choice (X/10)
- Evidence: file:line references, including what was checked and found sound
- Issues found
- Recommendations
(repeat for each dimension; for N/A dimensions give the reason and evidence of absence)
## Top Action Items (up to 5, by impact)
1. [CRITICAL/HIGH/MEDIUM] Description -- file:line
2. ...
## Reference
Based on [Fundamentals of Algorithms](https://jeffbailey.us/blog/2025/12/04/fundamentals-of-algorithms/), [Fundamental Algorithmic Patterns](https://jeffbailey.us/blog/2025/12/12/fundamental-algorithmic-patterns/), [Fundamental Data Structures](https://jeffbailey.us/blog/2025/12/10/fundamental-data-structures/), and guidance from https://jeffbailey.us/categories/fundamentals/