Agent skill
kirby-debugging-and-tracing
Diagnoses Kirby rendering/runtime issues using MCP runtime rendering, dump traces, and template/snippet/controller indexes. Use when outputs are wrong, errors occur, or tracing execution paths is required.
Install this agent skill to your Project
npx add-skill https://github.com/bnomei/kirby-mcp/tree/main/skills/kirby-debugging-and-tracing
SKILL.md
Kirby Debugging and Tracing
Quick start
- Follow the workflow below to reproduce and trace render issues.
KB entry points
kirby://kb/scenarios/68-snippet-controllerskirby://kb/scenarios/03-shared-controllerskirby://kb/scenarios/13-custom-routeskirby://kb/scenarios/02-json-content-representation-ajax-load-morekirby://kb/scenarios/14-escaping-and-safe-markdown
Required inputs
- Page id/uuid or URL path.
- Expected vs actual output and content type.
- Auth/session requirements and steps to reproduce.
Repro checklist
- Capture page id/uuid or URL, content type, and expected vs actual output.
- Note auth/session state and request parameters.
- Record cache state and the render
traceId.
Stop condition
- Stop once output matches expected behavior and temporary dumps are removed.
Dump placement example
mcp_dump([
'page' => $page->id(),
'template' => $page->intendedTemplate()->name(),
]);
- Remove dumps after the issue is resolved.
Common pitfalls
- Leaving
mcp_dump()in production code. - Debugging cached output or the wrong content type.
Workflow
- Ask for page id/uuid or URL path, expected vs actual output, content type, and any session/login requirements.
- Call
kirby:kirby_init, then ensure runtime availability withkirby:kirby_runtime_statusandkirby:kirby_runtime_installif needed. - Reproduce with
kirby:kirby_render_page(noCache=true, contentType=...)and capturetraceIdplus errors. - Locate relevant code paths:
kirby:kirby_templates_indexkirby:kirby_snippets_indexkirby:kirby_controllers_indexkirby:kirby_models_indexkirby:kirby_routes_indexwhen routing is involved
- If the issue is unclear, add targeted
mcp_dump()calls and read the trace withkirby:kirby_dump_log_tail(traceId=...). - Apply the smallest fix, re-render to confirm, and remove temporary dumps.
- Search the KB with
kirby:kirby_search(examples: "custom routes", "snippet controllers", "shared controllers", "content representations").
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
kirby-i18n-workflows
Manages Kirby multi-language workflows, translations, and localized labels. Use when dealing with languages, translation keys, placeholders, or importing/exporting translations.
kirby-security-and-auth
Secures Kirby sites with access restriction, user roles, permissions, and protected downloads. Use when implementing login/role-based access, permissions, or file protection.
kirby-headless-api
Exposes Kirby content to headless clients using the API, KQL, and JSON representations. Use when building API endpoints, KQL queries, or headless frontends.
kirby-performance-and-media
Improves Kirby performance and media delivery (cache tuning, CDN, responsive images, lazy loading). Use when optimizing page speed, caching, or image handling.
kirby-panel-and-blueprints
Designs Kirby blueprints and Panel UI, including blueprint reuse/extends, programmable blueprints, and custom Panel fields/sections/areas. Use when changing the Panel experience or schema.
kirby-upgrade-and-maintenance
Upgrades Kirby and maintains dependencies safely using composer audit, plugin compatibility checks, and official docs. Use when updating Kirby versions or making maintenance changes that affect runtime.
Didn't find tool you were looking for?