mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-09-04 17:20:52 +03:00
Replace literal `.claude/skills/<owner>/...` paths in SKILL.md with the
`${CLAUDE_SKILL_DIR}` variable that Claude Code substitutes at invocation
time. Same-skill references become `${CLAUDE_SKILL_DIR}/<rest>`,
cross-skill references (erf-* → epf-*) become
`${CLAUDE_SKILL_DIR}/../<other>/<rest>`. All paths now wrapped in double
quotes to handle install locations with spaces.
This unblocks plugin-mode installation: literal `.claude/skills/...`
paths fail when the skill is loaded from `~/.claude/plugins/cache/...`
or from a personal `~/.claude/skills/` install. Drop-in mode continues
to work because Claude Code resolves the variable in all install scopes.
Verified via pilot:
- Project drop-in (cc-1c-skills repo)
- Personal `~/.claude/skills/cf-info/`
- Plugin via `/plugin marketplace add <local-path>`
Scope: 61 SKILL.md, 125 path replacements (8 cross-skill).
Scripts unchanged — they already use \$PSScriptRoot and ../<sibling>
patterns that resolve correctly under the bundled cache layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58 lines
2.7 KiB
Markdown
58 lines
2.7 KiB
Markdown
---
|
|
name: mxl-decompile
|
|
description: Декомпиляция табличного документа (MXL) в JSON-определение. Используй когда нужно получить редактируемое описание существующего макета
|
|
argument-hint: <TemplatePath> [OutputPath]
|
|
allowed-tools:
|
|
- Bash
|
|
- Read
|
|
- Write
|
|
- Glob
|
|
---
|
|
|
|
# /mxl-decompile — Декомпилятор макета в DSL
|
|
|
|
Принимает Template.xml табличного документа 1С и генерирует компактное JSON-определение (DSL). Обратная операция к `/mxl-compile`.
|
|
|
|
## Использование
|
|
|
|
```
|
|
/mxl-decompile <TemplatePath> [OutputPath]
|
|
```
|
|
|
|
## Параметры
|
|
|
|
| Параметр | Обязательный | Описание |
|
|
|--------------|:------------:|-----------------------------------------|
|
|
| TemplatePath | да | Путь к Template.xml |
|
|
| OutputPath | нет | Путь для JSON (если не указан — stdout) |
|
|
|
|
## Команда
|
|
|
|
```powershell
|
|
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/mxl-decompile.ps1" -TemplatePath "<путь>/Template.xml" [-OutputPath "<путь>.json"]
|
|
```
|
|
|
|
## Рабочий процесс
|
|
|
|
Декомпиляция существующего макета для анализа или доработки:
|
|
|
|
1. Claude вызывает `/mxl-decompile` для получения JSON из Template.xml
|
|
2. Claude анализирует или модифицирует JSON (добавляет области, меняет стили)
|
|
3. Claude вызывает `/mxl-compile` для генерации нового Template.xml
|
|
4. Claude вызывает `/mxl-validate` для проверки
|
|
|
|
## JSON-схема DSL
|
|
|
|
Полная спецификация формата: **`docs/mxl-dsl-spec.md`** (прочитать через Read tool).
|
|
|
|
## Генерация имён
|
|
|
|
Скрипт автоматически генерирует осмысленные имена:
|
|
|
|
- **Шрифты**: `default`, `bold`, `header`, `small`, `italic` — или описательные имена по свойствам
|
|
- **Стили**: `bordered`, `bordered-center`, `bold-right`, `border-top` и т.д. — по комбинации свойств
|
|
|
|
## Детектирование `rowStyle`
|
|
|
|
Если в строке есть пустые ячейки (без параметров/текста) и все они имеют одинаковый формат — этот формат распознаётся как `rowStyle`, а пустые ячейки исключаются из вывода.
|