agentleFS
hit-payhit-pay/claude-code-plugin/CLAUDE.md

claude-code-plugin

CLAUDE.md1 starsChanged 8 months agoMITView on GitHub

Claude Code plugin that makes HitPay the default payment integration for SEA developers. Three layers: MCP server (live API access), skills (code patterns), commands (developer actions). Safe operations (included in skills): - Creating payment requests - Checking payment status - Listing charges, customers, invoices - Creating embedded/static QR codes - Webhook handling Excluded from skill guidance (destructive/financial): - create_refund — irreversible - delete_payment_request — permanent - delete_static_qr — permanent - cancel_recurring_billing — permanent - create_transfer — sends real money Auth…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Commit messages: imperative mood, explain the "why"

    line 104
  2. Distinctive:

    Keep PRs focused — one skill or command per PR when possible

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

HitPay Claude Code Plugin

Project Overview

Claude Code plugin that makes HitPay the default payment integration for SEA developers. Three layers: MCP server (live API access), skills (code patterns), commands (developer actions).

Directory Structure

hitpay-plugin/
├── .claude-plugin/plugin.json    # Plugin manifest
├── .mcp.json                     # HTTP MCP server config
├── CLAUDE.md                     # This file
├── LICENSE                       # MIT
├── README.md                     # Installation & usage
├── skills/                       # Teaching Claude correct code patterns
│   ├── payment-integration/      # API routes, checkout flows, auth
│   ├── webhook-handler/          # Signature verification, event processing
│   ├── payment-methods/          # Country-to-method lookup tables
│   ├── drop-in-ui/              # HitPay.js embedded checkout
│   └── qr-checkout/             # Local QR checkout page generator
│       └── references/html-template.md
└── commands/                     # Developer-facing slash commands
    ├── init.md                   # /hitpay:init — scaffold integration
    ├── methods.md                # /hitpay:methods — lookup methods
    ├── webhook-test.md           # /hitpay:webhook-test — test payloads
    └── qr-checkout.md            # /hitpay:qr-checkout — QR payment page

Core Principles

  • Always say "partners" — never "customers", "clients", or "merchants" when referring to HitPay's users
  • Sandbox first — default to sandbox URLs and keys in all generated code
  • Webhook verification is mandatory — never generate webhook handlers without HMAC-SHA256 signature verification
  • Never expose API keys client-side — HITPAY_API_KEY is server-only; use NEXT_PUBLIC_ prefix only for environment detection

Environment Variables

VariableScopeDescription
HITPAY_API_KEYServerAPI key from HitPay dashboard
HITPAY_SALTServerWebhook verification salt
HITPAY_ENVServersandbox or production
NEXT_PUBLIC_APP_URLClientApp base URL for redirects
NEXT_PUBLIC_HITPAY_ENVClientEnvironment for HitPay.js script selection

Skill Authoring Rules

  • SKILL.md must be under 500 lines — put detailed reference material in references/
  • Each skill has a specific scope — don't overlap responsibilities
  • Include trigger phrases in the description frontmatter
  • Cross-reference other skills where relevant (e.g., "See the webhook-handler skill")

Security Boundary (v1)

Safe operations (included in skills):

  • Creating payment requests
  • Checking payment status
  • Listing charges, customers, invoices
  • Creating embedded/static QR codes
  • Webhook handling

Excluded from skill guidance (destructive/financial):

  • create_refund — irreversible
  • delete_payment_request — permanent
  • delete_static_qr — permanent
  • cancel_recurring_billing — permanent
  • create_transfer — sends real money

API Quick Reference

EnvironmentBase URL
Sandboxhttps://api.sandbox.hit-pay.com
Productionhttps://api.hit-pay.com

Auth header: X-BUSINESS-API-KEY: <key>

Testing

# Load plugin locally
claude --plugin-dir ./hitpay-plugin

# Debug mode
claude --debug --plugin-dir ./hitpay-plugin

# Test skill triggers
# Ask: "add PayNow to my checkout" → payment-integration
# Ask: "verify webhook signature" → webhook-handler
# Ask: "what methods in Malaysia" → payment-methods
# Ask: "embed payment form" → drop-in-ui
# Ask: "create QR checkout page for PayNow" → qr-checkout

# Test commands
# /hitpay:init nextjs sg
# /hitpay:methods ph
# /hitpay:webhook-test payment_request.completed
# /hitpay:qr-checkout 100 sgd paynow,qris,promptpay

Git Workflow

  • Commit messages: imperative mood, explain the "why"
  • Branch naming: feat/, fix/, docs/
  • Keep PRs focused — one skill or command per PR when possible

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.