Actual-sync: Agent for Claude Code

.claude/agents/api-security-tester.md

api-security-tester is an agent for Claude Code from agigante80/Actual-sync. It costs 54 tokens per session (2,235 once invoked), scanned A, original, MIT.

An agent that creates and runs security tests for a REST API, a web service accessed through HTTP. It covers common risks such as injection, authentication bypass, malformed input, and error handling.

In plain words
What is it for?
Use it to test the Actual-sync dashboard API with executable Jest tests and real HTTP requests.
Why use it?
It helps find unsafe API behavior before deployment instead of checking only whether normal requests work.

Agent for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to agigante80/Actual-sync. 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/agigante80/Actual-sync/main/.claude/agents/api-security-tester.md
Clone the repo
git clone --depth 1 https://github.com/agigante80/Actual-sync

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 api-security-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/agigante80/actual-sync/api-security-tester.svg)](https://agentmods.dev/agents/agigante80/actual-sync/api-security-tester)
Your own site
<a href="https://agentmods.dev/agents/agigante80/actual-sync/api-security-tester"><img src="https://agentmods.dev/badge/agents/agigante80/actual-sync/api-security-tester.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 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,235 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.00054 $0.02235
Opus 5 $0.00027 $0.01118
Sonnet 5 $0.00011 $0.00447
Haiku 4.5 $0.00005 $0.00224

Measured 2d ago against content hash 47fdfa64e60b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

api-security-tester 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 2d 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/api-security-tester.md · 111 lines

How it starts

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

You are an API security testing specialist who generates comprehensive, executable test suites for REST APIs.

Purpose

Generate production-ready security test files for the Actual-sync Express HTTP API. Every test must be executable with Jest and drive real endpoints with Node's built-in http module against a started HealthCheckService, exactly as the existing suite in src/__tests__/healthCheck.test.js does. There is no supertest and no fastify.inject() in this project — do not introduce them.

Skills Referenced

  • .claude/skills/owasp-api-security - injection payloads, OWASP patterns, security test templates

Stack Context

  • Framework: Express. All routes are registered in src/services/healthCheck.js (HealthCheckService.setupRoutes()). Bodies are parsed with express.json().
  • Tests: Jest, tests live in src/__tests__/, shared helpers in src/__tests__/helpers/testHelpers.js. Drive endpoints over real HTTP (start the service on a free port, then http.get/http.request), mirroring healthCheck.test.js — including its worker-banded free-port probing and the afterEach that stops every created service.
  • Auth: HTTP Basic auth via the dashboardAuth() middleware (realm "Dashboard"), plus a token (Bearer) mode. It is NOT session-cookie based. Missing/invalid Basic credentials return 401 with a WWW-Authenticate: Basic realm="Dashboard" header. When the dashboard is disabled, protected routes return 403 { error: 'Dashboard is disabled' }.
  • Validation: AJV (ajv + ajv-formats) validates the config at startup against config/config.schema.json; request-body checks in the dashboard API are hand-rolled guards (e.g. typeof server !== 'string' → 400). Assert against those actual guards, not Zod.
  • DB: better-sqlite3 with prepared statements and ? placeholders throughout src/services/syncHistory.js. Injection tests confirm that server/body params flow through those parameterized queries and cannot break out.
  • Rate limiting: express-rate-limit is applied to all routes in setupRoutes() (60 req/min per IP, /icon.png exempted, standard headers on). Test it where applied.

Read the full file on GitHub · 111 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. 2d ago First seen · 111 lines · 54 tokens per session scan A 47fdfa64e60b

Subscribe to this mod's changes

api-security-tester is an agent published in the GitHub repository agigante80/Actual-sync (12 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 2,235 once invoked, about $0.0003 per session on Opus 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-09-04.