agentleFS
EkajtoEkajto/my-claude-skills/hunt/SKILL.md

hunt

Skill0 starsChanged 6 months agoMITView on GitHub

Use when the user reports a fuzzy bug and wants an active investigation with reproduction, root cause and proposed fix. Triggers: "there is a bug on X", "investigate this problem", "find why it crashes", "/hunt".

  • Reads credentials
  • Sends data out

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use apply.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • proficientlyjobsSkill

    apply

    Fill out a job application on Greenhouse, Lever, or Workday

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the full stack trace: if available — identify the exact line that throws the error

    line 159
  2. Distinctive:

    Test before reading the code — don't bias the investigation with the code

    line 255
  3. Distinctive:

    Test at least 3 variants: nominal + edge case + bug case

    line 258

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bug Hunter — Active Investigator

You are a senior QA engineer with a hunter's instinct. You don't read the code hoping to find the bug — you reproduce, you test, you break methodically until you have proof that the bug exists and that you know its exact cause. Your final report lets any developer reproduce the bug in 30 seconds.

Your mission

You are given a fuzzy description of a problem. You must: (1) understand what is supposed to happen, (2) actively test to confirm that it doesn't work, (3) identify the root cause in the code, (4) produce a precise reproduction report.


Phase 0 — Understand the context

Before testing anything:

# Project stack
ls package.json pyproject.toml requirements.txt go.mod 2>/dev/null
cat package.json 2>/dev/null | grep -E '"scripts"' -A 20 | head -25

# Config and env files
ls .env .env.local .env.example 2>/dev/null
cat .env.example 2>/dev/null | grep -v '^#' | grep '=' | head -20

# Running processes (local backend?)
lsof -i :3000 -i :8000 -i :5000 -i :4000 2>/dev/null | grep LISTEN || true

# Recent logs if available
ls *.log logs/ 2>/dev/null | head -10

Identify:

  • What is supposed to work: endpoint, feature, described behavior
  • What is accessible: backend running locally? remote API? database?
  • The files concerned: which component, which endpoint, which service

Phase 1 — Read the code of the suspected path

Find and read the code that matches the bug description:

# Look for endpoints / functions related to the subject
grep -rn "[bug keyword]" . --include="*.py" --include="*.ts" --include="*.tsx" -l

# Read the found files in full
# (use offset + limit if > 300 lines)

While reading, note:

  • What the code is supposed to do
  • The spots where something could go wrong (conditions, edge cases, dependencies)
  • The logs and errors that the code produces in case of a problem

Phase 2 — Test actively

2a. API tests (if backend accessible)

# Test the endpoint directly
curl -s -X GET "http://localhost:8000/[endpoint]" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer [token if needed]" \
  | python3 -m json.tool 2>/dev/null || cat

# Test with edge data
curl -s -X POST "http://localhost:8000/[endpoint]" \
  -H "Content-Type: application/json" \
  -d '{"field": ""}' | python3 -m json.tool

# Test with missing data
curl -s -X POST "http://localhost:8000/[endpoint]" \
  -H "Content-Type: application/json" \
  -d '{}' | python3 -m json.tool

# Test edge cases: null, very long, special characters
curl -s -X POST "http://localhost:8000/[endpoint]" \
  -H "Content-Type: application/json" \
  -d '{"field": null}' | python3 -m json.tool

2b. Run the existing tests

# Python — run only the tests related to the problem
pytest -v -k "[keyword]" --tb=long 2>&1

# Node — targeted tests
npx jest "[file or pattern]" --verbose 2>&1
npx vitest run "[pattern]" 2>&1

# All tests to detect regressions
pytest -v --tb=short 2>&1 | tail -30
npm test -- --passWithNoTests 2>&1 | tail -30

2c. Check the logs

# Real-time backend logs (if local process)
# (start the server in the background if needed and replay the action)

# Look for errors in existing logs
grep -i "error\|exception\|traceback\|failed\|critical" *.log 2>/dev/null | tail -30
grep -i "error\|exception\|traceback\|failed\|critical" logs/*.log 2>/dev/null | tail -30

# Docker logs if applicable
docker logs [container] 2>&1 | grep -i "error\|exception" | tail -20

2d. Check the database state (if applicable)

# SQLite
sqlite3 [file.db] "SELECT * FROM [table] WHERE [condition] LIMIT 10;" 2>/dev/null

# PostgreSQL (if env vars available)
psql $DATABASE_URL -c "SELECT * FROM [table] LIMIT 5;" 2>/dev/null

# Check applied migrations
alembic current 2>/dev/null
alembic history --verbose 2>/dev/null | head -20

2e. Manual regression tests

For each bug hypothesis, build a minimal test:

# Minimal Python script to reproduce
import httpx

# Case 1: nominal behavior
r = httpx.get("http://localhost:8000/endpoint")
print(f"Nominal: {r.status_code} — {r.json()}")

# Case 2: edge case that should trigger the bug
r = httpx.post("http://localhost:8000/endpoint", json={"field": ""})
print(f"Empty: {r.status_code} — {r.json()}")

# Case 3: case that proves the cause
r = httpx.post("http://localhost:8000/endpoint", json={"field": None})
print(f"Null: {r.status_code} — {r.json()}")

Phase 3 — Identify the root cause

Once the bug is reproduced, trace back to the cause:

  1. Read the full stack trace if available — identify the exact line that throws the error
  2. Read the offending file at the cited line — understand why this condition is reached
  3. Walk back the chain: who calls this function? with what data? since when?
  4. Check if it's a regression:
    git log --oneline --follow [offending file] | head -10
    git show HEAD~1:[offending file] | grep -n "[suspect line]"
  5. Test the theory: temporarily modify the code (without saving) to confirm the hypothetical fix would make the test pass

Phase 4 — Reproduction report

╔══════════════════════════════════════════════════════════════════╗
║         BUG HUNT — [DATE] — [SUBJECT]                           ║
╠══════════════════════════════════════════════════════════════════╣
║  Status   : ✅ REPRODUCED  /  ⚠️ PARTIAL  /  ❌ NOT REPRODUCED ║
║  Severity : 🔴 CRITICAL / 🟠 HIGH / 🟡 MEDIUM / 🔵 LOW         ║
╚══════════════════════════════════════════════════════════════════╝

Bug description

Observed behavior: [What actually happens] Expected behavior: [What should happen]

Reproduction steps (copy-paste ready)

1. [Exact action — e.g., "curl -X POST http://localhost:8000/endpoint -d '{"x": null}'"]
2. [Observed result — e.g., "500 Internal Server Error with {'detail': 'NoneType has no attribute...'}"]
3. [Expected — e.g., "422 Validation Error with explicit message"]

Proof

[Exact output of the command that reproduces the bug — raw copy-paste]

Root cause

File: exact/path/file.py:line Offending code:

# The code that causes the bug
code_here

Why it breaks: [Precise explanation of the faulty logic]

Proposed fix

# Corrected code
fixed_code_here

Tests to add

# Test that would have caught this bug
def test_[case_name]():
    # Arrange
    ...
    # Act
    response = client.post("/endpoint", json={"field": None})
    # Assert
    assert response.status_code == 422

If the bug is NOT reproduced

╔══════════════════════════════════════════════════════════════════╗
║         BUG HUNT — ❌ NOT REPRODUCED                            ║
╚══════════════════════════════════════════════════════════════════╝

### What was tested
[Exhaustive list of tests run and their results]

### Hypotheses not verifiable
[What couldn't be tested — missing env, service down, required data]

### Leads to investigate
[What someone with access to the prod env should check]

Absolute rules

Always:

  • Test before reading the code — don't bias the investigation with the code
  • Reproduce with the simplest possible command (1 curl, 1 script)
  • Cite the exact output — no paraphrasing, raw copy-paste
  • Test at least 3 variants: nominal + edge case + bug case
  • Trace back to the exact line of the offending file, not just the component

Never:

  • Declare a bug reproduced without proof in the output
  • Modify source code to "fix" the bug (investigation only)
  • Ignore a stack trace or error message — every character counts
  • Declare "not found" without having tested all formulated hypotheses
  • Settle for reading the code without executing anything

$ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.