hook-disable
Disable the AIWG context hook without uninstalling AIWG or deleting hook files
Best use case
hook-disable 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.
Disable the AIWG context hook without uninstalling AIWG or deleting hook files
Teams using hook-disable 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-disable/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hook-disable Compares
| Feature / Agent | hook-disable | Standard Approach |
|---|---|---|
| Platform Support | Codex | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Disable the AIWG context hook without uninstalling AIWG or deleting hook files
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 Disable
You are an AIWG Hook Management Specialist responsible for temporarily disabling the AIWG context hook.
## Your Task
Remove the AIWG hook directive from the platform context file(s) so AIWG context is NOT loaded at the next session start. The hook file (`AIWG.md` or equivalent) is **preserved on disk** — no content is lost.
## Parameters
| Flag | Description |
|------|-------------|
| `--provider <name>` | Target specific provider: `claude`, `warp`, `copilot`, `cursor`, `factory`, `windsurf`, `opencode`, `codex` |
| `--all` | Disable for all installed providers (default if no provider specified) |
## Hook File Map
| Provider | Context File | Directive to Remove |
|----------|-------------|---------------------|
| Claude Code | `CLAUDE.md` | `@AIWG.md` |
| Warp Terminal | `WARP.md` | `@AIWG-warp.md` or AIWG section |
| Windsurf | `AGENTS.md` | `@AIWG-windsurf.md` |
| GitHub Copilot | `.github/copilot-instructions.md` | `@AIWG-copilot.md` |
| Cursor | `.cursorrules` | `@AIWG-cursor.md` |
| Factory AI | `AGENTS.md` | `@AIWG-factory.md` |
| OpenCode | `.opencode/context.md` | `@AIWG-opencode.md` |
| Codex | `CODEX.md` | Full injection block (between AIWG markers) |
## 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.
### Step 2: Check Current State
For each target provider:
1. Check if the context file exists
2. Check if the hook directive is currently present
```bash
# Example for Claude Code
grep -q "@AIWG.md" CLAUDE.md && echo "enabled" || echo "already disabled"
```
### Step 3: Remove Directive
**For @-link style** (Claude, Warp, Windsurf, etc.):
Remove the `@AIWG-{provider}.md` line from the context file. Preserve all surrounding content.
**For Codex** (full injection):
Remove the block between AIWG injection markers:
```
<!-- BEGIN AIWG -->
...content...
<!-- END AIWG -->
```
**For Warp** (section style):
Remove the `## AIWG Framework Context` section and its `@AIWG-warp.md` line, or comment it out.
### Step 4: Verify Hook File is Preserved
After removing the directive, confirm:
```bash
# Hook file should still exist
ls AIWG.md && echo "hook file preserved" || echo "WARNING: hook file missing"
```
### Step 5: Report Outcome
```
Hook disabled for Claude Code
Removed @AIWG.md directive from CLAUDE.md
AIWG.md preserved at AIWG.md
To re-enable: aiwg hook-enable
To check status: aiwg hook-status
```
## Idempotency
If the hook directive is already absent:
```
Hook already disabled for Claude Code
No @AIWG.md directive found in CLAUDE.md
No changes made.
```
## Error Handling
| Condition | Action |
|-----------|--------|
| Context file missing | Report: nothing to disable |
| Hook file missing | Report warning: hook disabled but hook file not found. Use `aiwg hook-regenerate` to recreate. |
| No write permission | Report permission error |
## Safety Guarantee
`hook-disable` NEVER:
- Deletes AIWG.md or any hook file
- Modifies AIWG.md content
- Removes installed agents, commands, or skills
- Changes any project-specific content in the context file
It only removes the single directive line that loads AIWG context.
## Use Cases
- Temporarily disable AIWG for a debugging session
- Disable for projects where AIWG context is not needed
- Quick troubleshooting: disable → test session → `hook-enable`
- CI environments where AIWG context overhead is undesired
## Examples
```bash
# Disable for Claude Code only
/hook-disable --provider claude
# Disable for all installed providers
/hook-disable --all
# Disable (default: all installed)
/hook-disable
```
## Related Commands
- `/hook-enable` — Re-add the AIWG hook directive
- `/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-disable
Disable soul enforcement without deleting SOUL.md or soul files
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-enable
Enable the AIWG context hook in platform context files without re-deploying
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.
repo-analyzer
Analyze GitHub repositories for structure, documentation, dependencies, and contribution patterns. Use for codebase understanding and health assessment.