role-validate — Claude Code skill: 1C role validation
role-validate validates Rights.xml after creating or editing a 1C role: checks XML format, object types, permission names, and RLS constraints.
MIT 46 installs ★ 811 updated 2026-10-23
/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skillsWhat role-validate does
The skill runs a PowerShell script that validates a 1C role's Rights.xml file. It catches errors that prevent configuration loading: permissions on object types that do not have them (Enum, CommonModule, ScheduledJob), typos in permission names, and permissions on an HTTP service root instead of nested methods and operations. Without catching these, the role silently fails — routes return 403, the configurator hangs.
Accepts a path to the role directory or Rights.xml file, -Detailed flag for verbose output of all checks, and -MaxErrors to stop after a given number of errors (default is 30). Results can be written to a file via -OutFile.
Requires PowerShell. Complete type-to-permission maps and nesting types are in role-compile/dsl-reference.md in the repository.
What it helps with
- validate Rights.xml after editing a role
- catch typos in object types and permission names
- detect permissions on types that do not support them
- spot invalid permissions on nested objects
- understand why a role does not work after loading
Example prompts for the agent
- Validate the role in
Roles/MyRole - Check
Rights.xmlforAdministratorrole with detailed output - Run validation on
Roles/BaseRole/Rights.xml, stop after 10 errors
How to install role-validate
1Plugin marketplace
/plugin marketplace add Nikolay-Shirokov/cc-1c-skills/plugin install 1c-skills@cc-1c-skillsThis installs the whole 1c-skills plugin with all its skills
2Skills CLI (Vercel)
npx skills add Nikolay-Shirokov/cc-1c-skills --skill role-validate -a claude-code3Manually: put the files in place
~/.claude/skills/role-validate/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/role-validate/
1Skills CLI (Vercel)
npx skills add Nikolay-Shirokov/cc-1c-skills --skill role-validate -a codex2Manually: put the files in place
.agents/skills/role-validate/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Nikolay-Shirokov/cc-1c-skills --skill role-validate -a cursor2Manually: put the files in place
.cursor/skills/role-validate/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Nikolay-Shirokov/cc-1c-skills .claude/skills/role-validate2Manually: put the files in place
.github/skills/role-validate/SKILL.md1Skills CLI (Vercel)
npx skills add Nikolay-Shirokov/cc-1c-skills --skill role-validate -a gemini-cli2Platform CLI
gemini skills install https://github.com/Nikolay-Shirokov/cc-1c-skills --path .claude/skills/role-validateManually: put the files in place
.devin/skills/role-validate/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about role-validate
How to install role-validate in Claude Code?
First /plugin marketplace add Nikolay-Shirokov/cc-1c-skills, then /plugin install 1c-skills@cc-1c-skills. The skill becomes available after installing the plugin.
What does role-validate do?
Validates a 1C role's Rights.xml: format, object types, permission names, RLS constraints. Finds errors that prevent configuration loading or cause the role to fail silently.
What does role-validate require?
PowerShell. The skill runs a .ps1 script to validate the role's permission file.
Source text
SKILL.md · MIT
---
name: role-validate
description: Валидация роли 1С. Используй после создания или модификации роли для проверки корректности
argument-hint: <RightsPath> [-Detailed] [-MaxErrors 30]
allowed-tools:
- Bash
- Read
---
# /role-validate — валидация роли 1С
Проверяет корректность `Rights.xml` роли: формат XML, namespace, глобальные флаги, типы объектов, имена прав, RLS-ограничения, шаблоны. Опционально проверяет метаданные роли (UUID, имя, синоним).
## Параметры
| Параметр | Обяз. | Умолч. | Описание |
|--------------|:-----:|---------|-------------------------------------------------|
| RightsPath | да | — | Путь к роли (директория или `Rights.xml`) |
| Detailed | нет | — | Подробный вывод (все проверки, включая успешные) |
| MaxErrors | нет | 30 | Макс. ошибок до остановки (по умолчанию 30) |
| OutFile | нет | — | Записать результат в файл (UTF-8 BOM) |
## Команда
```powershell
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/role-validate.ps1" -RightsPath "Roles/МояРоль"
```
## Что считается ошибкой
Ошибка (код возврата 1), а не предупреждение:
- тип объекта, не имеющий прав в ролях (`Enum`, `CommonModule`, `CommonPicture`, `ScheduledJob` и т.п.) — конфигурация с блоком прав на перечисление не загружается в базу, конфигуратор зависает без сообщений;
- незнакомый тип объекта (опечатка);
- имя права, которого у этого типа нет;
- вид вложенности, невозможный у данного типа, и недопустимое право у вложенного объекта;
- право на сервис целиком (`HTTPService.Имя` и т.п.) — платформа проверяет вложенный объект (метод шаблона URL, операцию, канал), а роль с правом на корень молча не работает: маршруты отвечают `403 Недостаточно прав`.
Полные списки «тип → права» и виды вложенности — в `role-compile/dsl-reference.md`.
© Nikolay Shirokov · MIT · Nikolay-Shirokov/cc-1c-skills