opencode-config/.opencode/skills/add-skill/SKILL.md
Sergey 67174b4879
refactor(pipeline): make pipeline-status sole orchestrator + slim docs (#42)
* refactor(pipeline): add subagent_type and template to NEXT actions

NEXT_ACTIONS now explicitly specifies subagent_type + template per phase (except MERGE which calls merge_pr tool). ISSUE/IMPLEMENT -> general/A, DOCS -> docs-reviewer/B, REVIEW -> reviewer/C, MEMORY -> memory-syncer/E. Existing tests updated to new format, 25 new tests added.

* refactor(docs): slim AGENTS.md and run-pipeline skill

AGENTS.md 71 -> 31 lines: remove Commits/Pull Requests sections (formats in tools), shorten Development Workflow/Pipeline to 1-2 lines. run-pipeline SKILL.md 164 -> 155 lines: remove Phase 0 Bootstrap (duplicated phases, now in pipeline-status NEXT_ACTIONS). Keep protocol, templates, restrictions.

* chore(skills): remove commit skill (format in tool validator)

commit/SKILL.md deleted (format validated by commit.ts tool, PR#38). References updated: configure-opencode SKILL.md (2 places), add-skill SKILL.md (1 place + tree structure). project-map README: remove commit/SKILL.md from tree, add configure-opencode.

* docs(handoff): add ADR-017 and handoff for orchestration switch

PR number in handoff frontmatter is <PR-NUMBER> placeholder, will be set after gh pr create.

* docs(handoff): set PR number

Set PR number 42 in handoff frontmatter, rename handoff/ADR files from pr-41 to pr-42 (pipeline-status matches pr-{pr_number}-*.md in diff).

* docs: update project map + handoff + ADR

---------

Co-authored-by: opencode-agent <agent@slaid098.dev>
2026-07-24 15:40:20 +03:00

82 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: add-skill
description: Use when creating a new opencode skill. Covers file location, frontmatter format, commit, push, and post-instructions for restart. Also when user says "добавь скилл", "создай скилл", "новый навык".
---
# Add Skill
Процесс создания нового скилла в opencode.
## 1. Куда создавать
```
.opencode/skills/<skill-name>/SKILL.md
```
В корне текущего репо (`<repo-root>` = `git rev-parse --show-toplevel`),
в `.opencode/skills/`. НЕ в `~/.config/opencode/` — эта папка синхронизируется из репо.
## 2. Формат SKILL.md
```markdown
---
name: <skill-name>
description: <когда загружать. Триггеры на русском и английском. Например: Use when ... Also when user says "...">
---
# Skill Title
Содержание скилла.
```
### Правила
- `name` — kebab-case, совпадает с именем директории
- `description` — содержит конкретные триггеры (когда агент должен загрузить этот скилл)
- Язык тела — русский с английскими техническими терминами (как в существующих скиллах)
- Один скилл — одна директория с одним `SKILL.md`
### Примеры существующих скиллов
```
.opencode/skills/
├── add-skill/SKILL.md ← этот скилл
├── branch/SKILL.md
├── code-standards/SKILL.md
├── configure-opencode/SKILL.md
├── get-project-map/SKILL.md
├── issue/SKILL.md
├── memory/SKILL.md
├── run-pipeline/SKILL.md
├── python-development/SKILL.md
├── repo-init/SKILL.md
├── run-tests/SKILL.md
└── spec/SKILL.md
```
## 3. Скиллы авто-дискаверятся
Opencode сканирует все под-директории `.opencode/skills/` и подхватывает любой `SKILL.md`. Регистрировать ничего не нужно.
Список скиллов загружается **при старте opencode**. Новый скилл станет доступен только после рестарта.
## 4. Commit и Push (для implementing agent)
Implementing agent (subagent, которому делегировано создание) после создания файла — сразу коммит и пуш по правилам `commit` tool (формат валидируется tool'ом):
```bash
cd "$(git rev-parse --show-toplevel)"
git add .opencode/skills/<skill-name>/SKILL.md
git commit -m "feat(skills): add <skill-name> skill for <purpose>"
git push
```
## 5. Инструкция пользователю
После push сообщить пользователю:
> Скилл создан и запушен. Чтобы он заработал:
> 1. На хосте: `git pull` в репозитории opencode
> 2. Рестарт opencode
>
> После рестарта скилл появится в `available_skills` и будет загружаться по триггерам из `description`.