documcp: Agent for Claude Code

.github/agents/documcp-test.md

documcp-test is an agent for Claude Code from tosin2013/documcp. It costs 15 tokens per session (844 once invoked), scanned A, original, MIT.

Project instructions for writing tests for DocuMCP, including unit, integration, API, end-to-end, memory, benchmark, and edge-case tests. They define coverage targets and reusable test patterns.

In plain words
What is it for?
Use them when adding tests for DocuMCP tools, integrations, APIs, functional workflows, benchmarks, or unusual and failing inputs.
Why use it?
They provide a consistent way to verify tools and error handling without each test author inventing a separate structure.

Agent for Claude Code

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

This is tosin2013/documcp's own configuration. It tells Claude Code how to work on documcp 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 documcp configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { formatMCPResponse } from "../../src/types/api.js";.

Reuse

Borrowing it

Nothing to install: this file belongs to tosin2013/documcp. 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/tosin2013/documcp/main/.github/agents/documcp-test.md
Clone the repo
git clone --depth 1 https://github.com/tosin2013/documcp

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 documcp-test

README.md
[![agentmods](https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-test/github.svg)](https://agentmods.dev/agents/tosin2013/documcp/documcp-test)
Your own site
<a href="https://agentmods.dev/agents/tosin2013/documcp/documcp-test"><img src="https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-test/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 documcp-test

Your own site · 80×15
<a href="https://agentmods.dev/agents/tosin2013/documcp/documcp-test"><img src="https://agentmods.dev/badge/agents/tosin2013/documcp/documcp-test.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 844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00844
Opus 5.5 $0.00006 $0.00338
Sonnet 5.5 $0.00003 $0.00169
Haiku 4.5 $0.00002 $0.00084

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

Security

Grade A, and why

documcp-test scanned grade A with 0 findings 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/documcp-test.md · 146 lines

How it starts

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

You are an expert at writing tests for DocuMCP.

Testing Strategy

Coverage Requirements

  • Global: 80% (branches, functions, lines, statements)
  • Complex tools (e.g., recommend-ssg.ts): 60%
  • Excluded: Experimental memory features, src/index.ts

Test Structure

tests/
├── tools/              # Individual tool testing
├── integration/        # Multi-tool workflows
├── memory/            # Memory system testing
├── api/               # MCP protocol validation
├── functional/        # End-to-end functional tests
├── benchmarks/        # Performance benchmarks
└── edge-cases/        # Error handling and edge cases

Tool Test Pattern

import { myTool } from "../../src/tools/my-tool.js";
import { formatMCPResponse } from "../../src/types/api.js";
import { promises as fs } from "fs";
import path from "path";
import { tmpdir } from "os";

describe("myTool", () => {
  let testDir: string;

  beforeEach(async () => {
    testDir = path.join(tmpdir(), `test-${Date.now()}`);
    await fs.mkdir(testDir, { recursive: true });
  });

  afterEach(async () => {
    await fs.rm(testDir, { recursive: true, force: true });
  });

  it("should return success for valid input", async () => {
    const result = await myTool({
      path: testDir,
      depth: "standard",
    });

    expect(result.success).toBe(true);
    expect(result.data).toBeDefined();
    expect(result.metadata.toolVersion).toBeDefined();
    expect(result.metadata.executionTime).toBeGreaterThan(0);
  });

  it("should handle invalid input", async () => {
    const result = await myTool({
      invalidParam: "value",
    });

    expect(result.success).toBe(false);
    expect(result.error).toBeDefined();
    expect(result.error.code).toBe("TOOL_ERROR");
  });

  it("should validate path permissions", async () => {
    const result = await myTool({
      path: "/etc/passwd",
    });

    expect(result.success).toBe(false);
    expect(result.error.message).toContain("permission");
  });
});

Read the full file on GitHub · 146 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. 2mo ago First seen · 146 lines · 15 tokens per session scan A f0f19ae55c5b

Subscribe to this mod's changes

documcp-test is an agent published in the GitHub repository tosin2013/documcp (10 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 844 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

documcp-test compared with agents from other repositories

documcp-test next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
documcp-testtosin2013/documcpAgent103mo agoMITA15Claude Code
test-generatortravisjneuman/.claudeAgent107yesterdayMITA27Claude Code
FAI Collective Testerfrootai/frootaiAgent74d agoMITA37Claude Code
backend-test-engineeralexmmatos/arthur-mcpAgent23mo agoMITA52Claude Code
test-strategistThe-AI-Directory-Company/agents-and-skillsAgent47mo agoMITA47Claude Code
test-engineermanutej/luxor-claude-marketplaceAgent634mo agononeA0Claude Code
testing-agentMyst4ke/mcp-to-skills-converterAgent112mo agoMITA19Claude Code