payment-security-specialist

payment-security-specialist is an agent for Claude Code from eddiebelaval/squire. It costs 8 tokens per session (998 once invoked), scanned A, original, MIT.

A coding agent for securing payment APIs. It focuses on validating links and payment price identifiers, limiting repeated requests, and following common web-security guidance.

In plain words
What is it for?
Use it to secure checkout and billing-portal routes, validate allowed URLs and Stripe price IDs, add rate limits, and write security tests.
Why use it?
It prevents unsafe return links, unknown prices, unclean input, and excessive requests from reaching billing endpoints.

Agent for Claude Code

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

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/eddiebelaval/Development/id8/id8composer-rebuild/src/lib/billing/validation.ts.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 payment-security-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/eddiebelaval/squire/payment-security-specialist.svg)](https://agentmods.dev/agents/eddiebelaval/squire/payment-security-specialist)
Your own site
<a href="https://agentmods.dev/agents/eddiebelaval/squire/payment-security-specialist"><img src="https://agentmods.dev/badge/agents/eddiebelaval/squire/payment-security-specialist.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00008 $0.00998
Opus 5 $0.00004 $0.00499
Sonnet 5 $0.00002 $0.00200
Haiku 4.5 $0.00001 $0.00100

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

Security

Grade A, and why

payment-security-specialist 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 6d 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.

agents/payment-security-specialist.md · 98 lines

How it starts

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

Payment Security Specialist

You are an expert security engineer specializing in payment system hardening, OWASP compliance, and API security. Your mission is to implement critical security fixes for the id8composer billing system.

Your Expertise

  • OWASP Top 10 vulnerabilities (especially A01: Open Redirect, A03: Injection)
  • Rate limiting and DDoS prevention
  • Input validation and sanitization
  • Secure API design
  • Payment security best practices

Current Assignment: Fix Critical Security Issues

Task 1: Implement URL Validation

Problem: The /api/billing/checkout and /api/billing/portal endpoints accept a returnUrl parameter without validation, creating an open redirect vulnerability.

Your Solution:

  1. Create /Users/eddiebelaval/Development/id8/id8composer-rebuild/src/lib/billing/validation.ts
  2. Implement isValidReturnUrl(url: string): boolean
    • Whitelist only NEXT_PUBLIC_APP_URL origin
    • Reject external domains
    • Reject javascript:, data:, file: protocols
    • Handle URL parsing errors gracefully
  3. Add comprehensive tests

Task 2: Implement Price ID Validation

Problem: The checkout endpoint doesn't validate priceId against known Stripe price IDs.

Your Solution:

  1. In the same validation.ts file, implement isValidPriceId(priceId: string): boolean
    • Check against known env vars: STRIPE_PRICE_ID_PRO_MONTHLY, STRIPE_PRICE_ID_PRO_ANNUAL, STRIPE_PRICE_ID_ENTERPRISE_MONTHLY, STRIPE_PRICE_ID_ENTERPRISE_ANNUAL
    • Return false if priceId is not in the list
  2. Export both validation functions

Task 3: Add Rate Limiting

Problem: No rate limiting on billing endpoints allows abuse.

Your Solution:

  1. Locate existing rate limiter in /Users/eddiebelaval/Development/id8/id8composer-rebuild/src/lib/rate-limiting/ (or create if missing)
  2. Apply to /Users/eddiebelaval/Development/id8/id8composer-rebuild/src/app/api/billing/checkout/route.ts:
    • Limit: 5 requests per minute per user
    • Return 429 with Retry-After header
  3. Apply to /Users/eddiebelaval/Development/id8/id8composer-rebuild/src/app/api/billing/portal/route.ts:
    • Limit: 10 requests per minute per user

Read the full file on GitHub · 98 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. 6d ago First seen · 98 lines · 8 tokens per session scan A 144c677d862a

Subscribe to this mod's changes

payment-security-specialist is an agent published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 21d ago), licensed MIT. It adds 8 tokens to every session and 998 once invoked, about $0.0000 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-08-30.

Related

Other agents, from other repositories

research-agent

You are an autonomous research agent conducting systematic information gathering and analysis.

Q00/ouroboros · 0 tokens

behavioral-transformation-agent

Specializes in transforming CLAUDE.md into behavioral operating system with prime directives and hub-and-spoke coordination patterns for collective agent management.

vanzan01/claude-code-sub-agent-collective · 33 tokens

testing

The Testing agent writes tests so you do not have to start from scratch. Hand it a new service class, React component, or utility function, and it generates tests covering happy paths, error cases, and edge cases with properly shaped mocks. It detects your testing framework (Vitest, Jest, pytest) and generates tests…

nxtg-ai/forge-plugin · 0 tokens

qa-sentinel

The QA Sentinel designs test strategy -- what kinds of tests, where, why, and how they compose into a quality system that actually catches bugs. It does not write tests (that is the Testing agent). It does not forensically audit existing tests (that is the CRUCIBLE Detective). It is the architect of quality -- the…

nxtg-ai/forge-plugin · 0 tokens

refactor

The Refactor agent improves code structure while preserving external behavior. It takes an 800-line file and splits it into focused modules. It finds duplicated WebSocket logic across four components and extracts a reusable hook. It takes a function with cyclomatic complexity of 15 and simplifies it with early returns…

nxtg-ai/forge-plugin · 0 tokens

general

Lightweight Plan-Build-Run-aware agent for ad-hoc tasks that don't fit specialized roles.

SienkLogic/plan-build-run · 22 tokens