Skip to main content
skill CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Nikolay-Shirokov/cc-1c-skills
/plugin install 1c-skills@cc-1c-skills
Open on GitHub

What 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.xml for Administrator role 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-skills

This 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-code

3Manually: put the files in place

~/.claude/skills/role-validate/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/role-validate/

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

Similar skills

Everything for 1C →

From the same set81

The whole set →

More in the catalog

Project sponsors

Companies that keep this analytics open