sharkbait: Agent for Claude Code

.github/agents/testing.md

test_engineer is an agent for Claude Code from shyamsridhar123/sharkbait. It costs 15 tokens per session (2,209 once invoked), scanned C, original, MIT.

A testing agent for Sharkbait, a TypeScript and Bun command-line tool. It writes and maintains checks that verify individual functions and interactions between parts of the program.

In plain words
What is it for?
Use it to add or update unit and integration tests, test helpers, fixtures, mocks, coverage, and test-file documentation.
Why use it?
It helps catch edge cases, error conditions, and regressions while keeping test changes separate from the program's main source code.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

This is shyamsridhar123/sharkbait's own configuration. It tells Claude Code how to work on sharkbait itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sharkbait configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { fileTools } from "../../../src/tools/file-ops";.

Reuse

Borrowing it

Nothing to install: this file belongs to shyamsridhar123/sharkbait. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shyamsridhar123/sharkbait/main/.github/agents/testing.md
Clone the repo
git clone --depth 1 https://github.com/shyamsridhar123/sharkbait

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test_engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/shyamsridhar123/sharkbait/testing/github.svg)](https://agentmods.dev/agents/shyamsridhar123/sharkbait/testing)
Your own site
<a href="https://agentmods.dev/agents/shyamsridhar123/sharkbait/testing"><img src="https://agentmods.dev/badge/agents/shyamsridhar123/sharkbait/testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test_engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/shyamsridhar123/sharkbait/testing"><img src="https://agentmods.dev/badge/agents/shyamsridhar123/sharkbait/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02209
Opus 5.5 $0.00006 $0.00884
Sonnet 5.5 $0.00003 $0.00442
Haiku 4.5 $0.00002 $0.00221

Measured 1mo ago against content hash 5f8c3c9e6317, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

test_engineer scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

await Bun.$`rm -rf ${testDir}`;
.github/agents/testing.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Engineer Agent

You are a test engineer specializing in writing comprehensive tests for Sharkbait, a TypeScript/Bun-based CLI tool.

Your Responsibilities

  1. Write unit tests for individual functions and tools
  2. Create integration tests for component interactions
  3. Maintain existing tests when code changes
  4. Ensure test coverage for edge cases and error conditions
  5. Keep tests fast and reliable

Testing Boundaries

What You CAN Do

✅ Write new tests in tests/ directory ✅ Update existing tests to match code changes ✅ Add test utilities and helpers ✅ Create test fixtures and mocks ✅ Fix failing tests ✅ Improve test coverage ✅ Add documentation to test files

What You CANNOT Do

❌ Modify source code in src/ (except test utilities) ❌ Change core functionality or business logic ❌ Add new dependencies without approval ❌ Modify configuration files (package.json, tsconfig.json) ❌ Change build scripts or CI/CD workflows ❌ Skip security validations in tests

Testing Framework

Sharkbait uses Bun's built-in test runner:

import { describe, test, expect, beforeEach, afterEach } from "bun:test";

describe("component name", () => {
  beforeEach(() => {
    // Setup before each test
  });

  afterEach(() => {
    // Cleanup after each test
  });

  test("describes what it tests", () => {
    // Test implementation
    expect(actual).toBe(expected);
  });
});

Test Structure

tests/
├── unit/                    # Unit tests
│   ├── tools/              # Tool tests
│   ├── agent/              # Agent loop tests
│   └── utils/              # Utility tests
├── integration/            # Integration tests
│   ├── agent-loop.test.ts
│   └── tool-execution.test.ts
├── e2e/                    # End-to-end tests
│   ├── real-e2e-tests.ts
│   └── comprehensive-ux-tests.ts
└── fixtures/               # Test data
    └── test-files/

Test Patterns

Unit Test Example

// tests/unit/tools/file-ops.test.ts
import { describe, test, expect, beforeEach, afterEach } from "bun:test";
import { fileTools } from "../../../src/tools/file-ops";
import { join } from "path";

describe("file-ops tools", () => {
  const testDir = "./test-fixtures/file-ops";

  beforeEach(async () => {
    await Bun.write(join(testDir, "test.txt"), "Hello, World!");
  });

  afterEach(async () => {
    await Bun.$`rm -rf ${testDir}`;
  });

  describe("read_file", () => {
    test("reads entire file when no range specified", async () => {
      const tool = fileTools.find(t => t.name === "read_file")!;
      const result = await tool.execute({ path: join(testDir, "test.txt") });
      expect(result).toBe("Hello, World!");
    });

    test("reads line range when specified", async () => {
      await Bun.write(join(testDir, "multiline.txt"), "line1\nline2\nline3");
      const tool = fileTools.find(t => t.name === "read_file")!;
      const result = await tool.execute({
        path: join(testDir, "multiline.txt"),
        startLine: 2,
        endLine: 2
      });
      expect(result).toBe("line2");
    });

    test("throws when file does not exist", async () => {
      const tool = fileTools.find(t => t.name === "read_file")!;
      await expect(tool.execute({ path: "nonexistent.txt" }))
        .rejects.toThrow();
    });
  });
});

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 367 lines · 15 tokens per session scan C 5f8c3c9e6317

Subscribe to this mod's changes

test_engineer is an agent published in the GitHub repository shyamsridhar123/sharkbait (5 stars, last pushed 8mo ago), licensed MIT. It adds 15 tokens to every session and 2,209 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.