bitrix-sessions

bitrix-sessions is a skill for Claude Code, Codex from bxmaximum/bitrix-framework-skills. It costs 51 tokens per session (1,423 once invoked), scanned A, original, MIT.

A guide to Bitrix session handling, which stores temporary data for a user's interaction with a website or application.

In plain words
What is it for?
Use it when handling sessions in AJAX requests, selecting session modes, or configuring separated session behaviour.
Why use it?
It helps replace direct session access with Bitrix's supported session methods and choose suitable storage such as cache, a database, Redis, or no storage.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when handling sessions in AJAX requests, selecting session modes, or configuring separated session behaviour.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bxmaximum/bitrix-framework-skills/bitrix-sessions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bxmaximum/bitrix-framework-skills --skill bitrix-sessions
Clone the repo
git clone --depth 1 https://github.com/bxmaximum/bitrix-framework-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bitrix-sessions

README.md
[![agentmods](https://agentmods.dev/badge/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions/github.svg)](https://agentmods.dev/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions)
Your own site
<a href="https://agentmods.dev/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions"><img src="https://agentmods.dev/badge/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bitrix-sessions

Your own site · 80×15
<a href="https://agentmods.dev/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions"><img src="https://agentmods.dev/badge/skills/bxmaximum/bitrix-framework-skills/bitrix-sessions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.01423
Opus 5.5 $0.00020 $0.00569
Sonnet 5.5 $0.00010 $0.00285
Haiku 4.5 $0.00005 $0.00142

Measured 26d ago against content hash e3c877729db1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bitrix-sessions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bitrix-sessions/SKILL.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Сессии

Baseline: main 23.0+ · Verified: main 26.1000.0

Перед PHP-кодом прочитай bitrix-framework, если ещё не читал его в этой задаче.

Не обращайся к $_SESSION: это обходит отложенный запуск и режимы только чтения/виртуальной сессии.

use Bitrix\Main\Application;

$session = Application::getInstance()->getSession(); // SessionInterface + ArrayAccess
$session->set('vendor.wizard', ['step' => 2]);
$state = $session->get('vendor.wizard');              // null при отсутствии
if ($session->has('vendor.flash')) { $msg = $session->get('vendor.flash'); $session->remove('vendor.flash'); }
$session->regenerateId();                             // после входа или изменения привилегий
  • Добавляй к ключам префикс модуля; храни только скаляры/массивы.
  • Сессия записывается и закрывается до фоновых заданий и агентов: записи из addBackgroundJob() теряются (bitrix-background-jobs). В CLI, агентах и Messenger сессии нет.

Локальная сессия — «кеш сессии»

$local = Application::getInstance()->getLocalSession('vendor_cart'); // отдельный контейнер для каждого имени
$local->set('productIds', [1, 2, 3]);
$ids = $local['productIds'] ?? [];
  • Хранится в движке cache (Redis/Memcache/APC) по ID сессии, записывается в конце хита; при файловом кеше переходит на $_SESSION.
  • TTL: .settings.php → 'session_local_storage' => ['value' => ['ttl' => 86400]].
  • Подходит для корзин, фильтров, черновиков мастера: больших/часто меняющихся данных, которым не следует раздувать и блокировать основную сессию.

Сессия ядра

Application::getInstance()->getKernelSession() хранит данные ядра (авторизация, sessid). В режиме default это основная сессия; в separated — зашифрованный cookie (crypto_key), без объектов. Не храни там данные приложения.

Since main 26.900 зашифрованное значение cookie имеет внутреннюю версию v2: и HMAC-подпись. Старые зашифрованные cookies не проходят проверку: ожидай повторный вход и сброс сессий в separated при обновлении. Не отключай проверку для сохранения старого cookie. До 26.900 формат старый; повторная авторизация безопаснее самодельного переноса cookie.

Read the full file on GitHub · 85 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago Changed · +4 lines · -5 tokens per session e3c877729db1
  2. 2mo ago Changed · -120 lines · -55 tokens per session 16556c12d0af
  3. 3mo ago First seen · 201 lines · 111 tokens per session scan A 36e7741b147d

Subscribe to this mod's changes

bitrix-sessions is a skill published in the GitHub repository bxmaximum/bitrix-framework-skills (75 stars, last pushed 13d ago), licensed MIT. It adds 51 tokens to every session and 1,423 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

bitrix-sessions compared with skills from other repositories

bitrix-sessions next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bitrix-sessionsbxmaximum/bitrix-framework-skillsSkill7513d agoMITA51Claude Code, Codex
roblox-performanceTabooHarmony/roblox-brainSkill229todayMITA30Claude Code
roblox-toolingTabooHarmony/roblox-brainSkill229todayMITA47Claude Code
roblox-growthTabooHarmony/roblox-brainSkill229todayMITA32Claude Code
roblox-dataTabooHarmony/roblox-brainSkill229todayMITA30Claude Code
roblox-inputTabooHarmony/roblox-brainSkill229todayMITA33Claude Code
roblox-networkingTabooHarmony/roblox-brainSkill229todayMITA30Claude Code