sidorares/node-mysql2/code-review

Claude Code and agent skill by sidorares/node-mysql2

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install sidorares/node-mysql2/code-review

SKILL.md

The same SKILL.md was published earlier as sidorares/node-mysql2/code-review.

MySQL2 — Pull Request Review Skill

The review checklist for MySQL2 pull requests. Read it before reviewing a pull request, a diff, or a branch.

Never approve a PR that violates an item below without first alerting the author.

General

  1. Tests: every bug fix and every new feature ships with tests, and the tests for a fix must fail without it.
  2. Documentation: every new feature is documented under website/docs/.
  3. Node 14 compatibility: Node 14 is the minimum supported runtime, whatever the engines field declares.
  4. Breaking changes: flag anything that can change existing behavior, even in a patch or a minor feature. The change itself is not an error, an unintentional semver violation is. A change to an existing test is the strongest signal there is, so read it closely for regressions.
  5. Comments: ask for a better implementation, never for a better explanation.
  • An obvious comment is a finding on its own.
  • Comment length measures the code underneath it. The more explanation it needs, the worse it usually is.
  • A comment that explains the implementation is replaced by clear names, decoupled functions with a defined scope, and proper abstractions.

Tests

  1. Connection scope: end(), close(), destroy(), and release() belong in a scope outside the assertions. The wrong shapes are not obvious, so check them against the section below.
  2. `process.exit`: a conditional skip uses Poku's skip.
  3. `new Promise` with `setTimeout`: waiting uses Poku's sleep.
  4. `node:assert` and `node:test`: assertions and test structure come from poku, and strict replaces assert.
  5. `as unknown as` and `any`: never in test files.
  6. `@ts-expect-error`: only // @ts-expect-error: internal access or // @ts-expect-error: TODO: implement typings, and only when the type error is unrelated to the contribution. When it is related, the fix belongs in /typings.
  7. Timer-dependent tests: waiting on an internal timer is flaky in CI, so the test asserts the state synchronously or calls the internal method directly.
  8. Promise-based API: new tests prefer .promise(). Callbacks stay for events, streams, anything the promise API does not cover, and features that genuinely need both modes. A recommendation, not a rule.
  9. `async`/`await`: describe, it, and test are awaited only when the callback is asynchronous.

Types

  1. Typings structure: types follow the existing structure in /typings and never land in an arbitrary location. See the `/types` skill for the architecture and the known gaps.

Connection scope

The most frequent contributor mistake, and the most expensive: a failing assertion skips the teardown and the test process hangs until CI times out. Both wrong shapes below read as correct at a glance, so compare the diff against them directly.

ts
// ❌ Wrong: end() sits in the same scope as the assertion
await describe('test', async () => {
await it('should do something', async () => {
const connection = await createConnection(); // same for pool or cluster connections
assert(false);
await connection.end(); // never reached
});
// process hangs
});
// ❌ Wrong: try-finally is a workaround, not a fix
await describe('test', async () => {
await it('should do something', async () => {
const connection = await createConnection();
try {
assert(false);
} finally {
await connection.end();
}
});
// process hangs
});
// ✅ Correct: end() in an outer scope
await describe('test', async () => {
const connection = await createConnection();
it('should do something', () => {
assert(false); // fails in its own scope
});
await connection.end(); // always reached
});
  • Every teardown method and every connection type is affected: close, end, destroy, release, on Connection, Pool, PoolCluster, and the rest.
  • Each connection is isolated by a nested or dedicated describe.
  • Callbacks fail the same way, with the teardown buried in a nested callback that a failing assertion prevents from ever running.
  • await conn.promise().end() replaces wrapping a callback in new Promise.

Verifying the branch

sh
npm run lint # lint and formatting
npm run typecheck # type-check the project
npm test # full suite, or FILTER=path/to/test.mts npx poku for a single file
npm run test:build # build check

Integration and global tests need a running MySQL with a test database. The global suite runs sequentially and needs elevated privileges, and Poku skips those files when hasPrivileges() fails, so a green local run does not prove they were exercised.

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4,382
Repository forks
676
7-day trend score
42

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sidorares/node-mysql2/code-review/badge)](https://verified-skill.com/skills/sidorares/node-mysql2/code-review)

Something wrong with this skill or its page? Tell us.