fluentcart-coupons-discounts

fluentcart-coupons-discounts is a skill for Codex from Lonsdale201/wp-agent-skills. It costs 108 tokens per session (1,211 once invoked), scanned A, original, MIT.

A development guide for managing coupons and discounts in FluentCart, a WordPress shopping-cart system. It covers fixed-amount and percentage discounts, eligibility rules, stacking, usage limits, and recurring offers.

In plain words
What is it for?
Use it to create or audit coupon rules, control which products or customers qualify, decide whether coupons can combine, enforce limits, and store order-time discount records.
Why use it?
It helps keep discount calculations accurate and prevents customers from changing cart data to obtain discounts they should not receive. It also preserves the exact discount applied to past orders.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to create or audit coupon rules, control which products or customers qualify, decide whether coupons can combine, enforce limits, and store order-time discount records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts
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.

Any agent
npx skills add Lonsdale201/wp-agent-skills --skill fluentcart-coupons-discounts
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Codex.

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 fluentcart-coupons-discounts

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts/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 fluentcart-coupons-discounts

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/fluentcart-coupons-discounts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,211 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.00108 $0.01211
Opus 5 $0.00054 $0.00606
Sonnet 5 $0.00022 $0.00242
Haiku 4.5 $0.00011 $0.00121

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

Security

Grade A, and why

fluentcart-coupons-discounts 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 12d 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.

fluentcart/fluentcart-coupons-discounts/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FluentCart coupons and discounts

Extend the calculation pipeline instead of altering displayed totals. Revalidate every coupon against current server-owned cart data.

Read coupon-pipeline.md before implementing a virtual coupon, new rule, custom type, or recurring discount.

Use the canonical model

Coupon stores code, type, amount, priority, status, stackable, show_on_checkout, dates, use_count, and JSON conditions. AppliedCoupon stores the order-time snapshot. Never reconstruct historical discounts from the currently editable Coupon.

Use CouponResource for admin CRUD because it validates and converts fixed amounts/limits. In 1.6.0:

  • fixed amount uses integer minor units after formatting;
  • percentage amount is a percentage value from 0 through 100;
  • lower numeric priority applies first;
  • multiple coupons survive together only under the stackability rules.

Extend eligibility

  • fluent_cart/coupon/can_use_coupon: reject the whole coupon with false or WP_Error.
  • fluent_cart/coupon/will_skip_item: exclude one item.
  • fluent_cart/discount/pre_apply: transform candidate cart items before application; preserve complete shape and avoid price trust.
  • fluent_cart/coupon/per_customer_usage_query: add legitimate usage scoping.
  • fluent_cart/coupon/validating_coupon: normalize/admin-order validation code.

Keep eligibility callbacks pure. Coupon recalculation runs after cart/address/ shipping/tax changes and may run repeatedly.

Implement virtual coupons carefully

fluent_cart/coupon/resolve_coupons receives the database-found collection, requested codes, and cart context. Append an unsaved Coupon model for an addon-owned code only after server-side lookup and authorization.

add_filter(
    'fluent_cart/coupon/resolve_coupons',
    static function ($coupons, array $codes, array $context) {
        // Resolve only this addon's opaque code from server-owned state.
        // Append a fully populated unsaved Coupon model.
        return $coupons;
    },
    10,
    3
);

Read the full file on GitHub · 130 lines

Files

What ships with it

2 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.

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. 12d ago First seen · 130 lines · 108 tokens per session scan A 071bbe324e81

Subscribe to this mod's changes

fluentcart-coupons-discounts is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 108 tokens to every session and 1,211 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-08-30.

Related

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…

adobe/skills · 80 tokens

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.

SamurAIGPT/Generative-Media-Skills · 37 tokens

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.

SamurAIGPT/Generative-Media-Skills · 38 tokens

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.

cosmicstack-labs/mercury-agent-skills · 42 tokens

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.

cosmicstack-labs/mercury-agent-skills · 47 tokens

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.

cosmicstack-labs/mercury-agent-skills · 40 tokens