.cursor/skills/implement-b24-features/SKILL.md
Implement advanced Битрикс24 features like Widgets (Embeds), Robots (Automation), Events, and Queues. Use this skill when you need to integrate deeply with Битрикс24 UI or automation processes.
npx skillsauth add rustams/inbound implement-b24-featuresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Widgets allow embedding your application into Битрикс24 UI (e.g., CRM tabs, menus).
Use placement.bind method (usually during app installation).
await $b24.callMethod('placement.bind', {
PLACEMENT: 'CRM_DEAL_DETAIL_TAB',
HANDLER: 'https://your-domain.com/widget-handler', // Must be public URL
TITLE: 'My Widget',
DESCRIPTION: 'Widget description'
});
pages/handler/my-widget.client.vue) that renders the widget content.PLACEMENT_OPTIONS (e.g., ID of the deal) in the POST request.Robots are custom automation actions in Битрикс24.
Use bizproc.robot.add method.
await $b24.callMethod('bizproc.robot.add', {
CODE: 'my_robot',
HANDLER: 'https://your-domain.com/api/robot-handler', // Backend endpoint
NAME: 'My Robot',
PROPERTIES: {
my_param: { Name: 'Parameter', Type: 'string' }
}
});
/api/robot-handler) that receives the robot execution request.USE_SUBSCRIPTION is 'Y', call bizproc.event.send to return data to the workflow.Handle Битрикс24 events (e.g., ONCRMDEALADD).
Use event.bind method.
await $b24.callMethod('event.bind', {
event: 'ONCRMDEALADD',
handler: 'https://your-domain.com/api/events' // Backend endpoint
});
/api/events) to receive event data.auth tokens).Use queues for background processing (long-running tasks).
ENABLE_RABBITMQ=1 in .env.instructions/queues/php.md).instructions/queues/python.md).amqplib (instructions/queues/node.md).These are verified against the official REST API and must be followed exactly:
| Method | Key Parameter | Correct | Wrong |
|--------|--------------|---------|-------|
| crm.type.update | id | ordinal ID (from crm.type.list → id) | entityTypeId |
| crm.type.get | id | ordinal ID | entityTypeId |
| crm.category.* | entityTypeId | entityTypeId (e.g. 1136) | ordinal ID |
| userfieldconfig.delete | moduleId | required "crm" | omitting it |
When creating enumeration (list) fields via userfieldconfig.add, values go in field.enum with lowercase keys:
payload = {
"moduleId": "crm",
"field": {
"entityId": "CRM_99",
"fieldName": "UF_CRM_99_MY_LIST",
"userTypeId": "enumeration",
"enum": [
{"value": "Option 1", "def": "N", "sort": "10"},
{"value": "Option 2", "def": "Y", "sort": "20"},
],
},
}
Critical: uppercase keys (VALUE, DEF, SORT) are silently ignored — the field is created but with zero values. settings.LIST also does NOT work for userfieldconfig.add.
When reading back via userfieldconfig.get, values appear under field.enum (not settings.LIST).
Битрикс24 forbids creating intermediate (non-terminal) stages after a terminal stage (SEMANTICS: "S" or "F").
Strategy for programmatic stage sync:
SEMANTICS to "P" (process)SEMANTICS on terminal stages lastSORT vs terminals (critical for new smart processes): even with neutralized semantics, Bitrix may reject crm.status.add for an intermediate if its SORT is greater than or equal to the SORT of an existing SUCCESS/FAIL row on the target portal (RU error like «Нельзя создать промежуточную стадию после успешной»). Snapshot SORT values from a reference process can be high while a freshly created process has terminals at lower SORT. Inbound fix: media_template_apply._apply_stages computes the minimum SORT among target rows matching template terminal suffixes and clamps SORT for new intermediate adds to sit below that floor. Tests: main/tests/test_media_template_stage_sync.py (test_strict_clamps_new_intermediate_sort_below_terminal).
Media template apply (Inbound): after crm.type.update enabling funnels, Bitrix may lag before crm.status.list shows default stages (NEW, PREPARATION, CLIENT). The installer polls (stage_sync_barrier) before syncing. Bitrix-generated intermediate codes UC_* not in the template are deleted before crm.status.add for canonical suffixes to avoid Duplicate STATUS_ID (crm.status.add REST docs).
Reference implementation: backends/python/api/main/services/media_template_installer.py
Key design decisions:
set None then save new) to avoid stale keys from deep mergeUF_CRM_{source_ordinal}_{suffix} → UF_CRM_{target_ordinal}_{suffix}id vs entityTypeId confusion is a common source of silent failures.tools
This skill should be used when the user asks to "design agent tools", "create tool descriptions", "reduce tool complexity", "implement MCP tools", or mentions tool consolidation, architectural reduction, tool naming conventions, or agent-tool interfaces.
development
This skill should be used when the user asks to "start an LLM project", "design batch pipeline", "evaluate task-model fit", "structure agent project", or mentions pipeline architecture, agent-assisted development, cost estimation, or choosing between LLM and traditional approaches.
development
PM skill for Claude Code, Codex, Cursor, and Windsurf. Diagnoses SaaS metrics, critiques PRDs, plans roadmaps, runs discovery, coaches PM career transitions, and pressure-tests AI product decisions. Six knowledge domains, 12 templates, 30+ frameworks, and an opinionated interaction style that labels assumptions and names tradeoffs.
development
Understand the Битрикс24 Starter Kit project structure. Use this skill to find where specific code (frontend, backend, infrastructure) is located.