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.
curl -O https://raw.githubusercontent.com/shyamsridhar123/sharkbait/main/.github/agents/testing.mdgit clone --depth 1 https://github.com/shyamsridhar123/sharkbaitWrote 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.
[](https://agentmods.dev/agents/shyamsridhar123/sharkbait/testing)<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.
<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>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.
| Model | Per session | Once 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 |
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}`; 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
- Write unit tests for individual functions and tools
- Create integration tests for component interactions
- Maintain existing tests when code changes
- Ensure test coverage for edge cases and error conditions
- 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();
});
});
});
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.
- 1mo ago First seen · 367 lines · 15 tokens per session scan C 5f8c3c9e6317
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.
Other agents, from other repositories
test-automator
Create comprehensive test suites with unit, integration, and e2e tests. Sets up CI pipelines, mocking strategies, and test data. Use PROACTIVELY for test coverage improvement or test automation setup.
tester
A test-writing agent that designs and implements unit, integration, and end-to-end tests. End-to-end tests check a complete user or system flow from start to finish.
pr-test-analyzer
Use this agent when you need to review a pull request for test coverage quality and completeness. This agent should be invoked after a PR is created or updated to ensure tests adequately cover new functionality and edge cases. Typical triggers include the user asking whether tests on a freshly-created PR are thorough…
bug-reproducer
A testing-only workflow that turns a bug report into one test that should fail against the current code. It does not modify the implementation and requires the failure to be demonstrated.
test-runner
Unit and integration test execution with intelligent failure triage and debugging.
tester
Use when you need to validate code through testing -- running test suites, analyzing coverage, checking for regressions, validating error handling, or verifying build processes after implementation changes.