bitrix-project-structure

Organize Bitrix project structure and PSR-4 autoloading rules.

33|3|Updated Jun 5, 2025
One-click install
npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-project-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitrix-project-structure
Source: https://github.com/bxmaximum/bitrix_ai_challenge/tree/main/.agents/skills/bitrix-project-structure
Command: npx skills add https://github.com/bxmaximum/bitrix_ai_challenge --skill bitrix-project-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bitrix project structure and autoloading guidance to prevent confusion between /local and /bitrix, PSR-4 autoloading, and Loader::includeModule usage.

Core Features & Use Cases

  • Clear guidance on where to place custom code and how to structure modules, components, and routes.
  • Explanation of PSR-4 autoloading rules and file placement for scalable Bitrix projects.
  • Use Case: When migrating code from /bitrix to /local or starting a new module, follow this structure to maintain maintainability and compatibility.

Quick Start

Place your custom modules and components under /local, ensure PSR-4 autoloading is configured, and verify Loader::includeModule usage when loading modules.

Frequently Asked Questions about bitrix-project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure PSR-4 autoloading in a Bitrix project?

Configure PSR-4 autoloading in Bitrix by placing custom modules under the /local directory and mapping namespaces to file paths. This ensures scalable project development and correct class loading.

What is the difference between using /local and /bitrix for custom code?

The /local directory isolates custom code from core updates, while /bitrix contains system files. Placing modules in /local maintains compatibility and prevents overwriting during platform updates.

How do I load a Bitrix module using Loader::includeModule?

Use Loader::includeModule to load Bitrix modules programmatically. Verify the module is placed correctly under /local and PSR-4 autoloading is configured to ensure successful inclusion.

Can I migrate custom code from /bitrix to /local without breaking module loading?

Yes, you can migrate code from /bitrix to /local by updating PSR-4 autoload mappings and verifying Loader::includeModule paths. This maintains maintainability and prevents misconfiguration.

What are the limitations of Bitrix autoloading rules for scalable development?

Bitrix autoloading requires strict PSR-4 file placement and correct module structure under /local. Misconfiguration can break Loader::includeModule, so safety constraints must be followed to prevent errors.