hook-enable
Enable the AIWG context hook in platform context files without re-deploying
Best use case
hook-enable is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
It is a strong fit for teams already working in Codex.
Enable the AIWG context hook in platform context files without re-deploying
Teams using hook-enable should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/hook-enable/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hook-enable Compares
| Feature / Agent | hook-enable | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Enable the AIWG context hook in platform context files without re-deploying
Which AI agents support this skill?
This skill is designed for Codex.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# Hook Enable
You are an AIWG Hook Management Specialist responsible for enabling the AIWG context hook in platform context files.
## Your Task
Re-add the AIWG hook directive to the appropriate platform context file(s) so AIWG context is loaded at the next session start. If the hook file (`AIWG.md` or equivalent) does not exist, regenerate it first.
## Parameters
| Flag | Description |
|------|-------------|
| `--provider <name>` | Target specific provider: `claude`, `warp`, `copilot`, `cursor`, `factory`, `windsurf`, `opencode`, `codex` |
| `--all` | Enable for all installed providers (default if no provider specified) |
## Hook File Map
| Provider | Context File | Hook File | Directive |
|----------|-------------|-----------|-----------|
| Claude Code | `CLAUDE.md` | `AIWG.md` | `@AIWG.md` |
| Warp Terminal | `WARP.md` | `AIWG-warp.md` | `@AIWG-warp.md` |
| Windsurf | `AGENTS.md` | `AIWG-windsurf.md` | `@AIWG-windsurf.md` |
| GitHub Copilot | `.github/copilot-instructions.md` | `AIWG-copilot.md` | `@AIWG-copilot.md` |
| Cursor | `.cursorrules` | `AIWG-cursor.md` | `@AIWG-cursor.md` |
| Factory AI | `AGENTS.md` | `AIWG-factory.md` | `@AIWG-factory.md` |
| OpenCode | `.opencode/context.md` | `AIWG-opencode.md` | `@AIWG-opencode.md` |
| Codex | `CODEX.md` | `AIWG-codex.md` | Full injection (no @-link) |
## Workflow
### Step 1: Determine Target Providers
If `--provider <name>` specified, operate on that provider only.
If `--all` or no flag, detect installed providers by checking for their context files.
```bash
# Detect installed providers
ls CLAUDE.md WARP.md AGENTS.md .github/copilot-instructions.md .cursorrules CODEX.md 2>/dev/null
ls .opencode/context.md 2>/dev/null
```
### Step 2: Check Current State
For each target provider:
1. Check if the context file exists
2. Check if the hook directive is already present
3. Check if the hook file exists on disk
```bash
# Example for Claude Code
grep -q "@AIWG.md" CLAUDE.md && echo "already enabled" || echo "disabled"
ls AIWG.md 2>/dev/null && echo "hook file exists" || echo "hook file missing"
```
### Step 3: Regenerate Hook File (if missing)
If the hook file does not exist on disk:
1. Run `/hook-regenerate --provider <name>` to generate it
2. Verify the hook file was created before proceeding
If regeneration fails, report the error and stop.
### Step 4: Add Directive to Context File
If directive is missing from context file, add it:
**For Claude Code** — add `@AIWG.md` after the repository purpose section:
```markdown
## Repository Purpose
[existing content]
@AIWG.md
```
**For providers with @-link support** — add `@AIWG-{provider}.md` in the appropriate location.
**For Codex** (no @-link) — insert full AIWG-codex.md content into CODEX.md, marked with AIWG begin/end markers.
**For Warp** (if @-link uncertain) — add a dedicated AIWG section to WARP.md:
```markdown
## AIWG Framework Context
@AIWG-warp.md
```
### Step 5: Report Outcome
```
Hook enabled for Claude Code
Added @AIWG.md directive to CLAUDE.md
AIWG context will load at next session start
To disable: aiwg hook-disable
To regenerate content: aiwg hook-regenerate
```
## Idempotency
If the hook directive is already present:
```
Hook already enabled for Claude Code
@AIWG.md directive found in CLAUDE.md
No changes made.
```
## Error Handling
| Condition | Action |
|-----------|--------|
| Context file missing | Report error: cannot enable hook without context file. Run `aiwg use {provider}` first. |
| Hook file missing, regeneration fails | Report error with regeneration failure details |
| No write permission | Report permission error, suggest running with elevated permissions |
| Provider not installed | Skip with informational message |
## Examples
```bash
# Enable for Claude Code
/hook-enable --provider claude
# Enable for all installed providers
/hook-enable --all
# Enable (default: all installed)
/hook-enable
```
## Related Commands
- `/hook-disable` — Remove the AIWG hook directive without uninstalling
- `/hook-status` — Show current hook state across all providers
- `/hook-regenerate` — Rebuild hook files from installed manifests
## References
- @.aiwg/planning/hook-file-architecture.md — Architecture design
- #439 — AIWG.md hook file architecture
- #440 — This command's issueRelated Skills
soul-enable
Enable soul enforcement by wiring SOUL.md into platform context files and deploying the enforcement rule
sales-enablement
Project directory path (default current directory)
regression-cicd-hooks
Integrate regression testing into CI/CD pipelines with baseline comparison and merge blocking on failure
migrate-hook
Migrate existing CLAUDE.md full-injection to the AIWG.md hook file architecture
hook-status
Show AIWG hook state across all installed providers
hook-regenerate
Rebuild AIWG hook files from currently installed framework manifests
hook-disable
Disable the AIWG context hook without uninstalling AIWG or deleting hook files
aiwg-orchestrate
Route structured artifact work to AIWG workflows via MCP with zero parent context cost
venv-manager
Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
pytest-runner
Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.
vitest-runner
Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.
eslint-checker
Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.