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 Lonsdale201/wp-agent-skills --skill wc-payment-gatewaygit clone --depth 1 https://github.com/Lonsdale201/wp-agent-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/lonsdale201/wp-agent-skills/wc-payment-gateway)<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-payment-gateway"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-payment-gateway/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/lonsdale201/wp-agent-skills/wc-payment-gateway"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-payment-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00097 | $0.02313 |
| Opus 5 | $0.00048 | $0.01156 |
| Sonnet 5 | $0.00019 | $0.00463 |
| Haiku 4.5 | $0.00010 | $0.00231 |
Grade A, and why
wc-payment-gateway 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 9d 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 — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WooCommerce payment gateway
A provider response is not automatically a paid order. Model captured, authorization-only, asynchronous pending, failed, refunded, and duplicate callback states explicitly.
Register the gateway
add_filter( 'woocommerce_payment_gateways', static function ( array $gateways ): array {
$gateways[] = MyPlugin\Payment\Gateway::class;
return $gateways;
} );
Register a class name so WooCommerce controls instantiation.
Minimal gateway class
namespace MyPlugin\Payment;
final class Gateway extends \WC_Payment_Gateway {
public function __construct() {
$this->id = 'myplugin_gateway';
$this->method_title = __( 'My Provider', 'myplugin' );
$this->method_description = __( 'Accept payments through My Provider.', 'myplugin' );
$this->has_fields = false;
$this->supports = array( 'products', 'refunds' );
$this->init_form_fields();
$this->init_settings();
$this->enabled = $this->get_option( 'enabled', 'no' );
$this->title = $this->get_option( 'title', __( 'Card payment', 'myplugin' ) );
$this->description = $this->get_option( 'description', '' );
add_action(
'woocommerce_update_options_payment_gateways_' . $this->id,
array( $this, 'process_admin_options' )
);
}
public function init_form_fields(): void {
$this->form_fields = array(
'enabled' => array(
'title' => __( 'Enable', 'myplugin' ),
'type' => 'checkbox',
'label' => __( 'Enable this payment method', 'myplugin' ),
'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'myplugin' ),
'type' => 'text',
'default' => __( 'Card payment', 'myplugin' ),
),
'api_key' => array(
'title' => __( 'API key', 'myplugin' ),
'type' => 'password',
),
);
}
public function process_payment( $order_id ) {
$order = wc_get_order( $order_id );
if ( ! $order instanceof \WC_Order ) {
return array( 'result' => 'failure' );
}
try {
$payment = $this->provider()->create_payment( array(
'amount' => wc_add_number_precision( $order->get_total(), false ),
'currency' => $order->get_currency(),
'idempotency_key' => 'wc-' . $order->get_order_key(),
'metadata' => array( 'order_id' => $order->get_id() ),
) );
} catch ( \Throwable $error ) {
wc_get_logger()->error(
'Payment provider request failed.',
array(
'source' => 'myplugin-gateway',
'order_id' => $order->get_id(),
'exception_class' => get_class( $error ),
)
);
wc_add_notice( __( 'The payment could not be processed. Please try again.', 'myplugin' ), 'error' );
return array( 'result' => 'failure' );
}
$order->update_meta_data( '_myplugin_provider_payment_id', $payment->id );
if ( 'captured' === $payment->status ) {
if ( ! $order->payment_complete( $payment->transaction_id ) ) {
return array( 'result' => 'failure' );
}
} elseif ( 'authorized' === $payment->status ) {
// Authorization reserves funds; it is not necessarily a capture.
$order->set_transaction_id( $payment->transaction_id );
$order->update_status( 'on-hold', __( 'Payment authorized; capture pending.', 'myplugin' ) );
} elseif ( 'pending' === $payment->status ) {
$order->update_status( 'on-hold', __( 'Awaiting provider confirmation.', 'myplugin' ) );
} else {
$order->update_status( 'failed', __( 'The provider declined the payment.', 'myplugin' ) );
wc_add_notice( __( 'The payment was declined. Try another payment method.', 'myplugin' ), 'error' );
return array( 'result' => 'failure' );
}
if ( WC()->cart ) {
WC()->cart->empty_cart();
}
return array(
'result' => 'success',
'redirect' => $this->get_return_url( $order ),
);
}
}
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.
- 9d ago First seen · 215 lines · 97 tokens per session scan A 407885083427
wc-payment-gateway is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 97 tokens to every session and 2,313 once invoked, about $0.0005 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-09-03.
Other skills, from other repositories
commerce-app-business-config
Manage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in…
muapi-amazon-product-listing
Generate a complete Amazon product listing image set — hero image, lifestyle shot, infographic with features, and comparison/detail closeups optimized for Amazon standards.
muapi-multi-angle-shots
Generate a complete set of multi-angle product shots — front, side, back, top-down, and 45-degree perspective — for comprehensive product visualization.
menu-engineer
Optimize menu pricing, placement, and item mix to maximize profitability. Uses menu engineering frameworks to analyze item performance by popularity and margin, then recommends pricing tweaks, repositioning, and removals.
price-scout
Track and compare supplier prices across multiple vendors to reduce COGS. Monitors price changes, identifies savings opportunities, calculates total cost of ownership (including delivery fees and minimums), and generates renegotiation briefs.
table-manager
Optimize table turns, manage reservations, and reduce wait times to maximize revenue per seat. Handles booking intake, table assignment strategy, waitlist management, and provides actionable insights for seating efficiency.