doctor

doctor is a command for Claude Code from Hainrixz/agente-pagokit. It costs 36 tokens per session (475 once invoked), scanned A, original, MIT.

A read-only checker for PagoKit payment integrations, which connect an application to payment providers. It reviews configuration, webhooks, database setup, and production safeguards.

In plain words
What is it for?
Use it to audit environment variables, webhook signature checks, replay protection, idempotency, database tables, and supported payment events. It also produces a summary and suggested next steps.
Why use it?
It finds common payment-integration problems before they cause failed payments, repeated processing, or security issues. The report marks each check as okay, a warning, or a failure.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the pagokit plugin — 8 skills, 8 commands, 1 agent, 5 hooks shipped together

Good fit Use it to audit environment variables, webhook signature checks, replay protection, idempotency, database tables, and supported payment events. It also produces a summary and suggested next steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hainrixz/agente-pagokit/doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Hainrixz/agente-pagokit

Made for: Claude Code.

Or install pagokit, the plugin that ships this one along with the rest of its 8 skills, 8 commands, 1 agent, 5 hooks.

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 doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/hainrixz/agente-pagokit/doctor/github.svg)](https://agentmods.dev/commands/hainrixz/agente-pagokit/doctor)
Your own site
<a href="https://agentmods.dev/commands/hainrixz/agente-pagokit/doctor"><img src="https://agentmods.dev/badge/commands/hainrixz/agente-pagokit/doctor/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 doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/hainrixz/agente-pagokit/doctor"><img src="https://agentmods.dev/badge/commands/hainrixz/agente-pagokit/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 475 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.00036 $0.00475
Opus 5 $0.00018 $0.00237
Sonnet 5 $0.00007 $0.00095
Haiku 4.5 $0.00004 $0.00047

Measured 11d ago against content hash 5d0e8bfbfd1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

doctor 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 11d 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.

commands/doctor.md · 47 lines

What it actually says

You are entering the PagoKit doctor flow. Read-only audit — never write files.

  1. Invoke the doctor skill, which:

    • Reads PAGOKIT_INTEGRATION.md from the project root for context (provider, files generated, events routed, ORM, deploy target).
    • If the file is missing, asks the user which provider they're using and proceeds best-effort.
    • Runs each check in the categories defined in the skill: Environment hygiene · Required env vars · Webhook handler quality · Idempotency · DB schema · Production-readiness pointer.
    • Emits a per-check status line [OK] / [WARN] / [FAIL].
    • Produces a summary count and a "Next steps" list.
  2. Report the audit result to the user verbatim in their language. Format:

    PagoKit Doctor — <provider> integration audit
    Generated <last_generated_at> · stack: <stack> · deploy: <deploy_target>
    
    Environment hygiene
      [OK]   .gitignore covers .env
      [OK]   .env not tracked in git
      ...
    
    Webhook handler
      [OK]   app/api/webhook/stripe/route.ts verifies signature
      [FAIL] customer.subscription.updated not routed
      ...
    
    (per category)
    
    Summary: 17 OK · 2 warnings · 1 failure
    
    Next steps:
    1. Route the missing event customer.subscription.updated (see templates/stripe/subscription.md).
    2. Address the warnings before going live.
    
  3. Never echo secret values even when you read .env. Just report match / no-match against pattern.

Anti-patterns

  • Do NOT write files, run migrations, or modify settings during a doctor flow. Pure read.
  • Do NOT recommend fixes that require live keys. First step is always: make the sandbox green.
  • Do NOT skip categories. Even if early categories fail badly, run the full audit so the user gets a complete picture.
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. 11d ago First seen · 47 lines · 36 tokens per session scan A 5d0e8bfbfd1d

Subscribe to this mod's changes

doctor is a command published in the GitHub repository Hainrixz/agente-pagokit (49 stars, last pushed 11d ago), licensed MIT. It adds 36 tokens to every session and 475 once invoked, about $0.0002 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.