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 agentmods add skills/mralaminahamed/wp-dev-skills/wp-background-processingnpx skills add mralaminahamed/wp-dev-skills --skill wp-background-processinggit clone --depth 1 https://github.com/mralaminahamed/wp-dev-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/mralaminahamed/wp-dev-skills/wp-background-processing)<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-background-processing"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-background-processing.svg" alt="Measured on agentmods" 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 | $0.00316 | $0.03002 |
| Opus 5 | $0.00158 | $0.01501 |
| Sonnet 5 | $0.00063 | $0.00600 |
| Haiku 4.5 | $0.00032 | $0.00300 |
Grade A, and why
wp-background-processing scanned grade A with 1 finding 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 5d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
*/5 * * * * wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 How it starts
The opening of the file, as written. The whole thing — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WordPress Background Processing
Model note: Scaffolding a new Action Scheduler or
WP_Background_Processimplementation is pattern-matching —haikuhandles it well. Debugging a stuck queue or race condition across async jobs requires reasoning; usesonnet.
Implement background jobs and queued tasks in WordPress plugins. Three primary tools with distinct trade-offs: Action Scheduler (persistent, battle-tested), WP_Background_Process (lightweight, no DB table), WP Cron (built-in, unreliable timing).
When to use
- "Process a large batch of items in the background", "queue a long-running task".
- "Set up Action Scheduler", "use WooCommerce queue".
- "Implement WP_Background_Process", "chunked batch import".
- "Background email sending", "async API calls".
- "Fix a WP Cron job not firing", "make scheduled tasks reliable".
- "The scheduled action completes but nothing happens", "the handler only runs in the admin".
Not for: One-off scheduled events (use wp_schedule_single_event). REST API async patterns — use wp-rest-api.
Method
1. Choose the right tool
| Tool | Persistent | Retry | Progress | Requires | Best for |
|---|---|---|---|---|---|
| Action Scheduler | ✅ DB table | ✅ Configurable | Via hooks | AS or WC | Reliable multi-step queues |
| WP_Background_Process | ✅ Options API | ❌ Manual | Via option | ~5KB class | Simple batches, no WC dep |
| WP Cron | ❌ (transient) | ❌ | ❌ | Nothing | Maintenance, low-priority tasks |
Rule of thumb: WooCommerce already installed → Action Scheduler. Simple background batch → WP_Background_Process. Periodic cleanup task → WP Cron.
2. Action Scheduler
Bundled with WooCommerce. Can also be installed as a standalone library.
Standalone install:
composer require woocommerce/action-scheduler
require_once plugin_dir_path( __FILE__ ) . 'vendor/woocommerce/action-scheduler/action-scheduler.php';
Schedule and handle actions:
// Schedule a single action (fires once ASAP)
as_enqueue_async_action( 'my_plugin_process_item', [ 'item_id' => 123 ], 'my-plugin' );
// Schedule a recurring action
as_schedule_recurring_action( time(), HOUR_IN_SECONDS, 'my_plugin_hourly_sync', [], 'my-plugin' );
// Schedule a single action in the future
as_schedule_single_action( time() + 300, 'my_plugin_delayed_job', [ 'batch' => 1 ], 'my-plugin' );
// Handle the action
add_action( 'my_plugin_process_item', function( $item_id ) {
$result = my_plugin_do_work( $item_id );
if ( is_wp_error( $result ) ) {
// AS will retry on exception; throw to trigger retry
throw new \Exception( $result->get_error_message() );
}
} );
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.
- 5d ago First seen · 305 lines · 316 tokens per session scan A 738ac107296b
wp-background-processing is a skill published in the GitHub repository mralaminahamed/wp-dev-skills (27 stars, last pushed 1mo ago), licensed MIT. It adds 316 tokens to every session and 3,002 once invoked, about $0.0016 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
woocommerce-markdown
Guidelines for creating and modifying markdown files in WooCommerce. Use when writing documentation, README files, or any markdown content.
woocommerce-code-review
Review WooCommerce code changes for coding standards compliance. Use when reviewing code locally, performing automated PR reviews, or checking code quality.
woocommerce-git-commit
Commit uncommitted changes with well-crafted messages following WooCommerce repo conventions. Use when the user says "commit", "commit changes", "commit this", "git commit", or "save my work".
woocommerce-git-draft-pr
Create a high-quality draft PR for the current branch. Use when the user says "create a PR", "draft PR", "open a PR", "make a PR", "push and create PR", or "submit PR".
woocommerce-local-env
Set up, start, stop, restart, verify, and troubleshoot the WooCommerce Core local development environment with wp-env and asset build watchers. Use when Codex is asked to run WooCommerce locally, prepare wp-env, watch WooCommerce builds, choose between full and targeted build/watch commands, diagnose localhost:8888…
woocommerce-email-editor
Setup and develop the WooCommerce block email editor. Use when working on email templates, transactional emails, or the email editor feature.