wc-downloadable-products

wc-downloadable-products is a skill for Codex from Lonsdale201/wp-agent-skills. It costs 129 tokens per session (1,931 once invoked), scanned A, original, MIT.

A guide to WooCommerce downloadable products and customer download access. It separates the file attached to a product, the customer's permission, and the checks used when delivering the file.

In plain words
What is it for?
Use it to manage product files, preserve download IDs, grant access after purchase, enforce limits and expiry, and safely serve downloads.
Why use it?
It prevents access from being granted merely because a product is downloadable or a permission row exists; the related order must also allow downloads.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to manage product files, preserve download IDs, grant access after purchase, enforce limits and expiry, and safely serve downloads.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wc-downloadable-products
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 wc-downloadable-products
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 wc-downloadable-products

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-downloadable-products"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-downloadable-products.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,931 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00129 $0.01931
Opus 5 $0.00064 $0.00966
Sonnet 5 $0.00026 $0.00386
Haiku 4.5 $0.00013 $0.00193

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

Security

Grade A, and why

wc-downloadable-products 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 yesterday.

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.

woocommerce/wc-downloadable-products/SKILL.md · 160 lines

How it starts

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

WooCommerce downloadable products

Use WooCommerce's product and customer-download objects. A downloadable product definition is not itself customer access, and a permission row is not sufficient unless the related order currently permits downloads.

Start with the three-layer model

Layer Canonical representation Answers
Product file WC_Product_Download in $product->get_downloads() What file can this product deliver?
Entitlement WC_Customer_Download Who may download which stable file ID, through which order, until when/how often?
Delivery WC_Download_Handler Does this request pass every check, how is the file served, and is the attempt counted?

Never infer access from _downloadable_files, product ownership, or a permission row alone. Resolve the actual order and use its is_download_permitted() gate.

Choose the task path

  • Creating or changing product files: use product CRUD and preserve existing download IDs.
  • Granting after purchase: let Woo's processing/completed lifecycle call wc_downloadable_product_permissions().
  • Adding one deliberate entitlement: call wc_downloadable_file_permission() with a real product and order.
  • Regenerating an order: delete that order's existing permissions with the customer-download data store, then force the canonical grant.
  • Displaying customer downloads: use wc_get_customer_available_downloads() or order downloadable-item APIs.
  • Debugging security, storage, limits, REST, tracking, or duplicate rows: load references/core-download-contract.md.

Create or update a downloadable product

$product = new WC_Product_Simple();
$product->set_name( 'Field guide' );
$product->set_regular_price( '29.00' );
$product->set_virtual( true );
$product->set_downloadable( true );
$product->set_download_limit( 3 ); // -1 means unlimited.
$product->set_download_expiry( 30 ); // Days; -1 means no expiry.

$file = new WC_Product_Download();
$file->set_id( wp_generate_uuid4() );
$file->set_name( 'PDF guide' );
$file->set_file( $protected_download_url );

$product->set_downloads( array( $file ) );
$product->save();

Read the full file on GitHub · 160 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. yesterday Changed · -2 lines a235226a6482
  2. 9d ago First seen · 162 lines · 129 tokens per session scan A 45a5d6ccce96

Subscribe to this mod's changes

wc-downloadable-products is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 129 tokens to every session and 1,931 once invoked, about $0.0006 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.

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