GitHub Openapi Skill
holon-run/uxc
Operate GitHub REST API through UXC with the official OpenAPI schema, explicit gh-to-uxc auth import, and read-first guardrails for repo, issue, pull request, and event workflows.
A skill your agent uses whenever working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues, reading existing ones, planning implementation from an issue, referencing an…
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .claude/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .claude/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .agents/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .agents/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .cursor/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .cursor/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/bitrix24/b24phpsdk.git --path .claude/skills/b24phpsdk-maintainer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .gemini/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .gemini/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .github/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .github/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install bitrix24/b24phpsdk b24phpsdk-maintainer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bitrix24/b24phpsdk.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/b24phpsdk-maintainer .opencode/skills/b24phpsdk-maintainer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "b24phpsdk-maintainer" agent skill from https://github.com/bitrix24/b24phpsdk/tree/v3/.claude/skills/b24phpsdk-maintainer into .opencode/skills/b24phpsdk-maintainer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "b24phpsdk-maintainer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
b24phpsdk-maintainerA skill your agent uses whenever working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues, reading existing ones, planning implementation from an issue, referencing an…
B24phpsdk Maintainer is an agent skill from bitrix24/b24phpsdk. Use this skill whenever working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues, reading existing ones, planning implementation from an issue, referencing an issue in commits, branches, or CHANGELOG, preparing or updating a release pull request (MR) or release changelog, or discovering unsupported Bitrix24 REST API methods and filing tracking issues. IMPORTANT: this skill MUST be invoked before doing any issue-related work.
Its SKILL.md is about 10k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `placements.md`).
It sits in Backend & APIs, covering REST APIs, Literature review and Changelog and release notes. It works with GitHub, OpenAPI and PHP. The repository describes itself as: Bitrix24 PHP SDK for REST API. The licence is MIT.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8ebd4c1. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bashmcp__github__get_issuemcp__github__list_issuesmcp__github__create_issuemcp__github__add_issue_commentmcp__github__search_issuesmcp__github__create_pull_requestmcp__github__get_pull_requestmcp__github__list_commitsmcp__bitrix24__bitrix-search…and 4 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makeghgitphpcurlFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
apidocs.bitrix24.comclaude.aiFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
B24phpsdk Maintainer loads about 10k tokens when it runs. Until then it costs about 119 tokens; SKILL.md has 4,184 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
The webhook base URL is stored in `tests/.env.local`:allowed-tools: Bash, mcp__github__get_issue, mcp__github__list_issues, mcp__github__create_issue, mcp__github__add_Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from bitrix24/b24phpsdk at commit 8ebd4c1, republished under its MIT licence (© bitrix24). 4,184 words, ~10,338 tokens.
.claude/skills/b24phpsdk-maintainer/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Repository: bitrix24/b24phpsdk (owner: bitrix24, repo: b24phpsdk)
Required: before doing anything else, run:
make oa-schema-buildThis updates docs/open-api/openapi.json with the current Bitrix24 REST API snapshot.
Do not proceed with any workflow until the command completes successfully.
Before manually creating or updating SDK PHP files that match one of the generator-supported
contracts below, use the generator first. If the generator cannot be used for the current
case, write the reason explicitly in .tasks/<issue-number>/plan.md before proceeding with
manual edits.
| File type | Required generator |
|---|---|
src/Services/**/Result/*ItemResult.php with @property-read field annotations | php bin/console b24-dev:result-item-generator <method.name> --stage=all |
src/Services/**/Service/*SelectBuilder.php | php bin/console b24-dev:generate-select-builder <openapi-entity-key> --namespace=<namespace> --class-name=<class> --output=<path> |
src/Services/**/Service/*ItemBuilder.php | php bin/console b24-dev:generate-item-builder <openapi-operation-path> --namespace=<namespace> --class-name=<class> --output=<path> |
Generator usage rules:
make oa-schema-build first; the generators rely on docs/open-api/openapi.json.*ItemResult.php, keep the mandatory live annotation/type-casting
integration test described below.Rule: choose a result class by the verified response envelope and semantics, not by
an endpoint's name or scope. Before introducing a service-specific result, inspect
src/Core/Result/ and document why an existing result does or does not fit.
| Situation | Choice |
|---|---|
The endpoint returns a single integer ID (including a numeric string), normalized by the core to getResult()[0], and callers only need getId() | Return Core\Result\AddedItemResult directly; do not create an empty service-specific class or copy getId() |
| That same ID contract has an existing public result class/accessor to preserve, or needs additional meaningful behavior | Extend AddedItemResult, inherit getId() and AddedItemIdResultInterface, and add only the required behavior |
The response has a different envelope or semantics (for example result.item, a string identifier, multiple IDs, or nested status/error fields) | Use an existing matching result if available; otherwise create a dedicated response wrapper, normally extending AbstractResult, with appropriate accessors |
| The result represents one entity record with named fields | Use a service-specific *ItemResult extending AbstractAnnotatedItem, returned by the response wrapper; follow generator and annotation-test rules below |
update/delete method name or an ID result
from add. Verify the actual API contract and the core's normalization first.AddedItemResult
merely to reuse a few lines when getId(): int is not valid for that response.BlogPostAddResult extends AddedItemResult keeps its existing isSuccess() while
inheriting getId(); changing the service to return the bare core class would remove
that public accessor. Preserve existing accessor semantics unless a separate change
explicitly addresses them.UpdatedItemResult and DeletedItemResult; do not duplicate their compatible logic.ItemResult.Rule: every service entity *ItemResult.php class with @property-read fields MUST extend
Bitrix24\SDK\Core\Result\AbstractAnnotatedItem — never the plain AbstractItem.
AbstractAnnotatedItem reads the @property-read PHPDoc annotations and automatically casts each
magic-getter value to the annotated type: CarbonImmutable (via CarbonImmutable::parse()), int,
float, bool (incl. Y/N), array, nested *ItemResult (array<FooItemResult>), and backed
enums. Because of this:
__get() override with hand-rolled casting (the older AbstractItem
pattern seen in legacy classes such as EventLogItemResult). The base class handles it.use Carbon\CarbonImmutable; whenever a property is annotated as CarbonImmutable, so the
PHPDoc type resolves to the correct FQN and the base class recognizes it for casting.#[OpenApiEntity(...)] and the @property-read block — they drive both the casting and the
mandatory annotation/type-cast integration test.When making direct curl calls to inspect raw API responses (e.g., during integration test
development or API discovery), use the following URL structures.
https://<portal>/rest/<userId>/<webhookToken>/<method.name>The webhook base URL is stored in tests/.env.local:
BITRIX24_WEBHOOK=https://your-domain.bitrix24.com/rest/1/<webhookToken>/To call a method, append the method name to the base URL:
# read base URL from env, call any method
curl -s -X POST "${BITRIX24_WEBHOOK}crm.deal.list" \
-H "Content-Type: application/json" \
-d '{"filter": {}, "select": ["ID", "TITLE"]}'Both API versions use the same URL structure — the version affects method naming and response envelope, not the base path:
| v1 | v3 | |
|---|---|---|
| URL | .../rest/1/<token>/tasks.task.list | .../rest/1/<token>/tasks.task.file.attach |
| Single-item response | result contains the value directly | result.item |
| List response | result is a flat array | result.items |
| Parameters | flat key-value pairs | may use nested objects (fields, data) |
Knowing the response envelope is critical: the AbstractResult subclass must reference
the correct key (result, result.item, or result.items).
curl -s -X POST \
https://your-domain.bitrix24.com/rest/crm.deal.list \
-H "Content-Type: application/json" \
-d '{"auth": "<oauth_token>", "filter": {}, "select": ["ID"]}'Rule: every GitHub issue in bitrix24/b24phpsdk — title, body, and checklists — MUST be
written in English only, regardless of the language used in conversation with the user.
This applies to:
mcp__github__create_issue, gh issue create)mcp__github__update_issue)mcp__github__add_issue_comment)If the conversation is in another language, translate the content to English before writing it to GitHub. Do not mix languages inside a single issue. Proper nouns (method names, file paths, URLs) stay as-is.
When given an issue number, always load it first via mcp__github__get_issue:
owner: bitrix24
repo: b24phpsdk
issue_number: <N>Read the title, body, and labels — they define the scope and context of the work.
When mcp__github__* tools return authentication errors or are unavailable, use the gh CLI via Bash as a fallback:
# Search issues (fallback for mcp__github__search_issues)
gh search issues "<query>" --repo bitrix24/b24phpsdk --state open
# List labels (use before creating issues to find exact label names)
gh label list --repo bitrix24/b24phpsdk
# Create issue
gh issue create --repo bitrix24/b24phpsdk --title "..." --label "..." --body "..."
# Create PR — body MUST follow .github/PULL_REQUEST_TEMPLATE.md (read it first!)
# cat .github/PULL_REQUEST_TEMPLATE.md
gh pr create --repo bitrix24/b24phpsdk --title "..." --body "$(cat <<'EOF'
<filled-in template content>
EOF
)" --base <branch>Before creating, search via mcp__github__search_issues (or gh search issues fallback) to make sure a similar issue does not already exist.
Before applying a label, run gh label list --repo bitrix24/b24phpsdk to verify the exact label name exists in the repository.
## Problem
<Clear description of the problem or missing functionality>
## Proposed solution
<Description of the proposed solution>
## Acceptance criteria
- [ ] <criterion 1>
- [ ] <criterion 2>
- [ ] <criterion 3>Add <feature description>Fix <what is broken>Refactor <what and why>| Label | When to use |
|---|---|
enhancement | new functionality |
bug | bug fix |
documentation | documentation only |
refactoring | internal changes without API changes |
Use this workflow when the user wants to find Bitrix24 REST API methods that are not yet supported by the SDK and create tracking issues for them.
Use AskUserQuestion to ask which API version to audit:
question: "Which API version do you want to audit for unsupported methods?"
header: "API version to audit"
options:
- label: "v3"
description: "REST API v3 — modern endpoints (tasks.task.*, catalog.*, etc.)"
- label: "v1"
description: "REST API v1 — legacy endpoints"Use AskUserQuestion to ask whether to filter:
question: "Do you want to limit the search to a specific scope or method pattern?"
header: "Scope filter"
options:
- label: "All scopes"
description: "Analyse all available methods for the chosen API version"
- label: "Specific scope"
description: "Filter by scope name, e.g. tasks, crm, calendar"
- label: "Specific methods"
description: "Filter by method pattern, e.g. tasks.task.file.*"If Specific scope or Specific methods is chosen, ask for the exact value(s) via a follow-up AskUserQuestion.
Use mcp__bitrix24__bitrix-search to find all REST methods matching the scope or pattern.
For each method found, call mcp__bitrix24__bitrix-method-details to verify:
Collect the confirmed list as «API methods from docs».
Use Grep to scan src/Services/ for ApiEndpointMetadata attributes:
pattern: ApiEndpointMetadata
path: src/Services/
glob: *.phpExtract the first string argument from each #[ApiEndpointMetadata('method.name', ...)] — that is the REST method name.
Collect as «SDK-supported methods».
Unsupported = «API methods from docs» − «SDK-supported methods»Present the numbered list to the user before doing anything else:
Found N unsupported methods:
1. scope.entity.action
2. scope.entity.otheraction
...Use AskUserQuestion:
question: "Which methods should I create issues for?"
header: "Issue creation scope"
options:
- label: "All N unsupported methods"
description: "Create one issue per method"
- label: "Let me choose"
description: "I will list the method names I want"If Let me choose, ask the user for the list explicitly before proceeding.
For each confirmed method, call mcp__github__search_issues to avoid duplicates:
q: "<method.name> in:title repo:bitrix24/b24phpsdk is:open"If mcp__github__search_issues is unavailable, use the Bash fallback:
gh search issues "<method.name>" --repo bitrix24/b24phpsdk --state openSkip methods that already have an open issue. Report skipped ones to the user.
For each method without an existing issue, create via mcp__github__create_issue:
owner: bitrix24
repo: b24phpsdk
labels: ["enhancement"]
title: Add support for <method.name>
body: (see template below)Issue body template:
## Problem
The Bitrix24 REST API method `<method.name>` is not yet supported by the SDK.
## Proposed solution
Add a service method that wraps `<method.name>` following the existing patterns
in `src/Services/<Scope>/Service/`.
## Acceptance criteria
- [ ] Service class implements `<method.name>` with correct parameter mapping
- [ ] Result item `@property-read` annotations cover all response fields
- [ ] Unit test passes (`make test-unit`)
- [ ] Integration test passes, including annotation and type-cast checks
- [ ] `CHANGELOG.md` is updated with an issue linkAfter all issues are created, report the list of created issue URLs to the user.
feature/<issue-number>-<short-slug> # new functionality
bugfix/<issue-number>-<short-slug> # bug fixExample: feature/397-add-task-chat-fields
Imperative verb, describe what was added or fixed, reference the issue number at the end:
Add <ClassName> service for `<scope>.<entity>.*` support (#NNN)
Fix <what was broken> in <component> (#NNN)Examples:
Add FileField service for tasks.task.file.field.* support (#398)Fix pagination offset in DealsResult (#412)Rules:
feat:, fix:) — this project does not use that formatAll entries under ## X.Y.Z Unreleased → ### Added / Fixed / Changed must end with an issue link:
- Added something useful ([#NNN](https://github.com/bitrix24/b24phpsdk/issues/NNN))When adding a new service for an issue, the following files are mandatory:
tests/Unit/Services/<Scope>/Service/<Name>Test.php — unit test for the servicetests/Integration/Services/<Scope>/Service/<Name>Test.php — integration testtests/Integration/Services/<Scope>/Result/<Name>ItemResultTest.php — result item test (see below)phpunit.xml.dist and a make target to MakefileSee also: docs/architecture.md, docs/testing.md
Rule: every *ItemResult.php file that contains @property-read PHPDoc annotations
MUST have a corresponding integration test at
tests/Integration/Services/<Scope>/Result/<Name>ItemResultTest.php.
The test must contain exactly two methods:
<?php
declare(strict_types=1);
namespace Bitrix24\SDK\Tests\Integration\Services\<Scope>\Result;
use Bitrix24\SDK\Services\<Scope>\Result\<Name>ItemResult;
use Bitrix24\SDK\Services\<Scope>\Service\<ServiceName>;
use Bitrix24\SDK\Tests\CustomAssertions\CustomBitrix24Assertions;
use Bitrix24\SDK\Tests\Integration\Factory;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
#[CoversClass(<Name>ItemResult::class)]
class <Name>ItemResultTest extends TestCase
{
use CustomBitrix24Assertions;
private <ServiceName> $<serviceNameCamel>;
#[\Override]
protected function setUp(): void
{
$this-><serviceNameCamel> = Factory::getServiceBuilder()->get<Scope>Scope()-><serviceAccessor>();
}
#[Test]
#[TestDox('all fields in <Name>ItemResult are annotated in phpdoc and match with raw api response')]
public function testAllFieldsAreAnnotated(): void
{
// fetch a raw single item array from the real API response
$rawItem = $this-><serviceNameCamel>-><fetchMethod>()->getCoreResponse()
->getResponseData()->getResult()['<resultKey>'];
$this->assertBitrix24AllResultItemFieldsAnnotated(
array_keys($rawItem),
<Name>ItemResult::class
);
}
#[Test]
#[TestDox('all fields in <Name>ItemResult have valid type casting in magic getters')]
public function testAllFieldsHasValidTypeCastingInMagicGetters(): void
{
$<nameItemResult> = $this-><serviceNameCamel>-><fetchMethod>()-><itemAccessor>();
$this->assertBitrix24ResultItemFieldsTypeCastMatchAnnotations(
$<nameItemResult>,
<Name>ItemResult::class
);
}
}Template notes:
assertBitrix24AllResultItemFieldsAnnotated — verifies that every key from the raw API response is covered by a @property-read annotation in the result item classassertBitrix24ResultItemFieldsTypeCastMatchAnnotations — verifies that every magic getter returns a value whose PHP type matches the PHPDoc annotation (uses Typhoon Reflection internally)Bitrix24\SDK\Tests\CustomAssertions\CustomBitrix24Assertions#[CoversClass] must point to *ItemResult, not to the service classLive example: tests/Integration/Services/Task/ChatMessageField/Result/ChatMessageFieldItemResultTest.php
Use this section when the user asks to add support for Bitrix24 widget placement codes
(see placement.list), typed bind/unbind helpers, and OPTIONS payload builders within a
scope (e.g. IM, CRM, Tasks, Calendar, Sonet).
The full playbook is intentionally split out to keep SKILL.md compact. Read
placements.md in this same folder before implementation.
That supporting guide covers:
placement.list research to final verificationPlacementLocationCodes, Placements, and
<ScopePrefix>*PlacementOptionsPlacementLangItem, PlacementLangMap, and shared
Core\Contracts\LangCodesRule: before writing any code, create a dedicated folder and a plan file for the issue.
Never create plan files under
docs/plans/. All plan files MUST be placed inside the task folder at.tasks/<issue-number>/plan.md.
.tasks/<issue-number>/Example: .tasks/397/
Create .tasks/<issue-number>/plan.md before starting implementation.
Think through the full scope of the issue and write the plan first — only start coding once the plan is agreed upon.
Language rule: all plan.md files MUST be written in English, regardless of the language used in conversation.
# Plan: <issue title> (issue #NNN)
## Context
<Background: what the issue is about, relevant API details, how it fits
into the existing SDK structure, any constraints or decisions made upfront>
---
## Files to Create
### 1. `src/...`
<Full class skeleton with namespace, imports, and key method signatures>
### 2. `tests/Unit/...`
<Test class skeleton>
### 3. `tests/Integration/...`
<Integration test class skeleton>
---
## Files to Modify
### 1. `src/Services/ServiceBuilder.php` (or scope builder)
<Exact method to add, line reference if known>
### 2. `phpunit.xml.dist`
<Exact XML block to add>
### 3. `Makefile`
<Exact make target to add>
### 4. `CHANGELOG.md`
<Exact line to add under `## X.Y.Z Unreleased` → `### Added / Fixed / Changed`>
---
## Deptrac compliance
<Confirm which layers the new code depends on and that no new violations are introduced>
---
## Verification
\`\`\`bash
make lint-cs-fixer
make lint-rector
make lint-phpstan
make lint-deptrac
make test-unit
make test-integration-<scope>
\`\`\`Execute the plan step by step. Do not start a new step until the previous one is complete. Update the plan file if scope changes during implementation.
When the user asks to implement (close) an issue and provides a link or number, execute the following steps in strict order before writing any code.
Fetch the issue via mcp__github__get_issue and read the full title, body, and labels.
Use the bitrix24 MCP server to fetch up-to-date API documentation for every REST method mentioned in the issue or required for the implementation.
Available tools:
| Tool | When to use |
|---|---|
mcp__bitrix24__bitrix-search | find methods, articles, or events by keyword when the exact name is unknown |
mcp__bitrix24__bitrix-method-details | fetch full description of a specific REST method (parameters, response shape, errors) |
mcp__bitrix24__bitrix-article-details | fetch a documentation article (overview pages, concept guides) |
mcp__bitrix24__bitrix-event-details | fetch details of a specific Bitrix24 event |
mcp__bitrix24__bitrix-app-development-doc-details | fetch application development documentation |
For each REST method involved in the issue:
mcp__bitrix24__bitrix-method-details to get the exact parameter names, types, and response structureresult.item vs result.items) — they must match the AbstractResult implementationRecord findings in the Context section of plan.md so the plan is grounded in actual API behaviour, not assumptions.
When adding or changing service methods, any argument that represents a date or date-time
value must be typed as CarbonImmutable in the public SDK method signature. Convert it to
the Bitrix24 REST payload format at the service boundary, following existing service
patterns. Do not expose raw date/time strings in service method arguments when the SDK can
accept a typed immutable date value instead.
When a REST API entity exposes *.field.get and *.field.list, implement those methods in
a dedicated field metadata service instead of adding fieldGet() or fieldList() methods to
the primary entity service.
Use this shape:
Services\<Scope>\<Entity>Field\Service\<Entity>Field<entity>Field()get(string $name, array $select = []) and list(array $select = [])<Entity>FieldResult, <Entity>FieldsResult, and <Entity>FieldItemResultIf one issue covers several entities with field metadata endpoints, create one field service per entity unless the scope already has an established shared field-service convention.
When adding or changing ApiEndpointMetadata attributes, documentation links must point to
the English Bitrix24 API documentation site under https://apidocs.bitrix24.com/. Do not
use localized documentation hosts for these attribute links.
Classify the issue:
| Type | Signals |
|---|---|
feature | labels enhancement; title starts with Add |
bugfix | label bug; title starts with Fix |
Use feature if the type is ambiguous.
Ask the user explicitly before creating the branch using the AskUserQuestion tool
with the following question and options (do NOT ask via plain text):
question: "Which API version does this issue target?"
header: "API version"
options:
- label: "v3"
description: "REST API v3 — base branch: v3-dev"
- label: "v1"
description: "REST API v1 — base branch: dev"Branch off from the corresponding base branch:
| API version | Base branch |
|---|---|
| v1 | dev |
| v3 | v3-dev |
Do not assume — always wait for the user's answer.
When a bug (or a missing-field gap) affects both the 3.x and the 1.x release lines — including
fixes to v1 methods whose code is identical on dev and v3-dev — always implement the fix on a
branch off v3-dev first and open the PR against v3-dev. After that PR merges, backport the
same change to dev via a separate branch and a PR against dev.
Rationale: v3-dev is the forward-moving line, so the fix must never be missing there; the backport
keeps the 1.x line in sync. Do not base such a fix on dev first. Record the pending dev backport
as a follow-up in the task plan so it is not forgotten after the v3-dev PR merges.
Name the branch according to the issue type and number:
feature/<issue-number>-<short-slug> # for features
bugfix/<issue-number>-<short-slug> # for bug fixesExample: feature/397-add-task-chat-fields branched from v3-dev.
Create it with:
git checkout <base-branch>
git pull
git checkout -b <branch-name>.tasks/<issue-number>/Required: invoke superpowers:brainstorming before writing the plan.
Use the issue body, API documentation gathered in Step 2, and existing SDK patterns as input.
The brainstorming output informs the Context and design decisions in plan.md.
Do not start writing the plan until brainstorming is complete.
Create .tasks/<issue-number>/plan.md using the structure defined in the
«Task folder and implementation plan» section above.
Before showing the plan to the user, check it against three criteria:
1. Unambiguity — every instruction has exactly one possible interpretation. Check each step: could a developer unfamiliar with the codebase read it differently? If yes — rewrite it to be explicit (add file paths, method names, exact values).
2. Non-contradiction — no two instructions conflict with each other. Check: do the files to create match what the files to modify expect? Do the namespace, class names, and method names stay consistent throughout the plan? Do the test skeletons reference the same class names as the source skeletons?
3. No gaps — the plan covers the full path from empty branch to passing linters and tests.
Walk through the acceptance criteria from the issue and verify each one is addressed by at least one step in the plan.
Check that the Verification section lists all relevant make targets for the changed scope.
Check that CHANGELOG.md is listed under Files to Modify.
If a step depends on another that is not in the plan — add the missing step.
If any criterion fails, fix the plan first, then re-run the check.
Required: report the review results in this format before presenting the plan:
Plan review:
✓ Unambiguity — <one sentence: what was checked and result>
✓ Non-contradiction — <one sentence: what was checked and result>
✓ No gaps — <one sentence: what was checked and result>Then present the plan and wait for explicit approval before writing any production code.
Required: invoke superpowers:test-driven-development after plan approval, before writing any production code.
Follow the RED-GREEN-REFACTOR cycle for each service method in the plan:
Do not write production code before having a failing test. This applies to every method in the plan, not just the first one.
After all files from the plan are written and the plan is marked complete, run checks in two phases. Do not start phase 2 until phase 1 is fully green.
Completion invariant: every completed implementation task must run make lint-rector
before it is reported as finished. This applies even when a narrower check set is chosen
for a small or targeted change.
Run in this order:
make lint-cs-fixer
make lint-rector
make lint-phpstan
make lint-deptrac
make test-unitRules for phase 1:
superpowers:systematic-debugging before attempting a fix — diagnose root cause first, then fix.deptrac.yaml → skip_violations to silence a new violation — fix the import instead.Run only after phase 1 is fully green:
make test-integration-<scope> # the suite added for this issueRules for phase 2:
superpowers:systematic-debugging before attempting a fix.After both phases are green, add an entry to CHANGELOG.md under ## X.Y.Z Unreleased:
### Added
- <Description of what was added> ([#NNN](https://github.com/bitrix24/b24phpsdk/issues/NNN))Use ### Fixed for bug fixes, ### Changed for changes. Commit the CHANGELOG update together with the last implementation commit or as a separate commit:
Update CHANGELOG.md for #NNNReport the status to the user:
When preparing or updating a release pull request (MR), append ### API coverage
as the last subsection of the target release entry in CHANGELOG.md, immediately
before the next release heading (or end of file). This requirement applies to both SDK
release lines: always report REST API v3 (new) and REST API v1 (legacy) separately.
Ordinary feature PRs do not need a release coverage block.
Verify that all three targets below exist in the candidate's Makefile. From that same
checkout, after the release changes are finalized, run these commands in order:
make -s oa-schema-build
make -s sdk-coverage-v3-show
printf '0\n' | make -s sdk-coverage-v1-show0 exits the v1 command's menu after printing the overall statistics. -s suppresses
Make's command echo, which can contain the webhook URL. Keep credentials and unredacted
logs out of the changelog, issue, and PR.
Use the overall summary fields, not per-scope sums, batch-wrapper inventory, or SDK-only methods (which are outside the coverage denominator):
| API | Total methods | Covered methods | Uncovered methods | Coverage |
|---|---|---|---|---|
| v3 | OpenAPI methods count | Covered SDK v3 methods count | Uncovered OpenAPI methods count | Coverage percentage |
| v1 | Portal methods | Covered by SDK | Not covered by SDK | Coverage |
Both commands must succeed and produce complete summaries. Check that total > 0, 0 <= covered <= total, covered + uncovered = total, and the percentage matches covered / total * 100 rounded to two decimal places. A missing target, failed schema refresh, unavailable portal, missing summary, or inconsistent counts blocks release readiness: report the cause and rerun after resolving it. Do not omit an API row, invent zero coverage, or reuse numbers from another checkout or an earlier release.
Replace every placeholder in this format with the measured values; use the measurement date in UTC and keep the distinct coverage baselines visible:
### API coverage
Measured on <YYYY-MM-DD> (UTC) from the release candidate.
| REST API | Covered methods | Total methods | Uncovered methods | Coverage | Basis |
|---|---:|---:|---:|---:|---|
| v3 (new) | <covered> | <total> | <uncovered> | <percent>% | OpenAPI snapshot: `docs/open-api/openapi.json` |
| v1 (legacy) | <covered> | <total> | <uncovered> | <percent>% | Methods available on the configured portal |
These figures describe SDK method coverage against each baseline, not test coverage
or proof that every method was exercised against a live portal. The v1 baseline is
portal-specific, not the entire Bitrix24 REST API catalog.On reruns, update the existing subsection for this release instead of appending another one; preserve all historical release entries. Before every release PR push, refresh the measurements and verify that exactly one final coverage subsection contains both API rows, the date, valid counts, percentages, and baselines. Keep the PR draft or report it as blocked until this check passes; green CI alone does not satisfy this requirement.
Run this step only after both phases of the quality gate are fully green and CHANGELOG is updated.
Auto-create the PR yourself via mcp__github__create_pull_request (or gh pr create as fallback). Never respond with a "click this URL to create the PR" message — the agent opens the PR, not the user. The URL returned by git push (.../pull/new/<branch>) is informational; do not forward it as a manual-action prompt.
Base branch is fixed by API version:
| API version | PR base branch |
|---|---|
| v3 | v3-dev |
| v1 | dev |
Never open a PR against main. The base must match the base branch chosen in Step 4 of the start-of-work protocol.
PR body comes from the repo template. Always read .github/PULL_REQUEST_TEMPLATE.md fresh from disk with cat immediately before composing the body. Do not reuse a memorised layout; the template evolves.
Required before starting:
superpowers:verification-before-completion — run all quality gate commands again, capture actual output, confirm every command passes. Do not create the PR based on remembered results.cat .github/PULL_REQUEST_TEMPLATE.md — the PR body MUST follow this template. Do not use a memorised or hardcoded structure.git push -u origin <branch-name>Call mcp__github__list_commits on the feature branch to find the author of the most recent commit:
owner: bitrix24
repo: b24phpsdk
sha: <branch-name>
per_page: 1Use the author.login from the first returned commit as the assignee.
If the call fails or returns no commits, omit the assignees field — do not guess.
Determine the milestone prefix from the base branch chosen in Step 4 of the start-of-work protocol:
| Base branch | Milestone prefix |
|---|---|
v3-dev | 3.* |
dev | 1.* |
Fetch open milestones via the GitHub REST API:
GET /repos/bitrix24/b24phpsdk/milestones?state=open&sort=due_on&direction=ascFrom the returned list, pick the milestone whose title starts with the prefix (e.g. 3. or 1.)
and has the nearest due date (first in the sorted list after filtering).
If no matching milestone exists, omit the milestone field.
Before composing the PR body, read the template fresh from disk:
cat .github/PULL_REQUEST_TEMPLATE.mdUse its exact structure as the PR body. Fill in every placeholder and replace every comment block with real content derived from the implementation and the issue. Do NOT use a memorised or hardcoded body structure — always re-read the file.
After filling in the template, append the quality gate results and the issue closing keyword:
## Test plan
- [x] `make lint-cs-fixer` — passed
- [x] `make lint-rector` — passed
- [x] `make lint-phpstan` — passed
- [x] `make lint-deptrac` — passed
- [x] `make test-unit` — passed
- [x] `make test-integration-<scope>` — passed
Closes #<issue-number>
🤖 Generated with [Claude Code](https://claude.ai/claude-code)Why Closes #NNN outside the table: GitHub only activates automatic issue linking and
the "Linked issues" sidebar when the closing keyword appears as plain text in the body —
not inside Markdown tables, code blocks, or HTML comments.
Use mcp__github__create_pull_request (preferred) or gh pr create with the following parameters:
owner: bitrix24
repo: b24phpsdk
title: <issue title, max 72 characters>
head: <branch-name>
base: <base-branch> # v3-dev or dev — same as when the branch was created
body: <filled-in template + quality gate results + Closes #NNN>
assignees: [<author login from step 2>]
milestone: <milestone number from step 3>After the PR is created, output the PR URL so the user can open it directly.
Right after the PR is created (or after any subsequent git push to an existing PR
branch), poll the PR status via MCP until all required checks finish. Do not declare
the PR "pushed" or "updated" until CI has reported back — a green local quality gate does
not guarantee green CI.
Call mcp__github__get_pull_request_status:
owner: bitrix24
repo: b24phpsdk
pullNumber: <PR number>Interpret the response:
state | Meaning | Action |
|---|---|---|
pending | One or more checks still running | Wait, then poll again |
success | All required checks passed | Report success to the user |
failure / error | At least one required check failed | Fetch the failing run's logs, diagnose, fix, push again, and restart polling |
Polling cadence: wait ~60 seconds between polls. Do not spam the API.
If MCP is unavailable, use the gh fallback:
gh pr checks <PR number> --repo bitrix24/b24phpsdk --watchOnce polling terminates, report one of:
Any git push to a branch that already has an open PR MUST be followed by a PR status
poll, using the same procedure as Step 6 of the PR creation workflow above.
Rule: after git push origin <branch>:
gh pr view <branch> --json number or
mcp__github__list_pull_requests filtered by head).mcp__github__get_pull_request_status with that PR number.state is no longer pending.When superpowers:finishing-a-development-branch is invoked and presents the 4 options,
always select option 2 — Push and create Pull Request without asking the user to choose.
Do not display the list of options and do not prompt for a choice — proceed directly to pushing the branch and creating the PR following the steps in the «Creating a Pull Request after a green quality gate» section above.
© bitrix24, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .claude/skills/b24phpsdk-maintainer of bitrix24/b24phpsdk.
Open the folder on GitHubat commit 8ebd4c1
B24phpsdk Maintainer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| B24phpsdk Maintainer this skillbitrix24/b24phpsdk | 102 | — | ~10k | Automated safety check: Notes | MIT | |
| GitHub Openapi Skillholon-run/uxc | 116 | — | ~899 | Automated safety check: Pass | MIT | |
| Datadog Data Source GeneratorDataDog/terraform-provider-datadog | 468 | — | ~2.7k | Automated safety check: Pass | MPL-2.0 | |
| Kql ValidatorAzure/azqr | 795 | — | ~703 | Automated safety check: Pass | MIT | |
| Apm Spec Guardianmicrosoft/apm | 4k | — | ~4.9k | Automated safety check: Pass | MIT | |
| OpenAPI Spec Generationwshobson/agents | 40k | 10 repos | ~511 | Automated safety check: Pass | MIT |
holon-run/uxc
Operate GitHub REST API through UXC with the official OpenAPI schema, explicit gh-to-uxc auth import, and read-first guardrails for repo, issue, pull request, and event workflows.
DataDog/terraform-provider-datadog
Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.
Azure/azqr
Validate KQL (Kusto Query Language) files used in Azure Quick Review (azqr) against their recommendation definitions.
microsoft/apm
A skill your agent uses to run a four-panel adversarial advisory review on any pull request that touches the OpenAPM specification artifact (docs/src/content/docs/specs/openapm-.md), its inline /…
wshobson/agents
Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.
Goldziher/spikard
Release/publish the spikard Rust core crate and CLI end-to-end.
bitrix24/b24phpsdk
A skill your agent uses when writing product application code with bitrix24/b24phpsdk, integrating Bitrix24 webhooks or OAuth, choosing SDK service calls, handling SDK results, errors, pagination…
Categories
A skill your agent uses whenever working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues, reading existing ones, planning implementation from an issue, referencing an…. B24phpsdk Maintainer is an agent skill from bitrix24/b24phpsdk. Use this skill whenever working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues, reading existing ones, planning implementation from an issue, referencing an issue in commits, branches, or CHANGELOG, preparing or updating a release pull request (MR) or release changelog, or discovering unsupported Bitrix24 REST API methods and filing tracking issues.
B24phpsdk Maintainer fits situations like: working with GitHub issues in the bitrix24/b24phpsdk repository: creating new issues; reading existing ones; planning implementation from an issue; referencing an issue in commits.
Run `npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a claude-code`. Or copy the skill folder (.claude/skills/b24phpsdk-maintainer in bitrix24/b24phpsdk) into .claude/skills/b24phpsdk-maintainer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a codex`. Or copy the skill folder (.claude/skills/b24phpsdk-maintainer in bitrix24/b24phpsdk) into .agents/skills/b24phpsdk-maintainer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bitrix24/b24phpsdk --skill b24phpsdk-maintainer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/b24phpsdk-maintainer, .gemini/skills/b24phpsdk-maintainer, .github/skills/b24phpsdk-maintainer and .opencode/skills/b24phpsdk-maintainer in your project.
Going by SKILL.md and its folder, B24phpsdk Maintainer needs the command-line tools its instructions call (make, gh, git, php and curl). Its frontmatter pre-approves these tools: Bash, mcp__github__get_issue, mcp__github__list_issues, mcp__github__create_issue, mcp__github__add_issue_comment, mcp__github__search_issues, mcp__github__create_pull_request, mcp__github__get_pull_request, mcp__github__list_commits, mcp__bitrix24__bitrix-search, mcp__bitrix24__bitrix-method-details, mcp__bitrix24__bitrix-article-details, mcp__bitrix24__bitrix-event-details, mcp__bitrix24__bitrix-app-development-doc-details.
SKILL.md names 2 domains. In commands or code: apidocs.bitrix24.com and claude.ai; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
B24phpsdk Maintainer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 10k tokens (SKILL.md is roughly 41k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with B24phpsdk Maintainer: GitHub Openapi Skill (holon-run/uxc, 116 stars), Datadog Data Source Generator (DataDog/terraform-provider-datadog, 468 stars), Kql Validator (Azure/azqr, 795 stars) and Apm Spec Guardian (microsoft/apm, 4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
bitrix24 (a GitHub organization) maintains it in bitrix24/b24phpsdk, which has 102 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 30, 2026.
Source: bitrix24/b24phpsdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.