Refund Agent — AI skill for Claude Code
AI customer-support agent that handles refund emails using Claude Opus 5.5 and tool calling.
How to install Refund Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Jeepittea/refund-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Refund Agent does
AI customer-support agent that handles refund emails using Claude Opus 5.5 and tool calling. Refund rules are enforced in Python, not by the AI: a strict 30-day policy check, no double refunds, and all-or-nothing database saves with an audit log. Built with SQLAlchemy, Pydantic and Pytest.
Alternatives in AI
- Anthropic Quickstarts — by Anthropic - Offers comprehensive development guides for three distinct AI-powered demo projects with standa 15.4k ★
- Flow Define — Multi-AI requirements scoping using Codex and Gemini CLIs (Double Diamond Define phase) 2.8k ★
- PRD Taskmaster V2 — Zero-config goal-to-tasks engine 187 ★
README
Refund Agent
Autonomous customer-support refund agent built on Claude Opus 5.5 (`claude-opus-5-5`).
src/agent/ email parsing, agent loop, CLI
src/database/ SQLAlchemy models (orders, audit_log), engine, seed data
src/tools/ Pydantic tool schemas, typed tool registry, business-logic tools
tests/ pytest suite (offline, scripted fake Claude) + opt-in live tests
Setup
uv venv -p 3.12 .venv
uv pip install --python .venv -e ".[dev]"
.venv/Scripts/python -m src.agent.cli init-db # creates + seeds refunds.db
.venv/Scripts/python -m pytest # offline suite
Process an email (needs `ANTHROPIC_API_KEY` or an `ant auth login` profile):
.venv/Scripts/python -m src.agent.cli handle samples/refund_request.eml
RUN_LIVE_TESTS=1 .venv/Scripts/python -m pytest -m live # real-API smoke tests
Who decides what
| Concern | Owner |
|---|---|
| Which tools to call, wording of the reply | LLM |
| Sender identity | Python: parsed From: header, bound into ToolContext; not a tool parameter |
| 30-day eligibility | Python datetime in issue_refund (elapsed <= 30 days, tz-aware UTC) |
Final Decision |
Python, derived from validated tool outputs; never from the model's text |
Guarantees in `issue_refund`
- One transaction.
BEGIN IMMEDIATE(SQLite) takes the write lock before the checks read the order. The idempotency check, policy check, status update and audit insert commit together or not at all. - Idempotent. It checks status first, then does a compare-and-set
UPDATE ... WHERE refund_status='none'. Duplicate emails, duplicate parallel tool calls and concurrent threads produce exactly onerefund_issuedrow (tested with 8 racing threads). - Rejections are audited too. Rejections are written to the audit log with the
model's reasoning. Orders owned by another customer return
order_not_found, so the tool can't be used to check whether an order exists
Related Skills
Spendwall
A store wants to delegate customer support, refunds, disputes, and invoices to an AI agent. However, a single
Customer Service
A multi-provider AI customer service agent that automates order lookup, return-eligibility checks, and Stripe
Agentic Customer Support Copilot
AI customer support agent with a live interactive demo — resolves policy-covered requests directly (refunds, p
Secure AI Customer Support Platform
Secure LLM-powered customer support platform: an AI agent (Claude) with grounded RAG answers, authorization-en
Support Inbox Agent
AI support inbox agent built on the Claude Agent SDK: auto-answers how-to emails with cited help articles, rou
Claude Double Review
Shortcut for claude-review with the Skeptic pair (Fable + Opus) plus the Architect. Accepts --model sonnet to
Related Agents
Funnelfox Billing
FunnelFox Billing specialist: subscriptions, prices, checkout, orders, payments, refunds, customer and billing
Reliability Engineer
Python delivery agent for quality gates and test infrastructure. Owns test suite (>=80% coverage enforced), go
Copywriter Brand Voice
Use to draft customer-facing copy — landing pages, emails, product descriptions, ads — in the venture's brand