mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-06 11:40:20 +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>
3.5 KiB
3.5 KiB
name, description, argument-hint, allowed-tools
| name | description | argument-hint | allowed-tools | |||||
|---|---|---|---|---|---|---|---|---|
| db-create | Создание информационной базы 1С. Используй когда нужно создать базу, новую ИБ, пустую базу | <path|name> |
|
/db-create — Создание информационной базы
Создаёт новую информационную базу 1С (файловую или серверную) и предлагает зарегистрировать в .v8-project.json.
Usage
/db-create <path> — файловая база по указанному пути
/db-create <server>/<name> — серверная база
/db-create — интерактивно
Параметры подключения
Прочитай .v8-project.json из корня проекта для v8path (путь к платформе).
Если v8path не задан — автоопределение: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1
После создания базы предложи зарегистрировать через /db-list add.
Команда
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" <параметры>
Параметры скрипта
| Параметр | Обязательный | Описание |
|---|---|---|
-V8Path <путь> |
нет | Каталог bin платформы (или полный путь к 1cv8.exe) |
-InfoBasePath <путь> |
* | Путь к файловой базе |
-InfoBaseServer <сервер> |
* | Сервер 1С (для серверной базы) |
-InfoBaseRef <имя> |
* | Имя базы на сервере |
-UseTemplate <файл> |
нет | Создать из шаблона (.cf или .dt) |
-AddToList |
нет | Добавить в список баз 1С |
-ListName <имя> |
нет | Имя базы в списке |
*— нужен либо-InfoBasePath, либо пара-InfoBaseServer+-InfoBaseRef
Коды возврата
| Код | Описание |
|---|---|
| 0 | Успешно |
| 1 | Ошибка (см. лог) |
После создания
- Прочитай лог-файл и покажи результат
- Предложи зарегистрировать базу в
.v8-project.json(через/db-list add) - Если указан шаблон
/UseTemplate— предупреди что конфигурация будет загружена из шаблона
Примеры
# Создать файловую базу
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB"
# Создать серверную базу
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test"
# Создать из шаблона CF
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB" -UseTemplate "C:\Templates\config.cf"
# Создать и добавить в список баз
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-create.ps1" -InfoBasePath "C:\Bases\NewDB" -AddToList -ListName "Новая база"