mcpField
B
bitrix-routing

bitrix-routing

github.com/bxmaximumDevelopment47270 installsUpdated 2w ago
Repository

About bitrix-routing

A Bitrix development skill for configuring routes and handlers. It is for developers building routed pages and APIs, with guidance on route files, matching behavior, controller protections, and migration from urlrewrite.php.

Key features

  1. 01Configure route files and routing.config
  2. 02Define routes, verbs, params, and handlers
  3. 03Build controller-backed public pages
  4. 04Understand route matching and compile cache
  5. 05Migrate from urlrewrite.php

Use cases

  1. 01Add GET and state-changing routes
  2. 02Protect routed controller actions
  3. 03Move legacy URL rules to routing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-routing

After installing, type/bitrix-routingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
matching-legacy.md
public-pages.md
routes-handlers.md
setup.md

Details

From the project README

Bitrix Routing

Baseline: main 23.0+ · Verified: main 26.800.0

TaskRead
Web server rule, routing config, module route filesrules/setup.md
web.php, verbs, params, names, groups, closure handlersrules/routes-handlers.md
Public page on a controller, PublicPageControllerrules/public-pages.md
Match order, compile cache, site-guard, urlrewrite.php migrationrules/matching-legacy.md

Invariants

  • User routes only in /local/routes/*.php, listed by basename in routing.config. Module route files are required from there.
  • Handlers are thin: [Controller::class, 'action'] for anything with auth, CSRF or a stable contract. Protect routed controllers with filters (bitrix-controllers), never with ->middleware().
  • Routed controllers run in SCOPE_AJAX: the default Authentication + Csrf apply to GET pages too. Drop them per action for public read-only pages.
  • Explicit verbs (get/post/…) for state-changing routes, ->where() on every param.
  • A physical file at the same path wins over the route: the web server serves it before routing_index.php.

Comments

Markdown supported