craft-debugger

craft-debugger is an agent for Claude Code from michtio/craftcms-claude-skills. It costs 14 tokens per session (1,289 once invoked), scanned A, original, MIT.

A debugging assistant for plugins built for Craft CMS, a system used to create and manage websites. It investigates problems step by step using the project's development environment.

In plain words
What is it for?
Investigating Craft CMS 5 plugin errors, testing possible causes, reviewing relevant code, and checking fixes in the development environment.
Why use it?
It provides a consistent way to narrow down the cause of a plugin bug while following the project's rules for tools, paths, and checks.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/Shared/dev/craft-plugins/....

Part of the craftcms-claude-skills plugin — 13 skills, 6 agents shipped together

Good fit Investigating Craft CMS 5 plugin errors, testing possible causes, reviewing relevant code, and checking fixes in the development environment.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add michtio/craftcms-claude-skills
Claude Code
/plugin install craftcms-claude-skills

Made for: Claude Code.

Or install craftcms-claude-skills, the plugin that ships this one along with the rest of its 13 skills, 6 agents.

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 craft-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/michtio/craftcms-claude-skills/craft-debugger.svg)](https://agentmods.dev/agents/michtio/craftcms-claude-skills/craft-debugger)
Your own site
<a href="https://agentmods.dev/agents/michtio/craftcms-claude-skills/craft-debugger"><img src="https://agentmods.dev/badge/agents/michtio/craftcms-claude-skills/craft-debugger.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,289 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.00014 $0.01289
Opus 5 $0.00007 $0.00645
Sonnet 5 $0.00003 $0.00258
Haiku 4.5 $0.00001 $0.00129

Measured 8d ago against content hash 5ab6c0377b89, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

craft-debugger 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 8d 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.

agents/craft-debugger.md · 75 lines

How it starts

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

You are a debugging specialist for Craft CMS 5 plugin development. You systematically investigate issues with a hypothesis-driven approach.

Environment rules

  • Paths: Always work in cms/vendor/{vendor}/{plugin}/ (the symlinked path), never absolute source paths like /Users/Shared/dev/craft-plugins/....
  • DDEV only: Never run php, composer, npm, or vendor/bin/pest on the host. Use ddev composer, ddev craft, ddev npm, or ddev exec for everything.
  • ECS scope: When running ECS --fix, scope to changed files only. Never run --fix across the full project without explicit approval.
  • Dedicated tools over Bash: Use Grep instead of grep, rg, or find | xargs grep for searching file contents. Use Glob instead of find for finding files by pattern. Use Read instead of cat or head for reading file contents. Never use cd path && command — use absolute paths. For git in other directories, use git -C /path instead of cd /path && git. Quick ls to inspect a directory, readlink for symlinks, and tail -n on storage/logs/ are fine — but not for reading source files (use Read with offset/limit).
  • Output density: Lead with the diagnosis, not the investigation journey. Report: root cause, affected file:line, fix applied, verification result. One paragraph per hypothesis tested, not a narrative. When ruling out hypotheses, a single line suffices: Ruled out: site context — query already uses site('*').

Debugging workflow

  1. Reproduce: Understand the exact steps to trigger the bug. Read the error log, queue failure, or failing test.
  2. Hypothesize: Form 2-3 possible explanations before reading code. If the symptom appeared right after a change in a related area, that change is the prime suspect, not the framework.
  3. Investigate: Read relevant code, check Craft logs (storage/logs/), run targeted tests.
  4. Isolate: Write a minimal failing test that captures the bug.
  5. Fix: Make the smallest change that fixes the issue.
  6. Verify: Run ddev composer check-cs, ddev composer phpstan, and the full test suite.

Read the full file on GitHub · 75 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. 8d ago First seen · 75 lines · 14 tokens per session scan A 5ab6c0377b89

Subscribe to this mod's changes

craft-debugger is an agent published in the GitHub repository michtio/craftcms-claude-skills (78 stars, last pushed 5d ago), licensed MIT. It adds 14 tokens to every session and 1,289 once invoked, about $0.0001 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-08-30.

Related

Other agents, from other repositories

deep-bug-investigator

Deep bug investigation using 4 parallel subagents (reproduction, root cause, impact, fix strategy). Use when bug is complex, can't be reproduced locally, or needs thorough analysis. Spawns fresh-context subagents for each investigation track.

oliver-kriska/claude-elixir-phoenix · 54 tokens

ash-query-optimizer

Ash query optimizer — detects N+1 loads, suggests aggregates over load+Enum, identifies calculation vs load tradeoffs. Use when reviewing Ash queries, LiveView data loading, or domain action efficiency.

oliver-kriska/claude-elixir-phoenix · 45 tokens

call-tracer

Orchestrates parallel call tree tracing using subagents for each entry point category (Controllers, LiveViews, Workers, GenServers). Use proactively when debugging unexpected values, tracing request flow, or planning signature changes.

oliver-kriska/claude-elixir-phoenix · 46 tokens

bug-investigator

Use when a bug, regression, or unexpected behaviour needs its root cause traced to specific code before any fix is designed. Investigates only — never edits files. Returns a structured report citing file:line evidence.

kardebadas/claude-plugin · 46 tokens

catchup-runner

Does the catch-up fan-out, impact analysis, and brief assembly for /catchup on Sonnet (cheaper/faster than the caller's session). Spawned by the /catchup and /ketchup skills with a pre-resolved time window. Not user-invoked directly.

oliver-kriska/claude-elixir-phoenix · 63 tokens

parallel-reviewer

Parallel code review using 4 specialist agents (elixir-reviewer, security-analyzer, testing-reviewer, verification-runner). Use for thorough review of significant changes.

oliver-kriska/claude-elixir-phoenix · 38 tokens