api-bug-review

Reviews Express API code for logic bugs and adds Jest regression tests.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/werlang/event-hub --skill api-bug-review-werlang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-bug-review
Source: https://github.com/werlang/event-hub/tree/main/.agents/skills/api-bug-review
Command: npx skills add https://github.com/werlang/event-hub --skill api-bug-review-werlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Auditing an Express API for real defects is slow and error-prone when done ad hoc; this Skill provides a structured review workflow that finds logic bugs, proves them with tests, and locks them down with regression coverage. ## Core Features & Use Cases - Skeptical Bug Review: Systematically inspects routes, middleware, models, and helpers for authorization gaps, state-transition defects, date/time bugs, and contract mismatches. - Regression Test Pairing: Pairs every suspected bug with a deterministic Jest test in api/tests/unit and reruns the suite until it passes 100%. - Severity-Ranked Reporting: Outputs findings ordered by severity with the affected file, root cause, and test coverage status. - Use Case: Before a release, run this Skill over the api/ service to catch issues like guards accepting broader states than documented or background tasks crashing the main process, then fix root causes with tests proving the fix. ## Quick Start Review the API in api/ for logic bugs and add regression tests for anything you find.

Frequently Asked Questions about api-bug-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review an Express API for logic bugs?▼

Scope the routes, middleware, models, and helpers, then read production code first to identify high-risk state transitions and boundaries. For each likely bug, add a focused Jest regression test and rerun the suite until it passes 100%.

What kinds of API bugs should a code review prioritize?▼

Prioritize defects that change behavior, data, permissions, or runtime stability: auth and role enforcement, ownership and moderation transitions, date and time-zone calculations, and background-task boot failures. Skip style-only suggestions without concrete bug risk.

How do I write regression tests for API bugs in Jest?▼

Add a focused test in the unit test directory that reproduces the defective behavior deterministically, then fix the production root cause rather than the symptom. Rerun the full API suite with the test runner until it ends with 100% passing tests.

Why do date and time-zone bugs appear in API code?▼

They commonly arise when helpers convert dates through locale strings and parse them back, or when week-range calculations ignore time zones. Review any code that round-trips dates through string formatting as a priority heuristic.

When should I not use a bug-review workflow like this?▼

Avoid it for style-only refactors or changes without concrete bug risk, since the workflow is optimized for finding and proving real defects. It also reports integration-only gaps separately rather than covering them with unit tests.