pw-systematic-debugging

pw-systematic-debugging is a skill for Claude Code, Codex from trk/processwire-boost. It costs 35 tokens per session (1,173 once invoked), scanned A, original, MIT.

A systematic debugging procedure for ProcessWire, a PHP content-management system and web framework. It is used when there is a bug, failed test, blank screen, or other unexpected behavior.

In plain words
What is it for?
It helps diagnose ProcessWire bugs, test failures, blank pages, and other unexpected results.
Why use it?
It encourages investigating the cause before suggesting a fix, which helps avoid treating symptoms as the problem.

Skill for Claude CodeCodex

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

Good fit It helps diagnose ProcessWire bugs, test failures, blank pages, and other unexpected results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trk/processwire-boost/pw-systematic-debugging
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 trk/processwire-boost --skill pw-systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/trk/processwire-boost

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 pw-systematic-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/trk/processwire-boost/pw-systematic-debugging/github.svg)](https://agentmods.dev/skills/trk/processwire-boost/pw-systematic-debugging)
Your own site
<a href="https://agentmods.dev/skills/trk/processwire-boost/pw-systematic-debugging"><img src="https://agentmods.dev/badge/skills/trk/processwire-boost/pw-systematic-debugging/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 pw-systematic-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/trk/processwire-boost/pw-systematic-debugging"><img src="https://agentmods.dev/badge/skills/trk/processwire-boost/pw-systematic-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,173 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.00035 $0.01173
Opus 5.5 $0.00014 $0.00469
Sonnet 5.5 $0.00007 $0.00235
Haiku 4.5 $0.00003 $0.00117

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

Security

Grade A, and why

pw-systematic-debugging 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.

resources/boost/skills/pw-systematic-debugging/SKILL.md · 68 lines

How it starts

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

ProcessWire Systematic Debugging

ProcessWire catches and logs exceptions inside hooks, template rendering, and admin actions. Guessing a fix without reading the logs or reproducing the failure state wastes time and masks root causes.

Phase 1: Evidence & Log Collection (Mandatory)

  1. Inspect ProcessWire Logs (site/assets/logs/):
    • Via MCP: Run pw_system_get_logs or pw_system_logs_tail_last on errors and exceptions.
    • Via CLI: Run php vendor/bin/wire log:list --json and php vendor/bin/wire log:tail errors --lines=30 --json (or php vendor/bin/wire log:read exceptions --limit=20 --json).
    • Record the exact file, line number, and exception message from the stack trace.
  2. Reproduce with a Tight Feedback Loop:
    • For selector bugs: Run pw_query (MCP) or php vendor/bin/wire page:find "template=article, limit=10" --json to observe what ProcessWire actually returns.
    • For runtime/module bugs: Run a minimal reproduction via pw_execute (MCP) or php vendor/bin/wire test --filter=... so you have a command that reliably goes red on the bug.
  3. Trace Silent Hooks:
    • If a hook (Pages::saved, Page::render, URL hook) appears not to run, verify where it is registered (site/init.php vs site/ready.php vs module init()/ready()) and log its invocation:
$page = $event->arguments(0);
if ($page instanceof Page) {
	$event->wire()->log->save('debug', sprintf(
		'Hook fired for page %d (template=%s)',
		$page->id,
		$page->template->name
	));
}

Phase 2: Root-Cause Hypothesis

Check the most frequent ProcessWire failure modes against your evidence:

  • NullPage dereference: $pages->get() and $pages->findOne() return a NullPage object (id === 0) when no match is found, never null. Checking if ($p !== null) always evaluates to true! Always check if ($p->id) or if (!$p instanceof NullPage).
  • Access/Status exclusion in $pages->find(): $pages->find() and $pages->findOne() exclude hidden, unpublished, and restricted pages unless include=hidden|unpublished|all is passed.
  • Output formatting state ($page->of()): Saving a loaded page on the frontend without calling $page->of(false) first can throw an exception or corrupt formatted field values.
  • Pageimage vs Pageimages under of(false): In CLI scripts, hooks, and modules where $page->of() is false, a maxFiles=1 image/file field returns a Pageimages/Pagefiles collection instead of Pageimage|null. Use $page->getUnformatted('image')->first() or $page->getFormatted('image').
  • Numeric-string RBAC lookup: $users->get('41'), $roles->get('41'), and $permissions->get('41') look up page ID 41 rather than name=41. Reject ctype_digit($raw) and query name={$sanitizer->selectorValue($sanitizer->pageName($raw))} when resolving untrusted names.
  • Internal property bypass in Custom Page Classes: Accessing $this->template inside a Page subclass can bypass lazy loading; use $this->get('template') when inside a custom Page method if needed.

Read the full file on GitHub · 68 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. 12d ago Changed · +5 lines d7798722067b
  2. 1mo ago Changed · +5 lines · +5 tokens per session 599a4f2a0a57
  3. 3mo ago First seen · 58 lines · 30 tokens per session scan A 697a932c9b88

Subscribe to this mod's changes

pw-systematic-debugging is a skill published in the GitHub repository trk/processwire-boost (5 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,173 once invoked, about $0.0001 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-08-31.

Related

pw-systematic-debugging compared with skills from other repositories

pw-systematic-debugging next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pw-systematic-debuggingtrk/processwire-boostSkill5todayMITA35Claude Code, Codex
workers-developmentcloudflare/skillsSkill3.6k6d agoApache-2.0A68Claude Code
workers-profilingcloudflare/skillsSkill3.6k6d agoApache-2.0A31Claude Code
testing-dagsastronomer/agentsSkill465todayApache-2.0A77Claude Code
debugging-dagsastronomer/agentsSkill465todayApache-2.0A111Claude Code
loom-code-migrationcosmix/loomSkill66yesterdayMITA15Claude Code, Codex
loom-debuggingcosmix/loomSkill66yesterdayMITA24Claude Code