hook-enable
Enable the AIWG context hook in platform context files without re-deploying
What this skill does
# 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 issue
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.