agentsclimarketplace

Bitrix settings

Skill bxmaximum/bitrix-framework-skills/skills/bitrix-settings

Covers kernel configuration — .settings.php sections (connections, cache, session, crypto, exception_handling, routing, messenger, pull, smtp, loggers, composer), .settings_extra.php, readonly flag. Applied when configuring kernel behavior. Key terms — .settings.php, settings, readonly, connections, exception_handling.From its SKILL.md

Install
npx -y skills add bxmaximum/bitrix-framework-skills --skill bitrix-settings

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 19 stars19 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.9 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Kernel Configuration (.settings.php)

Baseline: main 23.0+. Features newer than baseline are marked Since.

Primary config: /bitrix/.settings.php or /local/.settings.php (Since main 24.100). Overrides: /bitrix/.settings_extra.php or /local/.settings_extra.php (Since main 24.100).

Errors in .settings.php can break the site. Back up before changes.

Also maintain /local/php_interface/dbconn.php for legacy kernel compatibility even when using D7 only.

Structure

Each section:

'section_name' => [
    'value' => [ /* settings */ ],
    'readonly' => true,  // true = no runtime API changes
],

Global vs Module .settings.php

ScopeTypical sectionsBehavior
Global (/local/.settings.php)connections, cache, cache_flags, session, cookies, crypto, exception_handling, routing, messenger, loggers, composer, http_client_options, pull, smtp, default_language, restLoaded as kernel Configuration
Module (/local/modules/<id>/.settings.php)controllers, services, console (commands key — not cli)On Loader::includeModule, services are registered into ServiceLocator. Other module sections are not a full merge into global config

Routing is global-only: the router loads files listed in global routing.config from /local/routes/ and /bitrix/routes/ only. Module route files must be required from /local/routes/web.php — a module .settings.php routing section does not auto-load them.

There is no validation section in .settings.php. Use ValidationService via ServiceLocator (main.validation.service in main module services). See skill bitrix-validation.

Key Sections

SectionPurpose
connectionsRequired. DB and additional connections
cacheCache engine (files / redis / memcache / …)
cache_flagsPer-entity / named TTL caps (e.g. config_options, b_<table>_max_ttl / _min_ttl for ORM)
sessionSession handlers, lifetime, separated mode
cookiesCookie flags (secure, http_only)
cryptoEncryption keys for cookies and fields
exception_handlingDebug, error masks, log (see below)
routingRoute config files (web.php, etc.)
messengerQueue brokers and handlers (Since main 25.100.300, alpha)
loggersPSR-3 logger registration
http_client_optionsDefault options for Bitrix\Main\Web\HttpClient
restREST controller defaults (e.g. defaultNamespace in main/.settings.php)
controllersController namespaces (often module-level)
servicesDI container entries
consoleCLI commands (commands => FQCN list)
composerPath to composer.json
pullPush/pull server settings
smtpMail transport
default_languageDefault language code

exception_handling

Keys applied in Application::initializeExceptionHandler() (verified):

KeyRole
debugShow errors on screen — never true in production
handled_errors_typesPHP error bitmask logged / handled
exception_errors_typesSubset that becomes exceptions
ignore_silenceIf true, ignore @ operator
assertion_throws_exceptionAssertions throw
assertion_error_typeAssertion error level
track_modulesOptional list of modules to track
logLogger config: optional class_name / extension / required_file, plus settings (file, log_size, …)
'exception_handling' => [
    'value' => [
        'debug' => false,
        'handled_errors_types' => E_ALL & ~E_NOTICE & ~E_USER_NOTICE,
        'exception_errors_types' => E_ALL & ~E_NOTICE & ~E_WARNING & ~E_USER_NOTICE & ~E_USER_WARNING & ~E_COMPILE_WARNING & ~E_DEPRECATED,
        'ignore_silence' => false,
        'assertion_throws_exception' => true,
        'assertion_error_type' => E_USER_ERROR,
        'log' => [
            'settings' => [
                'file' => 'bitrix/modules/error.log',
                'log_size' => 1000000,
            ],
        ],
    ],
    'readonly' => false,
],

cookies / http_client_options / cache_flags (examples)

'cookies' => [
    'value' => [
        'secure' => false,
        'http_only' => true,
    ],
    'readonly' => false,
],

'http_client_options' => [
    'value' => [
        // merged into every new HttpClient — redirect, timeouts, etc.
        'socketTimeout' => 30,
        'streamTimeout' => 60,
    ],
    'readonly' => false,
],

'cache_flags' => [
    'value' => [
        'config_options' => 3600,
        // ORM: "b_tablename_max_ttl" / "b_tablename_min_ttl" (see Entity::getCacheTtl)
    ],
    'readonly' => false,
],

composer

'composer' => [
    'value' => ['config_path' => '../composer.json'],
    'readonly' => true,
],

crypto

Encryption keys for CryptoField, encrypted cookies. Store keys outside git — use .settings_extra.php or environment.

readonly

  • true — protects critical settings (DB, services) from runtime modification.
  • false — allows runtime changes (e.g. exception_handling).

Checklist

  • User overrides in /local/.settings.php, not edited /bitrix/.settings.php.
  • debug => false on production.
  • Secrets in .settings_extra.php or env vars.
  • readonly => true for connections and services.
  • Module services / controllers / console in module .settings.php; routing only via global + /local/routes/.
  • No fictional validation section — use main.validation.service.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.