Xbsl Lib Connect logo

Xbsl Lib Connect

Community
korolevpavel
xbsl-lib-connect

Подключение внешней библиотеки (.xlib) к проекту 1С:Элемент. Автоматизирует полный цикл: получить .xlib (из файла, папки с исходниками или GitHub/GitLab URL), загрузить в панель управления через Console API, попросить пользователя выпустить релиз, прописать зависимость в Проект.yaml и дать рекомендации по использованию типов библиотеки. Вызывай когда нужно подключить внешнюю библиотеку, использовать типы другого поставщика, или добавить зависимость к проекту. НЕ для: создания объектов конфигурации — используй xbsl-meta-add.

Overview

Publisherkorolevpavel
Repositoryxbsl-ai-skills
Skill namexbsl-lib-connect
Stars
45
Forks
4
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by korolevpavel on GitHub. Read the source before you install it.

Installation

Install the Xbsl Lib Connect AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/korolevpavel/xbsl-ai-skills/tree/master/skills/xbsl-lib-connect
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/korolevpavel/xbsl-ai-skills.git /tmp/xbsl-ai-skills
mkdir -p .claude/skills
cp -r /tmp/xbsl-ai-skills/skills/xbsl-lib-connect .claude/skills/xbsl-lib-connect
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Xbsl Lib Connect in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Xbsl Lib Connect on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Xbsl Lib Connect is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Во всех командах ниже {python} означает python в Windows и python3 в macOS/Linux/WSL. Выбирай команду сразу по текущей ОС, не запускай оба варианта.

xbsl-lib-connect

Скилл подключает внешнюю библиотеку к проекту 1С:Элемент.

Вспомогательный скрипт: skills/xbsl-lib-connect/scripts/lib_connect.py (actions: inspect, find-xlib, patch-yaml, analyze, validate-version, cleanup)

Важно: выпуск релиза библиотеки невозможно автоматизировать через API — только через веб-панель управления. Скилл выполняет всё вокруг этого шага и сверяет фактическую версию релиза с версией сборки. В 10.0 номер релиза нельзя назначить вручную.


Шаг 0 — Подключение к облаку

Вызови скилл xbsl-deploy через инструмент Skill (если он ещё не активен в сессии):

Skill("xbsl-deploy")

Следуй Шагу 0 и Шагу 2 из xbsl-deploy:

  • Шаг 0: загрузить переменные окружения (set -a && source .env 2>/dev/null; set +a), проверить наличие ELEMENT_BASE_URL, ELEMENT_CLIENT_ID, ELEMENT_CLIENT_SECRET
  • Шаг 2: получить токен (api.py --action get-token)

Продолжать только если токен получен успешно.


Шаг 1 — Определить источник библиотеки

Из запроса пользователя определить один из трёх источников:

A. GitHub/GitLab URL

bash
TMP_DIR=$(mktemp -d /tmp/xlib_src_XXXXXX)
git clone --depth 1 <URL> "$TMP_DIR"

Найти .xlib в клоне:

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action find-xlib --dir "$TMP_DIR"
  • Массив содержит 1 элемент → использовать его как LIB_PATH
  • Массив содержит >1 элемента → показать список пользователю, попросить выбрать
  • Массив пустой → проверить Проект.yaml в клоне на наличие ВидПроекта: Библиотека
    • Есть → собрать (Шаг 2А: сборка из исходников)
    • Нет → ошибка: "Репозиторий не содержит .xlib и не является проектом библиотеки"

B. Локальный файл .xlib

Использовать путь напрямую: LIB_PATH=<путь>

C. Локальная папка с исходниками

Сначала поискать .xlib в папке:

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action find-xlib --dir <папка>

Если найдены → выбрать (как в п. A). Иначе — проверить Проект.yaml и собрать (Шаг 2А).


Шаг 2А — Сборка .xlib из исходников (если нужна)

bash
{python} skills/xbsl-deploy/scripts/build.py \
    --project-dir <путь_к_папке_с_Проект.yaml> \
    --output /tmp \
    --kind library

Флаг --kind library генерирует файл с расширением .xlib и ProjectKind: Library в Assembly.yaml. Если ВидПроекта: Библиотека указан в Проект.yaml — --kind можно не передавать, он определяется автоматически.

Результат: путь к собранному .xlib файлу → сохранить в LIB_PATH.


Шаг 2 — Прочитать метаданные .xlib

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action inspect --file "$LIB_PATH"

Из JSON-ответа извлечь и сохранить:

  • vendor → LIB_VENDOR
  • name → LIB_NAME
  • version → LIB_VERSION
  • technology_version → для Шага 3
  • project_kind → если не Library — скрипт завершится с ошибкой
  • has_release → HAS_RELEASE (признак наличия готового релиза)
  • release_version → RELEASE_VERSION (версия релиза, если has_release: true)
  • expected_release_version → ожидаемая версия релиза из Version сборки без числового суффикса (1.0-5 → 1.0). Для готовой релизной .xlib фактическое значение берётся из release_version, а не пересчитывается.

Шаг 3 — Проверить совместимость версий технологии

Прочитать Проект.yaml целевого проекта:

bash
grep "ВерсияТехнологии" <путь>/*/Проект.yaml

Если technology_version из Шага 2 не пустой и в Проект.yaml есть ВерсияТехнологии — сравнить. При несовпадении предупредить пользователя и спросить — продолжить или нет.


Шаг 4 — Проверить, не подключена ли уже

Использовать dry-run режим patch-yaml для проверки:

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action patch-yaml \
    --project-yaml <путь>/Проект.yaml \
    --name "$LIB_NAME" --vendor "$LIB_VENDOR" --version "0.0.0" \
    --dry-run

Сравнить before и after в ответе: если в before уже есть блок с $LIB_NAME и $LIB_VENDOR — сообщить текущую версию и предложить обновить или выйти.


Шаг 5 — Загрузить .xlib в облако

Вызови скилл xbsl-deploy через инструмент Skill (если он ещё не активен в сессии):

Skill("xbsl-deploy", args="Создать проект из файла сборки")

Следуй Сценарию H из xbsl-deploy, передав $LIB_PATH как файл сборки:

  • H2: определить space-id через list-spaces
  • H3: загрузить через upload-build --file "$LIB_PATH" --space-id <space-id>

После успешного выполнения Сценария H сохранить project-id вернувшегося проекта → он понадобится для инструкции по выпуску релиза в Шаге 6.


Шаг 6 — Выпустить релиз (только если HAS_RELEASE: false)

Если HAS_RELEASE из Шага 2 равно true — пропустить выпуск релиза. RELEASE_VERSION уже установлен из метаданных готовой .xlib (release_version). Проверь его формат и перейди к Шагу 7.

Если HAS_RELEASE: false — вывести инструкцию:

Необходимо выпустить релиз библиотеки вручную в панели управления.

  1. Откройте панель управления: {ELEMENT_BASE_URL}
  2. Перейдите на вкладку Проекты → найдите {LIB_NAME} (поставщик: {LIB_VENDOR})
  3. Откройте вкладку Релизы → нажмите + Выпустить новый релиз
  4. Выберите только что загруженную сборку (версия: {LIB_VERSION})
  5. Проверьте показанную версию: панель определяет её из сборки без суффикса; изменить её вручную нельзя. Ожидается {expected_release_version}.
  6. Нажмите Выпустить релиз и проверьте фактическую версию в списке релизов.

Сообщите, что релиз выпущен, и его фактическую отображаемую версию, если у меня нет доступа к панели.

Прочитай фактическую версию в панели самостоятельно, если доступ есть. Сверь её с expected_release_version. Если они различаются, выясни причину до изменения Проект.yaml. Только подтверждённую фактическую версию сохрани в RELEASE_VERSION.

Проверить формат:

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action validate-version --version "$RELEASE_VERSION"

При valid: false — не записывать зависимость, проверить выбранную сборку и фактический релиз в панели.


Шаг 7 — Обновить Проект.yaml целевого проекта

Сначала показать план изменений (dry-run):

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action patch-yaml \
    --project-yaml <путь>/Проект.yaml \
    --name "$LIB_NAME" --vendor "$LIB_VENDOR" --version "$RELEASE_VERSION" \
    --dry-run

Показать пользователю содержимое after из ответа. Получить подтверждение. Проверь, что Библиотеки[].Версия для {LIB_VENDOR}::{LIB_NAME} в after равна именно RELEASE_VERSION готовой .xlib или выпущенного релиза.

Применить:

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action patch-yaml \
    --project-yaml <путь>/Проект.yaml \
    --name "$LIB_NAME" --vendor "$LIB_VENDOR" --version "$RELEASE_VERSION"

Шаг 8 — Анализ библиотеки и рекомендации

bash
{python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action analyze --file "$LIB_PATH"

На основе JSON-ответа вывести пользователю:

Если subsystems непустой — вывести:

Подсистемы библиотеки:

  • {LIB_VENDOR}::{LIB_NAME}::{subsystem.name} — {subsystem.title}

Как использовать в коде:

yaml
# В Подсистема.yaml целевого проекта:
Использование:
    - {LIB_VENDOR}::{LIB_NAME}::{Подсистема}

# В объекте интерфейса (.yaml):
Импорт:
    - {LIB_VENDOR}::{LIB_NAME}::{Подсистема}
# В XBSL-коде — полное имя типа:
перем х: {LIB_VENDOR}::{LIB_NAME}::{Подсистема}::{ИмяТипа}

Если subsystems пустой — блок "Как использовать в коде" не выводить.

Доступные типы (ОбластьВидимости: Глобально):

  • {type.name} ({type.kind})

Шаг 9 — Очистка и предложение пересборки

Удалить временные папки:

bash
[ -n "$TMP_DIR" ] && {python} skills/xbsl-lib-connect/scripts/lib_connect.py \
    --action cleanup --dir "$TMP_DIR"

Если задана переменная ELEMENT_APP_ID — предложить пересобрать через xbsl-deploy (сценарий I: деплой из исходников).


Итог

✓ Библиотека {LIB_VENDOR}::{LIB_NAME} v{RELEASE_VERSION} подключена к проекту.
✓ Проект.yaml обновлён.

Следующий шаг: пересобрать приложение, чтобы изменения вступили в силу.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Xbsl Lib Connect AI skill do?

Подключение внешней библиотеки (.xlib) к проекту 1С:Элемент. Автоматизирует полный цикл: получить .xlib (из файла, папки с исходниками или GitHub/GitLab URL), загрузить в панель управления через Console API, попросить пользователя выпустить релиз, прописать зависимость в Проект.yaml и дать рекомендации по использованию типов библиотеки. Вызывай когда нужно подключить внешнюю библиотеку, использовать типы другого поставщика, или добавить зависимость к проекту. НЕ для: создания объектов конфигурации — используй xbsl-meta-add.

Why use Xbsl Lib Connect on TypingMind?

Because you install it once and use it with any model. Xbsl Lib Connect is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Xbsl Lib Connect in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/korolevpavel/xbsl-ai-skills/tree/master/skills/xbsl-lib-connect. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Xbsl Lib Connect?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Xbsl Lib Connect?

As many as you like. As long as a model supports skills, you can use Xbsl Lib Connect with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Xbsl Lib Connect AI skill free?

Yes. It is published on GitHub by korolevpavel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇