aiwg-regenerate-opencode
БесплатноБез исполняемых скриптовНе проверенRegenerate OpenCode context file (.opencode/context.md) with AIWG framework content
от jmagly★ 233 звезды на GitHubОб этом скилле
Regenerate OpenCode Context
Regenerate the .opencode/context.md file for OpenCode integration. Performs an intelligent merge — preserving team-written content while updating AIWG context.
Core Principle
Team content is preserved. AIWG content is updated. Hook file approach used when supported.
Parameters
| Flag | Description |
|---|---|
--no-backup |
Skip creating backup file |
--dry-run |
Preview changes without writing |
--full-inject |
Inject full content directly into context.md (legacy/compatibility mode) |
--migrate |
Migrate existing full-injection to hook file approach |
Hook File Approach (Default)
By default, this command uses the hook file architecture:
- Generate
AIWG-opencode.mdwith AIWG framework content - Add
@AIWG-opencode.mddirective to.opencode/context.md
Note: OpenCode's support for @file directives is not yet confirmed. If the @ directive is not supported, use --full-inject as a fallback. See #444 for status.
Execution Steps
Step 1: Create Backup
Unless --no-backup specified, create .opencode/context.md.backup-{YYYYMMDD-HHMMSS}.
Step 2: Analyze Existing Content
Read .opencode/context.md if it exists and categorize:
- Team content (PRESERVE): Project rules, conventions, business logic
- AIWG content (UPDATE): Framework integration sections
Step 3: Detect Hook File Support
Check whether existing .opencode/context.md uses a hook file directive:
grep -q "@AIWG-opencode.md" .opencode/context.md && echo "hook approach" || echo "full inject or fresh"
Step 4: Generate AIWG-opencode.md
Generate the hook file content from installed framework manifests (same as aiwg hook-regenerate --provider opencode).
If --full-inject: Skip hook file generation, embed content directly.
Step 5: Write Output
Hook approach (default):
- Write
AIWG-opencode.mdwith generated content - Update
.opencode/context.md: preserve team content + add@AIWG-opencode.mddirective
Full inject (--full-inject):
- Embed full AIWG content in
.opencode/context.mdbetween markers:<!-- BEGIN AIWG --> [content] <!-- END AIWG -->
Step 6: Report
OpenCode Context Regenerated
=============================
Backup: .opencode/context.md.backup-20260322-190000
Hook file: AIWG-opencode.md (312 lines, written)
Context file: .opencode/context.md updated
@AIWG-opencode.md directive added
Team content preserved: 14 lines
Note on OpenCode @-Link Support
OpenCode's support for @file includes within .opencode/context.md is currently unverified (see #444). If you encounter issues with AIWG context not loading:
# Fall back to full injection
/aiwg-regenerate-opencode --full-inject
Examples
# Default (hook file approach)
/aiwg-regenerate-opencode
# Full injection (compatibility mode)
/aiwg-regenerate-opencode --full-inject
# Preview without writing
/aiwg-regenerate-opencode --dry-run
# Migrate from full inject to hook file
/aiwg-regenerate-opencode --migrate
Related Commands
| Command | Regenerates |
|---|---|
/aiwg-regenerate |
Auto-detect and delegate |
/hook-status |
Check hook state |
/hook-regenerate --provider opencode |
Rebuild hook file only |
/migrate-hook --provider opencode |
Migrate full inject to hook |
References
- #439 — AIWG.md hook file architecture
- #444 — Multi-provider @-link support research
- #446 — Regenerate command suite update
Установить aiwg-regenerate-opencode в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aiwg-regenerate-opencode?
Regenerate OpenCode context file (.opencode/context.md) with AIWG framework content
Как установить скилл aiwg-regenerate-opencode?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aiwg-regenerate-opencode запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic