Skip to main content
skill CX Codex

form-decompile — Claude Code skill: what it does, how to install

Turns a managed 1C form’s Form.xml into a JSON draft for form-compile. Use it to scaffold a form from an existing example or refactor its structure.

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 form-decompile does

The skill reads Form.xml and emits a compact JSON draft in the form-compile format. FormPath is required; OutputPath writes the result to a file, while omitting it sends JSON to stdout. The implementation runs the form-decompile.ps1 PowerShell script.

The draft is meant for editing before compiling a new form. A full xml → json → xml round trip is not guaranteed, and some DSL constructs can be dropped silently. It is a poor fit for small edits because rebuilding the whole form can create a large diff.

The script exits with an error for critical cases such as scoped ConditionalAppearance, design-time diagrams or planners on a requisite, an unknown element type, or a non-Form root. That makes the form structure a prerequisite to check; use /form-edit for targeted changes.

What it helps with

  • turn Form.xml into a JSON draft
  • scaffold a new form from an existing one
  • inspect the element and requisite tree
  • prepare a form for structural refactoring
  • write the draft to a separate JSON file

Example prompts for the agent

  • Run /form-decompile on Form.xml and save the result as draft.json.
  • Create a JSON draft from Forms/Order/Form.xml with /form-decompile.
  • Run /form-decompile on Form.xml without -OutputPath and print the JSON to stdout.

How to install form-decompile

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 form-decompile -a claude-code

3Manually: put the files in place

~/.claude/skills/form-decompile/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/form-decompile/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about form-decompile

How do I install form-decompile in Claude Code?

Add the marketplace with /plugin marketplace add Nikolay-Shirokov/cc-1c-skills, then install it with /plugin install 1c-skills@cc-1c-skills.

What does form-decompile do?

It converts a managed 1C form’s Form.xml into a JSON draft shaped for form-compile. You can edit that draft and use it to build a new form.

Is form-decompile suitable for targeted form edits?

No. Use /form-edit for changes such as adding an element or changing visibility, since decompiling and compiling again rewrites the whole form and may lose uncovered constructs.

Source text

SKILL.md · MIT
---
name: form-decompile
description: Декомпиляция управляемой формы 1С (Form.xml) в JSON-черновик в формате form-compile. Используй для scaffold новой формы по образцу или структурного рефакторинга. Не для точечных правок
argument-hint: <FormPath> [-OutputPath <out.json>]
disable-model-invocation: true
allowed-tools:
  - Bash
  - Read
  - Write
  - Glob
---

# /form-decompile — JSON-черновик из Form.xml управляемой формы

Читает Form.xml и эмитит компактный JSON в формате `form-compile`. **Результат — черновик**, а не обратимое представление: см. раздел «Что получаешь».

## Когда использовать

- **Scaffold новой формы по образцу** — взять существующую форму, получить JSON, поправить и скомпилировать в новую.
- **Структурный рефакторинг** — перебрать дерево элементов, реквизиты, команды.

## Когда **не** использовать

- **Точечные правки готовой формы** (добавить элемент, реквизит, команду; переставить элемент, перенести в другую группу, поменять заголовок или видимость, удалить) → `/form-edit`. Цикл «декомпиляция → правка JSON → компиляция» переписывает форму целиком, может терять непокрытые конструкции и даёт большой diff. `/form-edit` правит адресно.

## Параметры

| Параметр | Описание |
|----------|----------|
| `FormPath` | Путь к Form.xml (обязательный) |
| `OutputPath` | Путь к выходному JSON. Если не задан — JSON в stdout |

```powershell
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/form-decompile.ps1" -FormPath "<Form.xml>" -OutputPath "<out.json>"
```

## Что получаешь

JSON-черновик в формате `/form-compile` — **не полное обратимое представление**: раундтрип `xml → json → xml` не гарантируется, часть конструкций DSL не покрывает и **теряет молча**.

Критичные конструкции (`ConditionalAppearance` со scope, design-time диаграммы/планировщики на реквизите, неизвестный тип элемента, не-Form root) → скрипт падает с ненулевым кодом и сообщением в stderr; для правок такой формы — `/form-edit`.

## Workflow

1. `/form-decompile <Form.xml> -OutputPath draft.json` — получить черновик.
2. Поправить JSON под задачу.
3. `/form-compile -JsonPath draft.json -OutputPath new/Form.xml` — собрать обратно.
4. `/form-validate` + `/form-info` — проверить результат.

© Nikolay Shirokov · MIT · Nikolay-Shirokov/cc-1c-skills

Topics and platforms

SKILL.md skills catalog →

From the same set32

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor