mcpField
B
bitrix-controllers

bitrix-controllers

github.com/bxmaximumDevelopment47178 installsUpdated 2w ago
Repository

About bitrix-controllers

A reference skill for Bitrix developers covering controller actions, filters, responses, and REST v3. It highlights version-specific rules and failure-prone details.

Key features

  1. 01Controller and action rules
  2. 02Filter configuration guidance
  3. 03Error and response handling
  4. 04REST v3 guidance
  5. 05Version compatibility notes

Use cases

  1. 01Implementing Bitrix controller actions
  2. 02Configuring filters for a kernel version
  3. 03Troubleshooting routes and REST issues

Install

Copy the command and run it in a terminal.

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

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

Bundled files

References and scripts installed along with SKILL.md.

rules/
basics.md
errors-response.md
filters.md

Details

From the project README

Bitrix Controllers

Baseline: main 23.0+ · Verified: main 26.800.0

TaskRead
Files, action names, minimal controller, autowired params, PageNavigationrules/basics.md
Default prefilters, filter attributes, configureActions(), #[ActionAccess], custom filterrules/filters.md
Errors, JSON envelope, response classes, renderView(), scopes, REST v3rules/errors-response.md

Invariants

  • Actions only orchestrate: input → service → Result → data or addErrors(). Services come in as action params (DI canon: bitrix-framework).
  • Filter attributes are Since main 26.250*; on older kernels use configureActions(). Never both for one action (ActionConfigurationException).
  • METHOD_* constants live on ActionFilter\HttpMethod, not on the attribute Attribute\Rule\HttpMethod. Referencing them on the attribute throws while the controller is built, so every action of that controller fails.
  • Rule attributes append to the defaults (Authentication, HttpMethod([GET, POST]), Csrf). Adding #[Authentication] or #[Csrf] again runs the filter twice.
  • With PascalCase files write the controller segment in class case: vendor:module.Post.create. Lower-case post resolves to lib/infrastructure/controller/post.php and fails on Linux. REST lower-cases method names, so a PascalCase controller is unreachable over classic REST (bitrix-rest).
  • HTML (renderView/renderComponent) only in controllers reached by routes; BX.ajax.runAction() expects JSON.

Comments

Markdown supported