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.
npx skills add jiushiwon/wg-skills --skill fastapi-wechat-pay-skillgit clone --depth 1 https://github.com/jiushiwon/wg-skillsWrote 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.
[](https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-wechat-pay-skill)<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-wechat-pay-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-wechat-pay-skill/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.
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/fastapi-wechat-pay-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/fastapi-wechat-pay-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00145 | $0.04555 |
| Opus 5.5 | $0.00058 | $0.01822 |
| Sonnet 5.5 | $0.00029 | $0.00911 |
| Haiku 4.5 | $0.00015 | $0.00456 |
Grade A, and why
fastapi-wechat-pay-skill 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 512 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FastAPI WeChat Pay Module Skill
微信支付 V3(推荐)独立模块,只覆盖微信渠道。Python FastAPI 实现。
与合一版的关系
| Skill | 范围 | 推荐度 |
|---|---|---|
fastapi-wechat-pay-skill(本) |
仅微信 V3 | ⭐⭐⭐⭐⭐ 单一渠道项目 |
fastapi-alipay-pay-skill |
仅支付宝 | ⭐⭐⭐⭐⭐ 单一渠道项目 |
fastapi-payment-module-skill |
微信+支付宝合一 | 旧版,已不推荐 |
能力清单
| 能力 | 适用场景 | 接口 |
|---|---|---|
| JSAPI 支付 | 公众号 / 微信内 H5 | POST /api/wechat-pay/jsapi |
| 小程序支付 | 微信小程序 | POST /api/wechat-pay/miniprogram |
| H5 支付 | 手机浏览器 | POST /api/wechat-pay/h5 |
| Native 支付 | PC 扫码 | POST /api/wechat-pay/native |
| App 支付 | iOS / Android | POST /api/wechat-pay/app |
| 退款 | 全场景通用 | POST /api/wechat-pay/refund |
| 查询订单 | 全场景通用 | GET /api/wechat-pay/query/{orderNo} |
| 关单 | 全场景通用 | POST /api/wechat-pay/close/{orderNo} |
| 回调验签 | 全场景通用 | POST /api/wechat-pay/notify |
前置依赖
| 依赖 | 说明 |
|---|---|
fastapi-init-skill |
项目骨架(必须) |
fastapi-auth-module-skill |
当前用户获取(推荐) |
python-redis-module-skill |
幂等防重 + 限流(推荐) |
核心实现
1. 依赖
# 微信支付 V3 Python SDK
pip install wechatpayv3
# 或新版 wechatpayv3-py(推荐)
pip install wechatpayv3-py
# 异步 HTTP
pip install httpx
2. 配置(config.py)
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# ====== 必填项:从商户平台获取 ======
wechat_app_id: str = ""
wechat_mch_id: str = ""
# ====== V3 商户 API 证书 ======
wechat_private_key_path: str = "/opt/secret/wechat/apiclient_key.pem"
wechat_merchant_cert_path: str = "/opt/secret/wechat/apiclient_cert.pem"
wechat_api_cert_serial_no: str = ""
# ====== APIv3 密钥(32 位字符串) ======
wechat_api_v3_key: str = ""
# ====== 回调地址 ======
wechat_notify_url: str = "https://yourdomain.com/api/wechat-pay/notify"
wechat_refund_notify_url: str = ""
class Config:
env_prefix = "" # 已在 .env 中加 WECHAT_ 前缀
settings = Settings()
3. 数据模型(models.py)
import enum
from sqlalchemy import Column, BigInteger, String, Integer, DateTime, Enum as SQLEnum, Text
from sqlalchemy.sql import func
from database import Base
class PayScene(str, enum.Enum):
JSAPI = "JSAPI"
MINI_PROGRAM = "MINI_PROGRAM"
H5 = "H5"
NATIVE = "NATIVE"
APP = "APP"
class PayStatus(str, enum.Enum):
PENDING = "PENDING"
PAID = "PAID"
CLOSED = "CLOSED"
REFUNDED = "REFUNDED"
class RefundStatus(str, enum.Enum):
PENDING = "PENDING"
SUCCESS = "SUCCESS"
FAILED = "FAILED"
class WechatPayOrder(Base):
__tablename__ = "wg_wechat_pay_order"
id = Column(BigInteger, primary_key=True, autoincrement=True)
order_no = Column(String(64), unique=True, nullable=False, index=True)
transaction_id = Column(String(64))
scene = Column(SQLEnum(PayScene))
status = Column(SQLEnum(PayStatus), default=PayStatus.PENDING)
amount = Column(BigInteger, nullable=False, comment="金额(分)")
description = Column(String(200))
openid = Column(String(100))
prepay_id = Column(String(100))
code_url = Column(Text)
paid_at = Column(DateTime)
created_at = Column(DateTime, server_default=func.now())
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
class WechatRefundOrder(Base):
__tablename__ = "wg_wechat_refund_order"
id = Column(BigInteger, primary_key=True, autoincrement=True)
refund_no = Column(String(64), unique=True, nullable=False)
order_no = Column(String(64), nullable=False, index=True)
refund_id = Column(String(64))
refund_amount = Column(BigInteger, nullable=False, comment="金额(分)")
total_amount = Column(BigInteger, nullable=False)
status = Column(SQLEnum(RefundStatus), default=RefundStatus.PENDING)
reason = Column(String(200))
refunded_at = Column(DateTime)
created_at = Column(DateTime, server_default=func.now())
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 512 lines · 145 tokens per session scan A b27daaaedc51
fastapi-wechat-pay-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 145 tokens to every session and 4,555 once invoked, about $0.0006 per session on Opus 5.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-10-14.
fastapi-wechat-pay-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fastapi-wechat-pay-skilljiushiwon/wg-skills | Skill | 154 | 7d ago | Apache-2.0 | A | 145 | Claude Code, Codex |
| x402browser-use/browser-use | Skill | 122k | yesterday | MIT | A | 166 | Claude Code |
| tushareHKUDS/Vibe-Trading | Skill | 39k | yesterday | MIT | A | 79 | Claude Code, Codex |
| hyperliquid-websocketgalleonlabs/hypergrok-trading-desk | Skill | 635 | yesterday | MIT | A | 89 | Claude Code |
| wechatpay-payment-integrationwechatpay-apiv3/wechatpay-skills | Skill | 379 | 12d ago | MIT | A | 330 | Claude Code, Codex |
| build-a-stripe-integrationsuperset-sh/superset | Skill | 17k | 2d ago | MIT | A | 74 | Claude Code |
| freee-api-skillfreee/freee-mcp | Skill | 525 | yesterday | Apache-2.0 | A | 397 | Claude Code |