1c Role Compile logo

1c Role Compile

Community
Desko77
1c-role-compile

Создание роли 1С из описания прав. Используй когда нужно создать новую роль с набором прав на объекты

Overview

PublisherDesko77
Repositoryclaude-code-skills-1c
Skill name1c-role-compile
Stars
88
Forks
17
Bundled files
4
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.

  • 4 bundled files

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

  • Open source

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

Installation

Install the 1c Role Compile 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/Desko77/claude-code-skills-1c/tree/main/skills/1c-role-compile
  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/Desko77/claude-code-skills-1c.git /tmp/claude-code-skills-1c
mkdir -p .claude/skills
cp -r /tmp/claude-code-skills-1c/skills/1c-role-compile .claude/skills/1c-role-compile
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 1c Role Compile 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 1c Role Compile 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 1c Role Compile 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.

/role-compile - генерация роли 1С из JSON DSL

Принимает JSON-определение роли → генерирует Roles/Имя.xml (метаданные) и Roles/Имя/Ext/Rights.xml (права). UUID автоматически.

Параметры и команда

ПараметрОписание
JsonPathПуть к JSON-определению роли
OutputDirКорень выгрузки конфигурации (где Configuration.xml, Roles/ и т.д.)
powershell
powershell.exe -NoProfile -File skills/1c-role-compile/scripts/role-compile.ps1 -JsonPath "<json>" -OutputDir "<ConfigDir>"

Создает {OutputDir}/Roles/Имя.xml и {OutputDir}/Roles/Имя/Ext/Rights.xml. Регистрирует <Role> в Configuration.xml.

JSON DSL

Структура

json
{ "name": "ИмяРоли", "synonym": "Отображаемое имя", "objects": [...], "templates": [...] }

Необязательные: comment (""), setForNewObjects (false; у роли ПолныеПрава и FullAccess - true), setForAttributesByDefault (true), independentRightsOfChildObjects (false).

Shorthand-строки и объектная форма

json
"objects": [
  "Catalog.Номенклатура: @view",
  "Document.Реализация: @edit",
  "DataProcessor.Загрузка: @view",
  "InformationRegister.Цены: Read, Update",
  { "name": "Document.Продажа", "preset": "view", "rights": {"Delete": false}, "rls": {"Read": "#Шаблон(\"\")"} }
]
  • Shorthand: "Тип.Имя: @пресет" или "Тип.Имя: Право1, Право2"
  • Объектная форма: preset + rights (переопределения) + rls (ограничения)

Пресеты

ПресетДействие
@viewПросмотр - Read, View (+InputByString для справочников/документов; Use+View для обработок/отчетов)
@editПолное редактирование - CRUD + Interactive* + Posting (документы)

@ обязателен в shorthand. В объектной форме - "preset": "view" без @.

Замыкание прав

Навык дописывает права, которые платформа добавляет сама при загрузке роли (замер 8.3.27): Edit влечет Read, Update, View; View у обработки влечет Use; InteractivePostingRegular влечет InteractivePosting, а тот - Posting, и далее по зависимостям. Полный набор правил - в scripts/role-compile.py (GLOBAL_RIGHT_IMPL и RIGHT_IMPL_BY_TYPE). Файл роли после сборки совпадает с выгрузкой после первой загрузки в базу.

Права выдаются в порядке выгрузки платформы (RIGHT_ORDER), а не в порядке ввода.

Явное false конфликтует с замыканием (Edit включен, Read выключен) - платформа отбрасывает весь блок объекта при загрузке; навык предупреждает об этом в stderr.

View и Edit реквизита, табличной части, стандартного реквизита, измерения и ресурса регистра пишутся только если не совпадают с setForAttributesByDefault (замер 8.3.27): при флажке true явный true не попадает в файл, false остается; при флажке false наоборот. Пустой блок не пишется. Перед этим View и Edit согласуются: явный Edit=true при View=false дает View=true, View=false без явного Edit дает Edit=false.

У регистров вложенные объекты - Dimension, Resource, Attribute, StandardAttribute, Command, у регистра расчета еще Recalculation: "InformationRegister.Цены.Dimension.Товар: View".

Условие RLS на вложенном объекте: у стандартного реквизита право с условием пишется при любом значении; у реквизита, измерения и ресурса условие не записывается, в выводе предупреждение.

Права сервисов

У самих WebService, HTTPService и IntegrationService прав нет - платформа отбрасывает такой блок при загрузке. Право Use дается операции, методу и каналу: "WebService.Обмен.Operation.Загрузить: Use", "HTTPService.Сервис.URLTemplate.Файлы.Method.get: Use", "IntegrationService.Канал.IntegrationServiceChannel.Основной: Use".

Русские синонимы

Поддерживаются русские типы (Справочник→Catalog, Документ→Document) и права (Чтение→Read, Просмотр→View). Смешивание допустимо: "Справочник.Контрагенты: Чтение, View".

Шаблоны RLS

json
"templates": [{"name": "ДляОбъекта(Мод)", "condition": "ГДЕ Организация = &ТекОрг"}]

Ссылка в rls: "#ДляОбъекта(\"\")". Символ & автоматически экранируется в XML.

Примеры

Простая роль

json
{
  "name": "ЧтениеНоменклатуры", "synonym": "Чтение номенклатуры",
  "objects": ["Catalog.Номенклатура: @view", "Catalog.Контрагенты: @view", "DataProcessor.Загрузка: @view"]
}

Роль с RLS

json
{
  "name": "ЧтениеДокументовПоОрганизации",
  "synonym": "Чтение документов (ограничение по организации)",
  "objects": [
    "Catalog.Организации: @view",
    {"name": "Document.РеализацияТоваровУслуг", "preset": "view", "rls": {"Read": "#ДляОбъекта(\"\")"}}
  ],
  "templates": [{"name": "ДляОбъекта(Модификатор)", "condition": "ГДЕ Организация = &ТекущаяОрганизация"}]
}

Подробные таблицы пресетов, русских синонимов и дополнительные примеры - в dsl-reference.md.

Верификация

/role-validate <RightsPath> [MetadataPath]  - проверка корректности XML, прав, RLS
/role-info <RightsPath>                     - визуальная сводка структуры

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 1c Role Compile AI skill do?

Создание роли 1С из описания прав. Используй когда нужно создать новую роль с набором прав на объекты

Why use 1c Role Compile on TypingMind?

Because you install it once and use it with any model. 1c Role Compile 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 1c Role Compile in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Desko77/claude-code-skills-1c/tree/main/skills/1c-role-compile. 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 1c Role Compile?

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 1c Role Compile?

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

Is the 1c Role Compile AI skill free?

Yes. It is published on GitHub by Desko77 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 👇