Claude-skill-registry aoc-solution-review
Reviews Advent of Code TypeScript solutions for code quality, TypeScript idioms, and performance. Use when asked to review a day's solution, critique AoC code, or get feedback on puzzle implementations.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/aoc-solution-review" ~/.claude/skills/majiayu000-claude-skill-registry-aoc-solution-review && rm -rf "$T"
manifest:
skills/data/aoc-solution-review/SKILL.mdsource content
AoC Solution Review
Reviews Advent of Code solutions with focus on learning TypeScript through practical feedback.
When to Use
- User asks to "review day N"
- User wants feedback on their AoC solution
- User asks for code quality or performance analysis
Review Process
- Run checks: Execute automated validation first
bun test src/days/dayNN.test.ts # Verify tests pass bunx eslint src/days/dayNN.ts # Check for lint errors (no --fix) bunx prettier --check src/days/dayNN.ts # Check formatting - Read the solution: Load
andsrc/days/dayNN.tssrc/days/dayNN.test.ts - Consult the oracle: Ask for a thorough review covering all sections below
- Research algorithms: If the solution uses a notable algorithm (BFS, dynamic programming, etc.), do a brief web search for relevant Wikipedia or reference articles to mention
- Present findings: Organize feedback into the standard sections
Review Sections
1. TypeScript Quality
- Type safety: Identify
, unnecessaryany
assertions, weak unions! - Idiomatic patterns: Suggest modern TS/JS idioms (destructuring, optional chaining, nullish coalescing)
- Naming: Flag unclear variable names, suggest improvements
- Organization: Comment on function size, separation of concerns
2. Code Readability
- Parsing vs logic: Is input parsing cleanly separated from solution logic?
- Comments: Are complex algorithms explained? (But don't over-comment obvious code)
- Magic numbers: Flag unexplained constants
- Control flow: Identify overly nested or confusing logic
3. Performance Analysis
- Complexity: State time/space complexity (e.g., O(n²))
- Hot loops: Identify operations in tight loops that could be optimized
- Data structures: Suggest better structures if applicable (Map vs object, Set vs array)
- Practical balance: Note when optimization isn't worth the complexity
4. Potential Bugs & Edge Cases
- Off-by-one errors: Check loop bounds
- Undefined access: Identify risky array/object accesses
- Empty input: Would the solution handle empty or malformed input?
5. Automated Checks
Report results from the automated checks run in step 1:
- Tests: Pass/fail status
- ESLint: Any errors or warnings
- Prettier: Formatting issues (if any)
6. Algorithm Notes
If a notable algorithm is used, briefly mention:
- What algorithm/technique is being used
- Link to Wikipedia or other reference for further reading
- Whether there's a more efficient approach worth knowing about
7. Suggestions (Prioritized)
List 3-5 concrete improvements, ordered by impact:
- Must fix: Bugs or serious issues
- Should improve: Clear wins for readability or performance
- Consider: Nice-to-haves or learning opportunities
Output Format
## Day N Review ### Automated Checks - Tests: ✓ passed / ✗ failed - ESLint: ✓ clean / [errors] - Prettier: ✓ formatted / [issues] ### TypeScript Quality [findings] ### Readability [findings] ### Performance [findings] ### Edge Cases [findings] ### Algorithm Notes [technique used, reference link, alternatives] ### Suggestions 1. [highest priority] 2. [next priority] ...
Guidelines
- Be direct and matter-of-fact — skip praise and filler
- Explain why something is better, not just what to change
- Reference specific line numbers when pointing out issues
- Never offer to apply fixes — this skill is pedagogic only, not for writing code
- Keep suggestions practical for AoC context (not production-grade over-engineering)
Examples
See
reference/examples.md for calibration examples showing:
- Good vs bad patterns for common issues
- Appropriate feedback tone and specificity
- How to phrase constructive criticism