wc-logging

wc-logging is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 91 tokens per session (1,984 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,984 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.01984
Opus 5.5 $0.00036 $0.00794
Sonnet 5.5 $0.00018 $0.00397
Haiku 4.5 $0.00009 $0.00198

Measured 1mo ago against content hash 3e2380cce30e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 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 · 182 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. 1mo ago Changed · -1 lines 3e2380cce30e
  2. 1mo 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 (25 stars, last pushed 7d ago), licensed MIT. It adds 91 tokens to every session and 1,984 once invoked, about $0.0004 per session on Opus 5.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

selling-partner-listing-troubleshooter

Top-level entry point for any 'something's wrong with my listing' question in the Selling Partner API (SP-API). Does a quick read of the listing's status and issues, identifies the symptom, and routes the seller to the right specialist skill. Use when the complaint is non-specific: 'something's wrong with my listing'…

Amazon-Quick/Amazon-Quick-official-catalog · 155 tokens

gke-workload-scaling-troubleshooting

Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as , FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter…

google/skills · 170 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

reproduce-and-fix-issues

Reproduce triaged Slack bugs through a configured app-control adapter, verify existing fixes, and open a bounded draft pull request only after before-and-after proof. Use only from the configured Benny repro automation.

backnotprop/pstack · 48 tokens

factory-lookback

Experimental workflow for auditing recurring feedback, telemetry, errors, and brittle delivery paths to find systemic fixes. Use for periodic or requested cross-source lookbacks, not routine single-item intake.

BuilderIO/skills · 40 tokens

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 · 40 tokens