Say which ctxguard path each install layout uses
The examples assumed a repository checkout. A reader who installed from the skill registry has `plugin/scripts/ctxguard.py` at the archive root instead -- singular, and without the `plugins/ctxguard/` prefix, because the archive holds exactly one plugin. Following the examples verbatim gave them "No such file or directory" on the first command. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,16 +54,26 @@ cp -r plugins/ctxguard ~/.claude/skills/ctxguard
|
|||||||
|
|
||||||
## ctxguard: повседневное использование
|
## ctxguard: повседневное использование
|
||||||
|
|
||||||
Ниже `ctxguard` — сокращение для
|
Ниже `ctxguard` — сокращение для вызова скрипта. Сам путь зависит от того, как
|
||||||
|
инструмент установлен, и это первое, обо что спотыкаются:
|
||||||
|
|
||||||
|
| Откуда запускаете | Путь к скрипту |
|
||||||
|
|---|---|
|
||||||
|
| Клон этого репозитория | `python3 plugins/ctxguard/scripts/ctxguard.py` |
|
||||||
|
| Распакованный ZIP из реестра скиллов | `python3 plugin/scripts/ctxguard.py` |
|
||||||
|
| Внутри сессии Claude Code | `python3 "${CLAUDE_PLUGIN_ROOT}/scripts/ctxguard.py"` |
|
||||||
|
|
||||||
|
В ZIP-поставке каталог называется `plugin` в единственном числе и лежит в корне
|
||||||
|
архива — там нет промежуточного `plugins/ctxguard/`, потому что архив содержит ровно
|
||||||
|
один плагин.
|
||||||
|
|
||||||
|
Удобно завести алиас под свой случай, например для распакованного архива:
|
||||||
|
|
||||||
```
|
```
|
||||||
python3 plugins/ctxguard/scripts/ctxguard.py
|
alias ctxguard='python3 ~/.local/share/ctxguard/plugin/scripts/ctxguard.py'
|
||||||
```
|
```
|
||||||
|
|
||||||
Удобно завести алиас:
|
Все примеры ниже записаны через это сокращение, подставьте свой путь.
|
||||||
`alias ctxguard='python3 /path/to/skills/plugins/ctxguard/scripts/ctxguard.py'`.
|
|
||||||
Внутри сессии Claude Code тот же скрипт вызывается как
|
|
||||||
`python3 "${CLAUDE_PLUGIN_ROOT}/scripts/ctxguard.py"`.
|
|
||||||
|
|
||||||
### Что он делает
|
### Что он делает
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user