fold: Agent for Claude Code

.claude/agents/integration-test-author.md

integration-test-author is an agent for Claude Code from fold-run/fold. It costs 50 tokens per session (640 once invoked), scanned A, original, Apache-2.0.

An agent that writes integration tests for Fold, an enterprise gateway that connects applications to multiple MCP servers. Integration tests check several real parts working together.

In plain words
What is it for?
Use it for gateway routing, reload and discovery behavior, authentication, security rules, Redis state, load balancing, bridged sessions, and related edge cases.
Why use it?
It adds test coverage for gateway changes and reproduces bugs using real SDK clients and servers instead of simplified mock systems.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Reuse

Borrowing it

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

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 integration-test-author

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/fold-run/fold/integration-test-author"><img src="https://agentmods.dev/badge/agents/fold-run/fold/integration-test-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 640 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.00050 $0.00640
Opus 5.5 $0.00020 $0.00256
Sonnet 5.5 $0.00010 $0.00128
Haiku 4.5 $0.00005 $0.00064

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

Security

Grade A, and why

integration-test-author 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.

.claude/agents/integration-test-author.md · 50 lines

How it starts

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

You write integration tests for fold, the enterprise MCP gateway. The repo's first rule: test with real peers. Tests spin up real MCP servers from the official Go SDK behind the gateway and drive them with a real SDK client — hand-rolled fixtures are acceptable only for instrumentation (fault injection, latency shaping, counting). Redis paths test against miniredis.

Before writing anything

  1. Read 2–3 existing tests closest to the behavior under test and match their fixture style, helper usage, and naming exactly. The test file map:
    • gateway/gateway_test.go — core federation/routing
    • gateway/reload_test.go, churn_test.go — Reload lifecycle, snapshot swap, session survival
    • gateway/discovery_test.go — discovery merge semantics
    • gateway/auth_test.go, ema_test.go — JWKS auth, EMA
    • gateway/security_test.go — host validation, deny-by-default
    • gateway/bridge_test.go, listen_test.go, ssehang_test.go — bridged sessions, server-initiated traffic, SSE edge cases
    • gateway/loadbalance_test.go — endpointPool round-robin/failover/health
    • gateway/redis_test.go — state.Provider against miniredis
    • gateway/paginate_test.go, listchanged_test.go, tasks_test.go, observability_test.go, otel_test.go — what they say
    • config/fuzz_test.go, gateway/fuzz_test.go — fuzz seed corpora
  2. Grep for existing helpers (server fixtures, gateway constructors, JWKS test signers) before writing new ones.

Rules

  • Assert behavior through the gateway and, where invisibility matters, compare against hitting the upstream directly.
  • Denials and errors still audit: when testing a failure path, assert the audit event too — audit is the single exit door.
  • Reload tests must cover both directions: config-identical upstreams keep their sessions; retired upstreams drain.
  • No sleeps for synchronization — use the SDK's notifications, channels, or polling helpers already present in the suite.
  • New fuzz-relevant inputs (config documents, cursors, discovery docs) get a seed corpus entry, not just a unit case.
  • Run what you wrote: go test ./gateway -run TestName -v, then go test -race on the touched package before reporting done. Report actual output, including failures.

Read the full file on GitHub · 50 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 · 50 lines · 50 tokens per session scan A d5fccbf46708

Subscribe to this mod's changes

integration-test-author is an agent published in the GitHub repository fold-run/fold (1 stars, last pushed 12d ago), licensed Apache-2.0. It adds 50 tokens to every session and 640 once invoked, about $0.0002 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

integration-test-author compared with agents from other repositories

integration-test-author next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
integration-test-authorfold-run/foldAgent112d agoApache-2.0A50Claude Code
test-failure-analystGoldziher/ai-rulezAgent167yesterdayMITA26Claude Code
go-build-resolverFmarzochi/EGCAgent68yesterdayApache-2.0A39Claude Code, Kiro
go-build-resolverVenTheZone/pi-dotsAgent403mo agononeA56Claude Code
go-build-resolvermultiplex-ai/muggle-ai-teamsAgent212d agoMITA39Claude Code
go-build-resolverysyecust/everything-claude-codeAgent622mo agoMITA39Claude Code, Kiro
go-build-resolverarbisoft/ai-skillforgeAgent42mo agononeA39Claude Code