wc-logging

wc-logging is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 91 tokens per session (1,999 once invoked), scanned A, original, MIT.

A guide to WooCommerce's shared logging system for operational messages. It covers log levels, structured context, correlation IDs, redaction of sensitive data, and retention.

In plain words
What is it for?
It helps record payment, migration, export, webhook, retry, and integration events in WooCommerce's Status logs.
Why use it?
Logs are useful for diagnosing failed jobs and callbacks, but they are temporary diagnostics rather than a reliable record that a business operation completed. This helps keep logs searchable and safe.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps record payment, migration, export, webhook, retry, and integration events in WooCommerce's Status logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wc-logging
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-logging
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, 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-logging

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wc-logging"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wc-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,999 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.00091 $0.01999
Opus 5 $0.00046 $0.01000
Sonnet 5 $0.00018 $0.00400
Haiku 4.5 $0.00009 $0.00200

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

Security

Grade A, and why

wc-logging 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 7d 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.

woocommerce/wc-logging/SKILL.md · 183 lines

How it starts

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

WooCommerce logging

Use WooCommerce's shared logger for operational diagnostics that merchants can inspect in WooCommerce Status logs. Logs are disposable observability data, never the only record that a payment, migration, export, or webhook completed.

Basic pattern

$logger = wc_get_logger();

$logger->info(
    'Order export queued.',
    array(
        'source'         => 'myplugin-export',
        'order_id'       => $order_id,
        'correlation_id' => $correlation_id,
        'attempt'        => $attempt,
    )
);

Always set a stable, plugin-prefixed source. Current file logging sanitizes it and expects at least three characters. Do not generate one source per order, user, request, or date; that fragments log browsing and creates excessive files/source records.

Levels

Level Use
debug Detailed development diagnostics; high volume and normally thresholded in production
info Normal lifecycle milestones useful for operations
notice Significant but expected condition
warning Recoverable anomaly, fallback, retry, deprecation, or degraded behavior
error Operation failed but the application remains usable
critical A component or important workflow is unavailable
alert Immediate operator action is required
emergency Store/system is unusable

Use the level methods (debug(), info(), warning(), error()) or log(). WC_Logger::add() is legacy and explicitly not the preferred API.

WooCommerce can disable logging globally and can set a minimum severity threshold. In 11.0.0 the default threshold is none, meaning all levels are accepted, but site settings or WC_LOG_THRESHOLD can change that. Never make application correctness depend on a log entry being handled.

Structured context

Prefer a constant message plus small, allowlisted context:

$logger->error(
    'Provider capture failed.',
    array(
        'source'             => 'myplugin-gateway',
        'order_id'           => $order->get_id(),
        'provider_reference' => myplugin_mask_reference( $provider_reference ),
        'provider_code'      => sanitize_key( $provider_code ),
        'correlation_id'     => $correlation_id,
    )
);

Read the full file on GitHub · 183 lines

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. 7d ago First seen · 183 lines · 91 tokens per session scan A ecd03f2130dd

Subscribe to this mod's changes

wc-logging is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 12d ago), licensed MIT. It adds 91 tokens to every session and 1,999 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.

Related

Other skills, from other repositories

comet-hotfix

A quick workflow for fixing an existing bug in Comet, a tool that manages structured code changes. It moves through opening the change, building, checking, and archiving it.

rpamis/comet · 29 tokens

comet-hotfix

Comet preset path: Bug fix / hotfix. Skip brainstorming, directly open → build → verify → archive. Applicable for behavior fixes, scenarios not involving new capability design.

rpamis/comet · 40 tokens

comet-github-issue-triage

A read-only workflow for checking and classifying Comet GitHub Issues, which are reports or requests about a software project. It compares each report with the repository’s code, tests, configuration, installation behavior, and existing issues.

rpamis/comet · 66 tokens

comet-github-issue-fix

A workflow for fixing a confirmed Comet-related GitHub issue or review blocker within an isolated scope. It covers matching the work to the relevant workflow, testing the change, checking runtime results, and preparing a careful handoff.

rpamis/comet · 71 tokens

comet-runtime-diagnose

A diagnostic procedure for Comet's hooks, installation, routing, platform support, generated runtime, and lifecycle behavior.

rpamis/comet · 70 tokens

cherry-electron-dev

Develop, fix, and profile Cherry Studio in a tracked Electron instance. Use for everyday implementation, UI and interaction work, bug fixing, runtime debugging, DevTools inspection, lag or jank investigation, CPU and memory monitoring, leak checks, and startup-performance analysis; reuse a verified workspace instance…

CherryHQ/cherry-studio · 75 tokens