Agent skill

Bug Hunt

by Use-Tusk in Use-Tusk/drift-node-sdk

Hunt for instrumentation bugs by analyzing code gaps and running e2e tests through DISABLED/RECORD/REPLAY cycle

Apache-2.0Auto-check passedTesting & QA

Install Bug Hunt

skills CLI
$ npx skills add Use-Tusk/drift-node-sdk --skill bug-hunt -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Use-Tusk/drift-node-sdk bug-hunt --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Use-Tusk/drift-node-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/bug-hunt .claude/skills/bug-hunt && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bug-hunt
GitHub stars
173
Token cost
~3.6k tokens
SKILL.md length
1,182 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Hunt for instrumentation bugs by analyzing code gaps and running e2e tests through DISABLED/RECORD/REPLAY cycle

  • Works in 7 steps: Environment Setup → Develop Understanding → Identify Potential Gaps → …
  • Tasks that involve End-to-end testing
  • SKILL.md covers Arguments, Library-to-GitHub-Repo Mapping, E2E Test Variants and Phase 0: Environment Setup, plus 7 more sections
  • Calls docker, git and npm

What it does

Bug Hunt is an agent skill from Use-Tusk/drift-node-sdk. Hunt for instrumentation bugs by analyzing code gaps and running e2e tests through DISABLED/RECORD/REPLAY cycle

Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing. It works with Node.js, Testing Library, TypeScript and Redis. The repository describes itself as: Node.js SDK for capturing and replaying API calls made to/from your service. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve End-to-end testing

Example prompts

  • “/bug-hunt”

Requirements

  • Node.js
  • Docker

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Environment Setup
  2. Develop Understanding
  3. Identify Potential Gaps
  4. Initialize Bug Tracking Document
  5. Write Tests and Verify Issues
  6. Bug Tracking Documentation Format
  7. Cleanup and Commit

What it can do on your machine

Read from SKILL.md and the folder at commit 6b2016d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker
    • git
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bug Hunt loads about 3.6k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 1,182 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Use-Tusk/drift-node-sdk at commit 6b2016d, republished under its Apache-2.0 licence (© Use-Tusk). 1,182 words, ~3,626 tokens.

Download SKILL.mdSave it as .claude/skills/bug-hunt/SKILL.md (or your agent's skills folder).
name
bug-hunt
description
Hunt for instrumentation bugs by analyzing code gaps and running e2e tests through DISABLED/RECORD/REPLAY cycle
disable-model-invocation
true

Instrumentation Bug Hunting

Arguments

$ARGUMENTS - The library name, optionally followed by focus context.

Format: <library> [focus on <area>]

Examples:

  • /bug-hunt redis — broad bug hunting across all redis functionality
  • /bug-hunt redis focus on pub sub interactions — prioritize pub/sub patterns
  • /bug-hunt mysql2 focus on prepared statements and transactions — prioritize those areas

Parsing: The first word of $ARGUMENTS is always the library name. Everything after it is the optional focus context. All references to <library> below mean this parsed first word — NOT the raw $ARGUMENTS string.

Library-to-GitHub-Repo Mapping

Use this mapping to clone the package source code for analysis:

LibraryGitHub RepoNotes
mysql2https://github.com/sidorares/node-mysql2
redishttps://github.com/redis/node-redisMonorepo — focus on packages/client/
pghttps://github.com/brianc/node-postgresMonorepo — focus on packages/pg/
mongodbhttps://github.com/mongodb/node-mongodb-native
ioredishttps://github.com/redis/ioredis
postgreshttps://github.com/porsager/postgres(postgres.js)
prismahttps://github.com/prisma/prismaMonorepo — focus on packages/client/
firestorehttps://github.com/googleapis/nodejs-firestore
grpchttps://github.com/grpc/grpc-nodeMonorepo — focus on packages/grpc-js/
fetchN/ABuilt-in Node.js API — no repo to clone
httpN/ABuilt-in Node.js API — no repo to clone
mysqlhttps://github.com/mysqljs/mysql
nextjshttps://github.com/vercel/next.jsMonorepo — focus on packages/next/
upstash-redis-jshttps://github.com/upstash/redis-js

E2E Test Variants

Each library has ESM and CJS variants. Use the CJS variant as the primary target for bug hunting:

LibraryCJS variant path
mysql2src/instrumentation/libraries/mysql2/e2e-tests/cjs-mysql2/
redissrc/instrumentation/libraries/redis/e2e-tests/cjs-redis/
pgsrc/instrumentation/libraries/pg/e2e-tests/cjs-pg/
mongodbsrc/instrumentation/libraries/mongodb/e2e-tests/cjs-mongodb/
ioredissrc/instrumentation/libraries/ioredis/e2e-tests/cjs-ioredis/
postgressrc/instrumentation/libraries/postgres/e2e-tests/cjs-postgres/
prismasrc/instrumentation/libraries/prisma/e2e-tests/cjs-prisma/
firestoresrc/instrumentation/libraries/firestore/e2e-tests/cjs-firestore/
grpcsrc/instrumentation/libraries/grpc/e2e-tests/cjs-grpc/
fetchsrc/instrumentation/libraries/fetch/e2e-tests/cjs-fetch/
httpsrc/instrumentation/libraries/http/e2e-tests/cjs-http/
mysqlsrc/instrumentation/libraries/mysql/e2e-tests/cjs-mysql/
nextjssrc/instrumentation/libraries/nextjs/e2e-tests/cjs-nextjs/
upstash-redis-jssrc/instrumentation/libraries/upstash-redis-js/e2e-tests/cjs-upstash-redis-js/

Phase 0: Environment Setup

0.1 Parse and validate the arguments

Extract the library name (first word) and optional focus context (remaining words) from the arguments.

The library must be one of: fetch, firestore, grpc, http, ioredis, mongodb, mysql, mysql2, nextjs, pg, postgres, prisma, redis, upstash-redis-js.

If the library is invalid, list the valid options and stop.

If focus context is provided, it will guide Phases 1 and 2 to prioritize that area of the library's functionality.

0.2 Docker Setup (Claude Code Web only)

Check if Docker is running. If not, start it:

bash
dockerd --storage-driver=vfs &>/tmp/dockerd.log &
# Wait for Docker to be ready
for i in $(seq 1 30); do
  docker info &>/dev/null 2>&1 && break
  sleep 1
done
docker info &>/dev/null 2>&1 || { echo "Docker failed to start. Check /tmp/dockerd.log"; exit 1; }

If Docker is already running, skip this step.

0.3 Clone the package source code (for analysis only)

If the library has a GitHub repo (see mapping above), clone it for reference:

bash
git clone --depth 1 <repo-url> /tmp/<library-name>-source

This is read-only reference material — you will NOT modify this repo.

0.4 Create a working branch

Skip this step if you are already on a dedicated branch (e.g., in Claude Code Web where each session has its own branch).

bash
git checkout -b bug-hunt/<library>-$(date +%Y-%m-%d)

Phase 1: Develop Understanding

If focus context was provided, prioritize your analysis around that area. For example, if the focus is "pub sub interactions", concentrate on pub/sub-related code paths in the instrumentation, tests, and package source.

1.1 Analyze the Instrumentation Code

Read the instrumentation code at:

src/instrumentation/libraries/<library>/Instrumentation.ts

Identify:

  • Which functions from the package are patched/instrumented
  • The patching strategy (what gets wrapped, when, and how)
  • Any helper files in the same directory
  • If focus context provided: Which patches relate to the focus area, and what's missing?
1.2 Analyze Existing E2E Tests

Review the CJS variant's test files:

  • src/instrumentation/libraries/<library>/e2e-tests/cjs-<library>/src/index.ts — all test endpoints
  • src/instrumentation/libraries/<library>/e2e-tests/cjs-<library>/src/test_requests.mjs — which endpoints are called

Understand what functionality is already tested and identify coverage gaps.

  • If focus context provided: What tests already exist for the focus area? What's missing?
1.3 Analyze the Package Source Code

If you cloned the package source, read it to understand:

  • The package's entry points and full API surface
  • Functions that are currently patched vs functions that exist but aren't patched
  • Alternative call patterns, overloads, and edge cases
  • If focus context provided: Deep-dive into the focus area's API surface and usage patterns

Phase 2: Identify Potential Gaps

If focus context was provided, prioritize bugs related to that area. You may still note other potential issues, but test the focus area first.

Reason about potential issues. Consider:

  • Untested parameters: Parameter combinations not covered by existing tests
  • Alternative call patterns: Can patched functions be invoked differently (callbacks vs promises, different overloads)?
  • Missing patches: Functions that should be instrumented but aren't
  • Edge cases: Null/undefined values, empty results, large payloads, streaming, connection errors
  • ORM/wrapper usage: Libraries like Sequelize, Knex, Prisma that wrap the base driver — are those call paths instrumented?
  • Real-world usage patterns: How is the package typically used in production apps?

Produce a prioritized list of potential bugs to investigate.


Phase 3: Initialize Bug Tracking Document

Create BUG_TRACKING.md in the CJS e2e test directory:

bash
# Path: src/instrumentation/libraries/<library>/e2e-tests/cjs-<library>/BUG_TRACKING.md
markdown
# <library> Instrumentation Bug Tracking

Generated: <current date and time>

## Summary

- Total tests attempted: 0
- Confirmed bugs: 0
- No bugs found: 0
- Skipped tests: 0

---

## Test Results

(Tests will be documented below as they are completed)

Phase 4: Write Tests and Verify Issues

For each potential bug, follow this workflow:

4.1 Initial Setup (Once)

Navigate to the CJS e2e test directory:

bash
cd src/instrumentation/libraries/<library>/e2e-tests/cjs-<library>/

Start Docker containers:

bash
docker compose up -d --build --wait

Install dependencies:

bash
docker compose exec -T app npm install
Show full SKILL.md (475 more words)Show less
4.2 Test Each Potential Bug (Repeat for each)
A. Clean Previous Test Data
bash
rm -rf .tusk/traces/* .tusk/logs/*
B. Write New Test Endpoint

Add a new endpoint to src/index.ts that exercises the potential bug. Also add the corresponding request to src/test_requests.mjs.

Example:

typescript
app.get("/test/my-new-test", async (req, res) => {
  // Your test code here
  res.json({ success: true });
});
C. Test in DISABLED Mode (No Instrumentation)

Start server without instrumentation:

bash
docker compose exec -d -e TUSK_DRIFT_MODE=DISABLED app sh -c "npm run build && npm run dev"

Wait for server to start:

bash
sleep 5

Hit the endpoint:

bash
docker compose exec app curl -s http://localhost:3000/test/my-new-test

Verify: Response is correct and endpoint works.

Stop the server:

bash
docker compose exec app pkill -f "node" || true
sleep 2

If the endpoint fails in DISABLED mode:

  • Update BUG_TRACKING.md with status: "Skipped - Failed in DISABLED mode"
  • Fix the test code or move on to next potential bug
D. Test in RECORD Mode (With Instrumentation)

Clean traces and logs:

bash
rm -rf .tusk/traces/* .tusk/logs/*

Start server in RECORD mode:

bash
docker compose exec -d -e TUSK_DRIFT_MODE=RECORD app sh -c "npm run build && npm run dev"

Wait for server to start:

bash
sleep 5

Hit the endpoint:

bash
docker compose exec app curl -s http://localhost:3000/test/my-new-test

Wait for spans to export:

bash
sleep 3

Stop the server:

bash
docker compose exec app pkill -f "node" || true
sleep 2

Check for issues:

  1. Endpoint returns error or wrong response vs DISABLED mode:

    • BUG FOUND: Instrumentation breaks functionality
    • Update BUG_TRACKING.md: Status "Confirmed Bug - RECORD mode failure", Failure Point "RECORD"
    • Keep the endpoint, move to next
  2. No traces created (ls .tusk/traces/):

    • BUG FOUND: Instrumentation failed to capture traffic
    • Update BUG_TRACKING.md: Status "Confirmed Bug - No traces captured", Failure Point "RECORD"
    • Keep the endpoint, move to next
E. Test in REPLAY Mode

Run the Tusk CLI to replay:

bash
docker compose exec -T -e TUSK_ANALYTICS_DISABLED=1 app tusk drift run --print --output-format "json" --enable-service-logs --disable-sandbox

Check for issues:

  1. Test fails ("passed": false in JSON output):

    • BUG FOUND: Replay doesn't match recording
    • Update BUG_TRACKING.md: Status "Confirmed Bug - REPLAY mismatch", Failure Point "REPLAY"
  2. No logs created (ls .tusk/logs/):

    • BUG FOUND: Replay failed to produce logs
    • Update BUG_TRACKING.md: Status "Confirmed Bug - No replay logs", Failure Point "REPLAY"
  3. Logs contain TCP warnings:

    bash
    docker compose exec app cat .tusk/logs/*.log | grep -i "TCP called from inbound request context"
    • BUG FOUND: Unpatched dependency detected
    • Update BUG_TRACKING.md: Status "Confirmed Bug - Unpatched dependency", Failure Point "REPLAY"
F. No Bug Found

If all modes pass with no issues:

  • Update BUG_TRACKING.md: Status "No Bug - Test passed all modes"
  • Remove the test endpoint from src/index.ts and src/test_requests.mjs
  • Move to next potential bug

Phase 5: Bug Tracking Documentation Format

After each test, append to BUG_TRACKING.md:

markdown
### Test N: [Brief description]

**Status**: [Confirmed Bug | No Bug | Skipped]

**Endpoint**: `/test/endpoint-name`

**Failure Point**: [DISABLED | RECORD | REPLAY | N/A]

**Description**:
[What this test was trying to uncover]

**Expected Behavior**:
[What should happen]

**Actual Behavior**:
[What actually happened]

**Error Logs**:

[Relevant error messages, stack traces, or warnings]


**Additional Notes**:
[Observations, potential root causes, context]

---

Important: Update BUG_TRACKING.md immediately after each test — do not batch updates.


Phase 6: Cleanup and Commit

After testing all potential bugs:

bash
docker compose down

Clean up cloned package source:

bash
rm -rf /tmp/*-source

Final state of the e2e test files:

  • src/index.ts should contain ONLY the original endpoints + new endpoints that expose confirmed bugs
  • src/test_requests.mjs should be updated to include requests to bug-exposing endpoints
  • BUG_TRACKING.md should have accurate summary counts and all test results

Commit the changes:

bash
git add src/instrumentation/libraries/<library>/e2e-tests/cjs-<library>/
git commit -m "bug-hunt(<library>): add e2e tests exposing instrumentation bugs

Found N confirmed bugs in <library> instrumentation.
See BUG_TRACKING.md for details."

Push the branch (skip if in Claude Code Web where the session handles this):

bash
git push origin bug-hunt/<library>-$(date +%Y-%m-%d)

Success Criteria

  1. Created BUG_TRACKING.md before starting any tests
  2. Tested all identified potential bugs
  3. Updated BUG_TRACKING.md after each individual test
  4. Only bug-exposing endpoints remain in test files
  5. Removed test endpoints that didn't expose bugs
  6. Accurate summary counts in BUG_TRACKING.md
  7. Changes committed and pushed to a bug-hunt/ branch

© Use-Tusk, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/bug-hunt of Use-Tusk/drift-node-sdk.

Open the folder on GitHubat commit 6b2016d

Compare with similar skills

Bug Hunt next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bug Hunt compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bug Hunt this skillUse-Tusk/drift-node-sdk173—~3.6kAutomated safety check: PassApache-2.0
E2E Testcrowdin/crowdin-api-client-js139—~893Automated safety check: NotesMIT
Testingar-io/ar-io-node127—~2.6kAutomated safety check: NotesAGPL-3.0
Frontmcp Guidesagentfront/frontmcp146—~6.3kAutomated safety check: PassApache-2.0
Frontend Typescript Testingshinpr/ai-coding-project-boilerplate233—~1.5kAutomated safety check: PassMIT
Test CommanderEliasOulkadi/shokunin114—~3kAutomated safety check: NotesMIT

Similar skills

  • E2E Test

    crowdin/crowdin-api-client-js

    Run end-to-end tests against the real Crowdin or Crowdin Enterprise API using credentials from .env.

    139 GitHub stars~893 tokensUpdated 2 days ago
    Testing & QAAuto-check: notes
  • Testing

    ar-io/ar-io-node

    Decision guide for testing in the ar-io-node repo — which test layer to use, how to run it, and which helpers to reach for.

    127 GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Frontmcp Guides

    agentfront/frontmcp

    Tutorials, end-to-end walkthroughs, and complete reference projects for FrontMCP.

    146 GitHub stars~6.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Frontend Typescript Testing

    shinpr/ai-coding-project-boilerplate

    Designs frontend tests using the repository's configured React test and browser harnesses, including RTL, MSW, Vitest, and Playwright when present.

    233 GitHub stars~1.5k tokensUpdated 5 days ago
    Testing & QAAuto-check passed
  • Test Commander

    EliasOulkadi/shokunin

    Generate unit, integration, E2E, and visual regression tests following the Testing Trophy methodology (80% integration).

    114 GitHub stars~3k tokensUpdated 4 days ago
    Testing & QAAuto-check: notes
  • Typescript Testing

    macalbert/envilder

    Mandatory testing conventions for TypeScript stacks (Vitest for CLI/SDK/Website/CDK).

    138 GitHub stars~2.2k tokensUpdated 4 days ago
    Testing & QAAuto-check passed

Categories

Questions about Bug Hunt

What does Bug Hunt do?

Hunt for instrumentation bugs by analyzing code gaps and running e2e tests through DISABLED/RECORD/REPLAY cycle. Bug Hunt is an agent skill from Use-Tusk/drift-node-sdk.

When should I use Bug Hunt?

Bug Hunt fits situations like: tasks that involve End-to-end testing.

How do I install Bug Hunt in Claude Code?

Run `npx skills add Use-Tusk/drift-node-sdk --skill bug-hunt -a claude-code`. Or copy the skill folder (.claude/skills/bug-hunt in Use-Tusk/drift-node-sdk) into .claude/skills/bug-hunt in your project. Claude Code loads it when a task matches its description.

How do I install Bug Hunt in Codex?

Run `npx skills add Use-Tusk/drift-node-sdk --skill bug-hunt -a codex`. Or copy the skill folder (.claude/skills/bug-hunt in Use-Tusk/drift-node-sdk) into .agents/skills/bug-hunt in your project. Codex loads it when a task matches its description.

Can I use Bug Hunt in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Use-Tusk/drift-node-sdk --skill bug-hunt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bug-hunt, .gemini/skills/bug-hunt, .github/skills/bug-hunt and .opencode/skills/bug-hunt in your project.

What does Bug Hunt need to run?

Going by SKILL.md and its folder, Bug Hunt needs the command-line tools its instructions call (docker, git and npm). Our summary lists: Node.js; Docker.

Does Bug Hunt access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Bug Hunt safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bug Hunt use?

Bug Hunt is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bug Hunt use?

About 3.6k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bug Hunt?

Skills that share tags, products or a category with Bug Hunt: E2E Test (crowdin/crowdin-api-client-js, 139 stars), Testing (ar-io/ar-io-node, 127 stars), Frontmcp Guides (agentfront/frontmcp, 146 stars) and Frontend Typescript Testing (shinpr/ai-coding-project-boilerplate, 233 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bug Hunt?

Use-Tusk (a GitHub organization) maintains it in Use-Tusk/drift-node-sdk, which has 173 GitHub stars. The repository was last updated on May 7, 2026.

Source: Use-Tusk/drift-node-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.