About bitrix-settings
bitrix-settings is a reference skill for configuring Bitrix kernel settings in `.settings.php` and `.settings_extra.php`. It explains file precedence, global and module sections, and practices for keeping configuration safe during admin or kernel writes.
Key features
- 01Main and extra settings file precedence
- 02Global and module section reference
- 03Section replacement behavior
- 04Readonly section format
- 05Guidance on closures and kernel writes
Use cases
- 01Choose the active settings file
- 02Place project-specific configuration
- 03Configure SMTP and settings sections
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bxmaximum/ bitrix-framework-skills --skill bitrix-settingsAfter installing, type/bitrix-settingsin Claude Code to confirm it loaded.
Bundled filesrules/sections.mdrules/smtp.md
Details
From the project READMEKernel configuration (.settings.php)
Baseline: main 23.0+ · Verified: main 26.800.0
| Task | Read |
|---|---|
Sections: connections, exception_handling, cookies, crypto, ui, … | rules/sections.md |
Mail via SMTP (smtp, per-sender SMTP) | rules/smtp.md |
Which file is read
- Main:
/local/.settings.phpif present (Since main 24.100), else/bitrix/.settings.php— only one. The/localfile replaces the kernel file: copy every section,connectionsincluded. - Extra:
/local/.settings_extra.php, else/bitrix/.settings_extra.php— only one; loaded after the main file, each top-level section replaces the whole section (no deep merge). - Put project sections (closures, secrets,
routing,loggers,messenger) into/local/.settings_extra.php; it shadows/bitrix/.settings_extra.php, so move that file's sections over. - Kernel/admin writes (
Configuration::setValue(), settings forms)var_exportmain-file data into the main file; closures there break on the next write. The extra file is never rewritten. - Site checker and
services/quickway.phpread only/bitrix/.settings.php— keep it valid.IsConfigFile()denies file-manager access to/bitrix/.settings.phponly, not to/local/.settings*.php. php_interface/dbconn.php(/localSince main 24.100, else/bitrix) is still required.
Format
'section' => ['value' => [...], 'readonly' => true] — readonly sections are skipped by runtime Configuration::add()/delete() and admin forms. Read: Configuration::getValue('section').
Global vs module
| File | Sections |
|---|---|
| global main/extra | connections, cache, cache_flags, session, cookies, crypto, exception_handling, routing, messenger, loggers, composer, http_client_options, pull, smtp, ui, default_language, services |
/local/modules/<id>/.settings.php (read while the module is installed) | services, controllers, console, messenger, rest (v3) |
No validation section exists (bitrix-validation). routing is global only (bitrix-routing).
Comments
Markdown supported