kirby-routing-and-representations
Implements custom Kirby routes and content representations (.json/.xml/.rss), including redirects, sitemap endpoints, and URL pattern filtering. Use when building endpoints, redirects, or representation templates that change how URLs resolve.
pinned to #3474420updated 3 weeks ago
Ask your AI client: “install skills/kirby-routing-and-representations”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/kirby-routing-and-representationsmetahub onboarded this repo on the author's behalf.
If you own github.com/bnomei/kirby-mcp on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
56
Last commit
3 weeks ago
Latest release
published
- #agent-tools
- #agentic-workflow
- #claude-code
- #cli
- #codex-cli
- #commands
- #developer-tools
- #google-gemini
- #kirby
- #kirby-cms
- #knowledge-base
- #mcp-server
- #model-context-protocol
- #php8
- #prompts
- #resources
- #tools
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.3474420· 3 weeks ago
Kind-specific
31Skill: SKILL.md present
found at skills/kirby-routing-and-representations/SKILL.md · frontmatter source: SKILL.md
Skill: body content present
255 words · 2,263 chars · 7 sections · 1 code block
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrent3474420warn3 weeks ago
Contents
KB entry points
kirby://kb/scenarios/13-custom-routeskirby://kb/scenarios/21-filtering-via-routeskirby://kb/scenarios/49-sitemap-xml-routekirby://kb/scenarios/78-trailing-slash-and-canonical-urlskirby://kb/scenarios/02-json-content-representation-ajax-load-more
Required inputs
- URL pattern and HTTP methods.
- Response type and content language behavior.
- Redirect or canonicalization rules.
Decision guide
- Use content representations for page-backed JSON/XML/RSS.
- Use routes for non-page endpoints, redirects, or custom logic.
- Avoid greedy patterns that shadow representations.
Pattern hint
- Put specific routes before catch-alls; avoid top-level
(:all)when using representations.
Canonical redirect example
[
'pattern' => '(:any)/',
'action' => function ($path) {
return go('/' . trim($path, '/'), 301);
}
]
Common pitfalls
- Route patterns that shadow
.jsonor.rssrepresentations. - Expecting
kirby:kirby_render_pageto execute route logic.
Workflow
- Clarify the URL pattern, HTTP methods, response type, and language behavior.
- Call
kirby:kirby_initand readkirby://rootsto locate config and template roots. - Read
kirby://config/routesto understand current route configuration. - If runtime is available, call
kirby:kirby_routes_indexto see registered patterns; otherwise runkirby:kirby_runtime_statusandkirby:kirby_runtime_installfirst. - Inspect existing templates/controllers to avoid collisions:
kirby:kirby_templates_indexkirby:kirby_controllers_index
- For content representations, add
site/templates/<template>.<type>.phpand optionalsite/controllers/<template>.<type>.php. - For routes, add or adjust
routesinsite/config/config.phpor a plugin. Avoid greedy patterns that shadow.json/.rssrepresentations. - Validate output:
- use
kirby:kirby_render_page(contentType: json|xml|rss)for representations - manually hit route URLs for router behavior (render does not execute the router)
- use
- Search the KB with
kirby:kirby_search(examples: "custom routes", "json content representation", "filtering via routes", "sitemap.xml", "trailing slash").
Reviews
No reviews yet. Be the first.
Related
orchestration-patterns
>
migration-patterns
>
deployment-sop
>
mh install skills/kirby-routing-and-representations