@softspark/ai-toolkit 4.14.0 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +11 -10
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/CLAUDE.md.template +3 -0
- package/app/agents/fact-checker.md +1 -1
- package/app/hooks/_search-capability.sh +3 -2
- package/app/hooks/stop-search-check.sh +2 -1
- package/benchmarks/ecosystem-doctor-snapshot.json +73 -31
- package/kb/procedures/maintenance-sop.md +26 -13
- package/kb/procedures/release-verification-sop.md +41 -36
- package/kb/reference/architecture-overview.md +23 -7
- package/kb/reference/codex-cli-compatibility.md +96 -36
- package/kb/reference/extension-api.md +52 -9
- package/kb/reference/global-install-model.md +53 -21
- package/kb/reference/hooks-catalog.md +44 -8
- package/kb/reference/mcp-editor-compatibility.md +27 -6
- package/kb/reference/mcp-templates.md +12 -6
- package/kb/reference/opencode-compatibility.md +13 -7
- package/kb/reference/plugin-pack-conventions.md +7 -7
- package/kb/reference/skills-catalog.md +3 -3
- package/kb/reference/supported-tools-registry.md +19 -17
- package/kb/reference/windows-support.md +26 -3
- package/llms-full.txt +443 -180
- package/llms.txt +1 -1
- package/manifest.json +1 -1
- package/package.json +2 -2
- package/scripts/codex_skill_adapter.py +448 -198
- package/scripts/dir_rules_shared.py +2 -11
- package/scripts/ecosystem_tools.json +29 -8
- package/scripts/emission.py +5 -91
- package/scripts/generate_agents_md.py +4 -87
- package/scripts/generate_codex.py +5 -95
- package/scripts/generate_codex_agents.py +242 -0
- package/scripts/generate_codex_hooks.py +648 -55
- package/scripts/generate_codex_skills.py +15 -6
- package/scripts/generate_copilot.py +771 -74
- package/scripts/generate_copilot_hooks.py +606 -0
- package/scripts/generate_cursor_hooks.py +453 -121
- package/scripts/generate_opencode_commands.py +4 -6
- package/scripts/inject_hook_cli.py +770 -205
- package/scripts/injection.py +102 -23
- package/scripts/install_steps/ai_tools.py +123 -83
- package/scripts/instruction_core.py +95 -0
- package/scripts/mcp_editors.py +934 -80
- package/scripts/mcp_manager.py +46 -26
- package/scripts/plugin.py +291 -114
- package/scripts/secure_fs.py +538 -0
- package/scripts/uninstall.py +1279 -208
package/llms-full.txt
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
- [Plan: Drop Cascade hooks after 2026-07-01 sunset](kb/planning/drop-cascade-hooks-after-sunset.md)
|
|
25
25
|
- [PRD: MCP Context Trim v4.0](kb/planning/mcp-context-trim-v4-prd.md)
|
|
26
26
|
- [SOP: Ecosystem Sync](kb/procedures/ecosystem-sync-sop.md)
|
|
27
|
-
- [SOP:
|
|
27
|
+
- [SOP: AI Toolkit Maintenance](kb/procedures/maintenance-sop.md)
|
|
28
28
|
- [SOP: Release Preparation](kb/procedures/release-preparation-sop.md)
|
|
29
29
|
- [SOP: Release Verification](kb/procedures/release-verification-sop.md)
|
|
30
30
|
- [Agents Catalog](kb/reference/agents-catalog.md)
|
|
@@ -4503,17 +4503,17 @@ jobs:
|
|
|
4503
4503
|
## kb/procedures/maintenance-sop.md
|
|
4504
4504
|
|
|
4505
4505
|
---
|
|
4506
|
-
title: "SOP:
|
|
4506
|
+
title: "SOP: AI Toolkit Maintenance"
|
|
4507
4507
|
category: procedures
|
|
4508
4508
|
service: ai-toolkit
|
|
4509
4509
|
tags: [sop, maintenance, agents, skills, install]
|
|
4510
|
-
version: "3.
|
|
4510
|
+
version: "3.3.0"
|
|
4511
4511
|
created: "2026-03-23"
|
|
4512
|
-
last_updated: "2026-07-
|
|
4512
|
+
last_updated: "2026-07-14"
|
|
4513
4513
|
description: "Standard operating procedures for installing, maintaining, and evolving the ai-toolkit."
|
|
4514
4514
|
---
|
|
4515
4515
|
|
|
4516
|
-
# SOP:
|
|
4516
|
+
# SOP: AI Toolkit Maintenance
|
|
4517
4517
|
|
|
4518
4518
|
## Init Repository (New Project)
|
|
4519
4519
|
|
|
@@ -4549,7 +4549,11 @@ ai-toolkit install --local --lang python --editors all # language rules propaga
|
|
|
4549
4549
|
|
|
4550
4550
|
When `--editors` is combined with `--lang` (or auto-detected languages), language rules are propagated to all configured editors as `ai-toolkit-lang-<lang>` files — not just Claude's `CLAUDE.md`. Similarly, registered custom rules (`~/.softspark/ai-toolkit/rules/`) are propagated to directory-based editor configs as `ai-toolkit-custom-<name>` files.
|
|
4551
4551
|
|
|
4552
|
-
**Note:**
|
|
4552
|
+
**Note:** Claude Code hooks are global-only and merge into
|
|
4553
|
+
`~/.claude/settings.json`; any legacy `.claude/hooks.json` is removed. Editors
|
|
4554
|
+
with documented repository hook surfaces may receive local native files. Codex
|
|
4555
|
+
uses `.codex/hooks.json` plus `.codex/hooks/*`; Copilot profile `standard` and
|
|
4556
|
+
above uses `.github/hooks/ai-toolkit.json` plus its adjacent runtime.
|
|
4553
4557
|
|
|
4554
4558
|
**Input validation (v1.4.2):** `--only`, `--skip`, `--editors`, and `--lang` are validated on input; an invalid value exits with a clear error before any changes are made.
|
|
4555
4559
|
|
|
@@ -4616,14 +4620,16 @@ updates. Skills work in Chat and Cowork. Hooks and sub-agents run only in Cowork
|
|
|
4616
4620
|
|
|
4617
4621
|
### Install Profiles (v3.0.0)
|
|
4618
4622
|
|
|
4619
|
-
| Profile | Claude Code core |
|
|
4620
|
-
|
|
4621
|
-
| `minimal` | yes |
|
|
4622
|
-
| `standard` (default) | yes |
|
|
4623
|
-
| `strict` | yes |
|
|
4624
|
-
| `full` | yes |
|
|
4623
|
+
| Profile | Claude Code core | Copilot | Codex | Other editor-native surfaces | Git hooks |
|
|
4624
|
+
|---------|:---------------:|---------|-------|------------------------------|:---------:|
|
|
4625
|
+
| `minimal` | yes | root instructions + agents + skills | instructions + agents + skills + hooks | pointer-only where required | no |
|
|
4626
|
+
| `standard` (default) | yes | minimal + scoped instructions + prompts + hooks | same native bundle | Gemini hooks + editor rules | no |
|
|
4627
|
+
| `strict` | yes | same as standard | same native bundle | same as standard | yes |
|
|
4628
|
+
| `full` | yes | same as standard | same native bundle | all supported hooks, agents, commands, and skill pointers | optional |
|
|
4625
4629
|
|
|
4626
|
-
|
|
4630
|
+
Codex materializes the full skill catalog under `.agents/skills/` in every
|
|
4631
|
+
profile. `--codex-skills` remains only as an explicit refresh compatibility
|
|
4632
|
+
flag. See `kb/reference/global-install-model.md` for the full breakdown.
|
|
4627
4633
|
|
|
4628
4634
|
---
|
|
4629
4635
|
|
|
@@ -4797,7 +4803,14 @@ ai-toolkit plugin remove --editor codex <name> # remove from one runtime only
|
|
|
4797
4803
|
ai-toolkit plugin status --editor all # show installed packs with runtime details
|
|
4798
4804
|
```
|
|
4799
4805
|
|
|
4800
|
-
Install copies hooks/scripts,
|
|
4806
|
+
Install copies runtime-owned hooks/scripts, ensures the required base skills are
|
|
4807
|
+
available, merges native hook configuration, and runs init scripts. Codex uses
|
|
4808
|
+
`$CODEX_HOME/AGENTS.md`, `$CODEX_HOME/hooks.json`, self-contained
|
|
4809
|
+
`$CODEX_HOME/ai-toolkit-hooks/*`, and shared `$HOME/.agents/skills/*`; it never
|
|
4810
|
+
uses `~/AGENTS.md` or `$HOME/.agents/rules/` as user configuration. Update
|
|
4811
|
+
removes and reinstalls the selected pack while preserving plugin data. Remove
|
|
4812
|
+
strips only exact pack-owned handlers, assets, and marker sections. Core
|
|
4813
|
+
agents/skills and user handlers remain untouched.
|
|
4801
4814
|
|
|
4802
4815
|
Memory-pack auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS`).
|
|
4803
4816
|
|
|
@@ -5443,10 +5456,10 @@ title: "SOP: Release Verification"
|
|
|
5443
5456
|
category: procedures
|
|
5444
5457
|
service: ai-toolkit
|
|
5445
5458
|
tags: [sop, verification, release, smoke-test, install, update, qa, provenance, sarif]
|
|
5446
|
-
version: "1.
|
|
5459
|
+
version: "1.7.0"
|
|
5447
5460
|
created: "2026-04-08"
|
|
5448
|
-
last_updated: "2026-07-
|
|
5449
|
-
description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit
|
|
5461
|
+
last_updated: "2026-07-14"
|
|
5462
|
+
description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit. Verifies CLI, native Codex and GitHub Copilot surfaces, Claude app export, doctor, validation, tests, eject, provenance, SARIF, and per-skill permissions."
|
|
5450
5463
|
---
|
|
5451
5464
|
|
|
5452
5465
|
# SOP: Release Verification
|
|
@@ -5471,31 +5484,31 @@ Verifies all critical paths from the user's perspective.
|
|
|
5471
5484
|
|
|
5472
5485
|
## Quick Checklist (TL;DR)
|
|
5473
5486
|
|
|
5474
|
-
|
|
5487
|
+
14 commands — if all pass, the release is ready:
|
|
5475
5488
|
|
|
5476
5489
|
```bash
|
|
5477
5490
|
# Pre-commit (Phase 0)
|
|
5478
5491
|
python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate AGENTS.md
|
|
5479
5492
|
python3 scripts/generate_llms_txt.py > llms.txt # 2. Regenerate llms.txt
|
|
5480
5493
|
python3 scripts/validate.py --strict # 3. Validation passed?
|
|
5481
|
-
npm test > /tmp/npm-test.log 2>&1 && grep -c '^ok ' /tmp/npm-test.log && ! grep -q '^not ok' /tmp/npm-test.log #
|
|
5494
|
+
npm test > /tmp/npm-test.log 2>&1 && grep -c '^ok ' /tmp/npm-test.log && ! grep -q '^not ok' /tmp/npm-test.log # 4. All tests passed? (single run, cached)
|
|
5482
5495
|
|
|
5483
5496
|
# Post-install verification (Phases 1-7)
|
|
5484
|
-
ai-toolkit --version #
|
|
5485
|
-
ai-toolkit status #
|
|
5486
|
-
ai-toolkit doctor #
|
|
5487
|
-
ai-toolkit install --dry-run #
|
|
5488
|
-
python3 scripts/audit_skills.py --ci #
|
|
5497
|
+
ai-toolkit --version # 5. Version OK?
|
|
5498
|
+
ai-toolkit status # 6. Status OK?
|
|
5499
|
+
ai-toolkit doctor # 7. Health check passed?
|
|
5500
|
+
ai-toolkit install --dry-run # 8. Global install OK?
|
|
5501
|
+
python3 scripts/audit_skills.py --ci # 9. Security audit clean?
|
|
5489
5502
|
|
|
5490
5503
|
# Supply-chain verification (Phase 8, v2.8.0+)
|
|
5491
|
-
python3 scripts/audit_skills.py --sarif | python3 -c "import json,sys; assert json.load(sys.stdin)['version']=='2.1.0'; print('SARIF OK')" #
|
|
5492
|
-
python3 scripts/audit_skills.py --permissions | head -30 #
|
|
5493
|
-
npm view @softspark/ai-toolkit@X.Y.Z --json | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['dist']['attestations']['provenance']['predicateType']=='https://slsa.dev/provenance/v1'; print('PROVENANCE OK')" #
|
|
5494
|
-
python3 scripts/claude_app.py verify #
|
|
5504
|
+
python3 scripts/audit_skills.py --sarif | python3 -c "import json,sys; assert json.load(sys.stdin)['version']=='2.1.0'; print('SARIF OK')" # 10. SARIF 2.1.0 well-formed?
|
|
5505
|
+
python3 scripts/audit_skills.py --permissions | head -30 # 11. Broad-access skills reviewed?
|
|
5506
|
+
npm view @softspark/ai-toolkit@X.Y.Z --json | python3 -c "import json,sys; d=json.load(sys.stdin); assert d['dist']['attestations']['provenance']['predicateType']=='https://slsa.dev/provenance/v1'; print('PROVENANCE OK')" # 12. Provenance attested on npm?
|
|
5507
|
+
python3 scripts/claude_app.py verify # 13. Claude Chat/Cowork plugin contract valid?
|
|
5495
5508
|
|
|
5496
5509
|
# Deep-coverage verification (Phase 9, v3.0.0+)
|
|
5497
5510
|
META="generate_agents_md.py|generate_llms_txt.py|generate_language_rules_skills.py"
|
|
5498
|
-
diff <(grep -oE 'scripts/generate_[a-z_]+\.py' kb/reference/supported-tools-registry.md | sort -u) <(ls scripts/generate_*.py | grep -vE "$META" | sort -u) && echo "OK: registry matches" #
|
|
5511
|
+
diff <(grep -oE 'scripts/generate_[a-z_]+\.py' kb/reference/supported-tools-registry.md | sort -u) <(ls scripts/generate_*.py | grep -vE "$META" | sort -u) && echo "OK: registry matches" # 14. Registry <-> generators drift?
|
|
5499
5512
|
```
|
|
5500
5513
|
|
|
5501
5514
|
---
|
|
@@ -5563,10 +5576,10 @@ ai-toolkit status
|
|
|
5563
5576
|
```
|
|
5564
5577
|
|
|
5565
5578
|
**Verify `--dry-run`:**
|
|
5566
|
-
- [ ] Agents
|
|
5567
|
-
- [ ] Skills
|
|
5579
|
+
- [ ] Agents: 44
|
|
5580
|
+
- [ ] Skills: 108
|
|
5568
5581
|
- [ ] Hooks merged into settings.json
|
|
5569
|
-
- [ ] "Other AI Tools"
|
|
5582
|
+
- [ ] "Other AI Tools" lists documented global targets (with `--editors`): aider, antigravity, augment, cline, codex, copilot, cursor, gemini, opencode, roo, windsurf. Scope varies: Codex uses `$CODEX_HOME` (default `~/.codex`) plus `$HOME/.agents/skills`; Copilot uses `$COPILOT_HOME` (default `~/.copilot`); cursor has only `~/.cursor/hooks.json`; antigravity has the `~/.gemini/*/skills` pointer. Cursor and Antigravity rules remain project-only.
|
|
5570
5583
|
|
|
5571
5584
|
**Verify `status`:**
|
|
5572
5585
|
- [ ] Version matches expected
|
|
@@ -5635,7 +5648,7 @@ python3 scripts/audit_skills.py --ci
|
|
|
5635
5648
|
```
|
|
5636
5649
|
|
|
5637
5650
|
**Verify validate.py:**
|
|
5638
|
-
- [ ] Agents
|
|
5651
|
+
- [ ] Agents: 44, Skills: 108, Tests: exactly the current README badge count
|
|
5639
5652
|
- [ ] Hook events: 14, Hook scripts: >= 30
|
|
5640
5653
|
- [ ] Plugin packs >= 10, KB documents >= 20
|
|
5641
5654
|
- [ ] `Errors: 0 | Warnings: 0` → `VALIDATION PASSED`
|
|
@@ -5780,9 +5793,9 @@ These verify the native-surface generators shipped in v3.0.0 actually emit the r
|
|
|
5780
5793
|
|
|
5781
5794
|
```bash
|
|
5782
5795
|
D=/tmp/aitk-profile-full-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
|
|
5783
|
-
ai-toolkit install --local --editors cursor,windsurf,gemini,augment,codex \
|
|
5784
|
-
--profile full --
|
|
5785
|
-
| grep -E "\\.cursor/(hooks\\.json|agents)|\\.devin/hooks\\.v1\\.json|\\.gemini/(settings\\.json|commands)|\\.augment/(agents|commands)|\\.agents/skills"
|
|
5796
|
+
ai-toolkit install --local --editors cursor,windsurf,gemini,augment,codex,copilot \
|
|
5797
|
+
--profile full --dry-run 2>&1 \
|
|
5798
|
+
| grep -E "\\.cursor/(hooks\\.json|agents)|\\.devin/hooks\\.v1\\.json|\\.gemini/(settings\\.json|commands)|\\.augment/(agents|commands)|\\.codex/(agents|hooks)|\\.agents/skills|\\.github/(agents|skills|instructions|prompts|hooks)"
|
|
5786
5799
|
```
|
|
5787
5800
|
|
|
5788
5801
|
**Verify** — at least the following lines appear:
|
|
@@ -5790,26 +5803,29 @@ ai-toolkit install --local --editors cursor,windsurf,gemini,augment,codex \
|
|
|
5790
5803
|
- [ ] `.devin/hooks.v1.json`
|
|
5791
5804
|
- [ ] `.gemini/settings.json` hooks AND `.gemini/commands/`
|
|
5792
5805
|
- [ ] `.augment/agents/` + `.augment/commands/` + `$HOME/.augment/settings.json`
|
|
5793
|
-
- [ ] `.
|
|
5806
|
+
- [ ] `.codex/hooks.json` + `.codex/hooks/` + `.codex/agents/`
|
|
5807
|
+
- [ ] `.agents/skills/` (Codex native discovery path)
|
|
5808
|
+
- [ ] `.github/agents/` + `.github/skills/` + `.github/instructions/` + `.github/prompts/` + `.github/hooks/`
|
|
5794
5809
|
|
|
5795
|
-
### 9.2
|
|
5810
|
+
### 9.2 Codex skills are profile-independent
|
|
5796
5811
|
|
|
5797
5812
|
```bash
|
|
5798
5813
|
D=/tmp/aitk-codex-skills-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
|
|
5814
|
+
ai-toolkit install --local --editors codex --profile minimal --dry-run 2>&1 \
|
|
5815
|
+
| grep -q "Would generate: .agents/skills" && echo "OK: Codex skills emit at minimal"
|
|
5799
5816
|
ai-toolkit install --local --editors codex --profile standard --codex-skills --dry-run 2>&1 \
|
|
5800
|
-
| grep -q "Would refresh: .agents/skills" && echo "OK:
|
|
5801
|
-
ai-toolkit install --local --editors codex --profile full --dry-run 2>&1 \
|
|
5802
|
-
| grep -q "Would generate: .agents/skills" && echo "OK: Codex skills use .agents/skills at profile full"
|
|
5817
|
+
| grep -q "Would refresh: .agents/skills" && echo "OK: legacy flag explicitly refreshes the same catalog"
|
|
5803
5818
|
```
|
|
5804
5819
|
|
|
5805
5820
|
**Verify:**
|
|
5806
|
-
- [ ]
|
|
5807
|
-
- [ ] `--
|
|
5821
|
+
- [ ] Selecting Codex emits all skills under `.agents/skills/` at every profile
|
|
5822
|
+
- [ ] `--codex-skills` remains an explicit refresh alias; it is not required for installation
|
|
5823
|
+
- [ ] No profile emits `.codex/skills/`
|
|
5808
5824
|
|
|
5809
5825
|
### 9.3 Breaking-change surfaces land on `--profile standard`
|
|
5810
5826
|
|
|
5811
|
-
|
|
5812
|
-
- Copilot
|
|
5827
|
+
The standard profile must include:
|
|
5828
|
+
- Copilot scoped instructions, prompts, custom agents, portable skills, and hooks
|
|
5813
5829
|
- Gemini hooks (`.gemini/settings.json`)
|
|
5814
5830
|
|
|
5815
5831
|
```bash
|
|
@@ -5817,10 +5833,12 @@ D=/tmp/aitk-breaking-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
|
|
|
5817
5833
|
ai-toolkit install --local --editors copilot,gemini --profile standard --dry-run 2>&1 \
|
|
5818
5834
|
| tee /tmp/aitk-breaking.log
|
|
5819
5835
|
grep -q "\\.github/instructions/" /tmp/aitk-breaking.log && echo "OK: Copilot dir layout at standard"
|
|
5836
|
+
grep -q "\\.github/agents/.*\\.github/skills/" /tmp/aitk-breaking.log && echo "OK: Copilot agents and skills at standard"
|
|
5837
|
+
grep -q "\\.github/hooks/" /tmp/aitk-breaking.log && echo "OK: Copilot hooks at standard"
|
|
5820
5838
|
grep -q "\\.gemini/settings\\.json hooks" /tmp/aitk-breaking.log && echo "OK: Gemini hooks at standard"
|
|
5821
5839
|
```
|
|
5822
5840
|
|
|
5823
|
-
**Verify
|
|
5841
|
+
**Verify all four lines print `OK:`**. If any is missing, native Copilot or Gemini coverage has regressed.
|
|
5824
5842
|
|
|
5825
5843
|
### 9.4 Install is idempotent
|
|
5826
5844
|
|
|
@@ -5844,8 +5862,8 @@ The bats suite validates JSON shape at generation time. This re-checks that what
|
|
|
5844
5862
|
|
|
5845
5863
|
```bash
|
|
5846
5864
|
D=/tmp/aitk-json-${RANDOM} && mkdir -p "$D" && cd "$D" && git init -q
|
|
5847
|
-
ai-toolkit install --local --editors cursor,windsurf,gemini,augment --profile full >/dev/null 2>&1
|
|
5848
|
-
for f in .cursor/hooks.json .devin/hooks.v1.json .gemini/settings.json $HOME/.augment/settings.json; do
|
|
5865
|
+
ai-toolkit install --local --editors cursor,windsurf,gemini,augment,codex,copilot --profile full >/dev/null 2>&1
|
|
5866
|
+
for f in .cursor/hooks.json .devin/hooks.v1.json .gemini/settings.json .codex/hooks.json .github/hooks/ai-toolkit.json "$HOME/.augment/settings.json"; do
|
|
5849
5867
|
[ -f "$f" ] && python3 -c "import json; json.load(open('$f'))" && echo "OK: $f"
|
|
5850
5868
|
done
|
|
5851
5869
|
```
|
|
@@ -5933,8 +5951,8 @@ ai-toolkit eject /tmp/test # retry
|
|
|
5933
5951
|
| Tests | `npm test`: N/N passed, 0 failures |
|
|
5934
5952
|
| Eject | Standalone `.claude/` with real files AND `output-styles/` directory |
|
|
5935
5953
|
| Guards | Destructive commands blocked |
|
|
5936
|
-
| Deep coverage | `--profile full` emits
|
|
5937
|
-
|
|
|
5954
|
+
| Deep coverage | `--profile full` emits every documented native surface, including Codex agents/skills/hooks and Copilot agents/skills/hooks |
|
|
5955
|
+
| Profile contract | Codex skills emit at every profile without `--codex-skills`; Copilot standard emits agents, skills, instructions, prompts, and hooks |
|
|
5938
5956
|
| Idempotence | Second `install` run produces byte-identical output in every managed path |
|
|
5939
5957
|
| Live JSON | Every generated `.json` file on disk parses as valid JSON |
|
|
5940
5958
|
| Registry | `supported-tools-registry.md` enumerates every `scripts/generate_*.py` we ship |
|
|
@@ -6300,9 +6318,9 @@ title: "AI Toolkit - Architecture Overview"
|
|
|
6300
6318
|
category: reference
|
|
6301
6319
|
service: ai-toolkit
|
|
6302
6320
|
tags: [architecture, overview, design, structure]
|
|
6303
|
-
version: "1.4.
|
|
6321
|
+
version: "1.4.7"
|
|
6304
6322
|
created: "2026-03-23"
|
|
6305
|
-
last_updated: "2026-
|
|
6323
|
+
last_updated: "2026-07-14"
|
|
6306
6324
|
description: "Architecture of ai-toolkit: directory layout, Claude app export, global install model, editor-aware MCP install, Codex translation layer, skill tiers, and integration with projects."
|
|
6307
6325
|
---
|
|
6308
6326
|
|
|
@@ -6352,7 +6370,8 @@ ai-toolkit/
|
|
|
6352
6370
|
generate_agents_md.py # Regenerates AGENTS.md
|
|
6353
6371
|
generate_cursor_rules.py # Generates .cursorrules (sources _common.py)
|
|
6354
6372
|
generate_windsurf.py # Generates .windsurfrules (sources _common.py)
|
|
6355
|
-
generate_copilot.py # Generates Copilot
|
|
6373
|
+
generate_copilot.py # Generates Copilot instructions, agents, and portable skills
|
|
6374
|
+
generate_copilot_hooks.py # Generates native Copilot hooks + self-contained runtime
|
|
6356
6375
|
generate_gemini.py # Generates GEMINI.md (sources _common.py)
|
|
6357
6376
|
generate_cline.py # Generates .clinerules (sources _common.py)
|
|
6358
6377
|
generate_roo_modes.py # Generates .roomodes
|
|
@@ -6409,11 +6428,26 @@ Machine (global) Project (local)
|
|
|
6409
6428
|
- `--editors cursor,aider` — install only selected editors
|
|
6410
6429
|
- (no flag) — auto-detect from existing project files; `update --local` picks up whatever editors already have configs
|
|
6411
6430
|
|
|
6412
|
-
Each editor gets directory-based format
|
|
6431
|
+
Each editor gets its documented directory-based format. Copilot receives root
|
|
6432
|
+
`AGENTS.md`, `.github/copilot-instructions.md`, native `.github/agents`, and
|
|
6433
|
+
self-contained `.github/skills` in every profile. Profile `standard` and above
|
|
6434
|
+
also emits `.github/instructions`, `.github/prompts`, and native
|
|
6435
|
+
`.github/hooks`. The user target writes the supported personal surfaces below
|
|
6436
|
+
`$COPILOT_HOME` (default `~/.copilot`) and does not generate prompt files there.
|
|
6437
|
+
Full-profile installs also emit native skill pointer catalogues for Cursor,
|
|
6438
|
+
Windsurf, and Cline. Codex local install generates `AGENTS.md`,
|
|
6439
|
+
`.agents/skills/*`, `.codex/agents/*.toml`, `.codex/hooks.json`, and
|
|
6440
|
+
self-contained `.codex/hooks/*`. Global Codex install writes its user-owned
|
|
6441
|
+
surfaces below `$CODEX_HOME` (default `~/.codex`) while user skills remain in
|
|
6442
|
+
the documented shared `$HOME/.agents/skills/` directory. Experimental plugin
|
|
6443
|
+
packs can layer their rules, skills, and hooks onto that Codex user target.
|
|
6413
6444
|
|
|
6414
6445
|
Claude Chat/Desktop/Cowork is deliberately outside `--editors`: the app does not scan filesystem configuration under `~/.claude`. `ai-toolkit claude-app export` creates a self-contained plugin ZIP with skills, agents, Cowork hooks, app-native rules, and bundled hook dependencies. It also emits the compact text that users paste into Cowork global instructions. Updating requires re-export and re-upload because the app owns its plugin store.
|
|
6415
6446
|
|
|
6416
|
-
If a project already has `.mcp.json`, local install mirrors its `mcpServers`
|
|
6447
|
+
If a project already has `.mcp.json`, local install mirrors its `mcpServers`
|
|
6448
|
+
entries into `.claude/settings.local.json` plus any selected editors with
|
|
6449
|
+
project-scoped native MCP files: `.cursor/mcp.json`, `.github/mcp.json`,
|
|
6450
|
+
`.roo/mcp.json`, and `.codex/config.toml`.
|
|
6417
6451
|
|
|
6418
6452
|
## CLI Commands
|
|
6419
6453
|
|
|
@@ -6523,12 +6557,12 @@ See `kb/reference/codex-cli-compatibility.md` for the detailed mapping.
|
|
|
6523
6557
|
Current native adapters:
|
|
6524
6558
|
- Claude Code: `.claude/settings.local.json` and `~/.claude/settings.json`
|
|
6525
6559
|
- Cursor: `.cursor/mcp.json` and `~/.cursor/mcp.json`
|
|
6526
|
-
- GitHub Copilot: `.github/mcp.json` and `~/.copilot/mcp-config.json`
|
|
6560
|
+
- GitHub Copilot: `.github/mcp.json` and `$COPILOT_HOME/mcp-config.json` (default `~/.copilot/mcp-config.json`)
|
|
6527
6561
|
- Gemini CLI: `.gemini/settings.json` and `~/.gemini/settings.json`
|
|
6528
6562
|
- Windsurf: `~/.codeium/windsurf/mcp_config.json`
|
|
6529
6563
|
- Cline: `~/.cline/data/settings/cline_mcp_settings.json`
|
|
6530
6564
|
- Augment: `~/.augment/settings.json`
|
|
6531
|
-
- Codex CLI: `~/.codex/config.toml`
|
|
6565
|
+
- Codex CLI: `.codex/config.toml` and `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`)
|
|
6532
6566
|
|
|
6533
6567
|
See `kb/reference/mcp-editor-compatibility.md` for the support matrix and scope rules.
|
|
6534
6568
|
|
|
@@ -7150,9 +7184,9 @@ title: "AI Toolkit - Codex CLI Compatibility"
|
|
|
7150
7184
|
category: reference
|
|
7151
7185
|
service: ai-toolkit
|
|
7152
7186
|
tags: [codex, compatibility, install, skills, hooks]
|
|
7153
|
-
version: "1.0.
|
|
7187
|
+
version: "1.0.4"
|
|
7154
7188
|
created: "2026-04-12"
|
|
7155
|
-
last_updated: "2026-
|
|
7189
|
+
last_updated: "2026-07-14"
|
|
7156
7190
|
description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, and plugin packs to Codex CLI."
|
|
7157
7191
|
---
|
|
7158
7192
|
|
|
@@ -7162,15 +7196,16 @@ description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, a
|
|
|
7162
7196
|
|
|
7163
7197
|
Codex CLI now receives the full `ai-toolkit` skill catalog during local install.
|
|
7164
7198
|
|
|
7165
|
-
Native Codex-compatible skills are linked directly into `.agents/skills/`.
|
|
7166
|
-
that
|
|
7167
|
-
|
|
7168
|
-
|
|
7199
|
+
Native Codex-compatible skills are linked directly into `.agents/skills/`.
|
|
7200
|
+
Skills that contain Claude-only tools, prompt placeholders, or skill-directory
|
|
7201
|
+
variables are generated as Codex wrappers. The wrappers preserve workflow intent
|
|
7202
|
+
using semantic subagent and planning guidance instead of version-specific tool
|
|
7203
|
+
signatures.
|
|
7169
7204
|
|
|
7170
|
-
Experimental plugin packs can also target
|
|
7205
|
+
Experimental plugin packs can also target the Codex user surface with
|
|
7171
7206
|
`ai-toolkit plugin install --editor codex`, which layers plugin-specific skills,
|
|
7172
|
-
rules, and hooks
|
|
7173
|
-
|
|
7207
|
+
rules, and hooks onto the active `CODEX_HOME` without changing project-local
|
|
7208
|
+
configuration.
|
|
7174
7209
|
|
|
7175
7210
|
## Local Install Outputs
|
|
7176
7211
|
|
|
@@ -7179,18 +7214,46 @@ model.
|
|
|
7179
7214
|
- `AGENTS.md` (project root; universal coding rules inlined — Codex reads instructions only from AGENTS.md, not `.agents/rules/`)
|
|
7180
7215
|
- `.agents/skills/*`
|
|
7181
7216
|
- `.codex/hooks.json`
|
|
7217
|
+
- `.codex/hooks/*` (self-contained executable hook assets)
|
|
7218
|
+
- `.codex/agents/*.toml`
|
|
7219
|
+
- `.codex/config.toml` when project MCP servers are selected
|
|
7220
|
+
|
|
7221
|
+
Project-local Codex paths never follow `CODEX_HOME`; the variable selects the
|
|
7222
|
+
user configuration root only.
|
|
7223
|
+
|
|
7224
|
+
## Global Core Install Outputs
|
|
7225
|
+
|
|
7226
|
+
`ai-toolkit install --editors codex` writes Codex-owned user files below the
|
|
7227
|
+
active `CODEX_HOME` (default `~/.codex`):
|
|
7228
|
+
|
|
7229
|
+
- `$CODEX_HOME/AGENTS.md`
|
|
7230
|
+
- `$CODEX_HOME/agents/*.toml`
|
|
7231
|
+
- `$CODEX_HOME/hooks.json`
|
|
7232
|
+
- `$CODEX_HOME/ai-toolkit-hooks/*`
|
|
7233
|
+
|
|
7234
|
+
The portable user skill catalog intentionally remains under
|
|
7235
|
+
`$HOME/.agents/skills/*`. This is Codex's documented shared user-skill discovery
|
|
7236
|
+
path, not a Codex-owned config-root path. A configured `CODEX_HOME` must be an
|
|
7237
|
+
existing absolute directory; the installer preserves user guidance, custom
|
|
7238
|
+
agents, and unrelated hook handlers inside it.
|
|
7239
|
+
|
|
7240
|
+
Sources: [Codex environment variables](https://learn.chatgpt.com/codex/config-file/environment-variables),
|
|
7241
|
+
[AGENTS.md discovery](https://learn.chatgpt.com/codex/agent-configuration/agents-md),
|
|
7242
|
+
[Codex skills](https://developers.openai.com/codex/skills).
|
|
7182
7243
|
|
|
7183
7244
|
## Global Plugin Outputs
|
|
7184
7245
|
|
|
7185
7246
|
`ai-toolkit plugin install --editor codex <pack>` bootstraps or reuses:
|
|
7186
7247
|
|
|
7187
|
-
-
|
|
7188
|
-
-
|
|
7189
|
-
-
|
|
7248
|
+
- `$CODEX_HOME/AGENTS.md` (default `~/.codex/AGENTS.md`; pack rules are marker-injected here, not written as unread `.agents/rules/` files)
|
|
7249
|
+
- `$HOME/.agents/skills/*`
|
|
7250
|
+
- `$CODEX_HOME/hooks.json`
|
|
7251
|
+
- `$CODEX_HOME/ai-toolkit-hooks/*`
|
|
7190
7252
|
|
|
7191
7253
|
Plugin packs only add their own runtime-specific layer on top of the generated
|
|
7192
|
-
Codex base.
|
|
7193
|
-
`~/.softspark/ai-toolkit
|
|
7254
|
+
Codex base. Codex hooks no longer depend on executable paths under
|
|
7255
|
+
`~/.softspark/ai-toolkit/`; project assets live beside `.codex/hooks.json`, and
|
|
7256
|
+
user assets live under `$CODEX_HOME/ai-toolkit-hooks/`.
|
|
7194
7257
|
|
|
7195
7258
|
## Skill Translation Model
|
|
7196
7259
|
|
|
@@ -7198,43 +7261,46 @@ Two delivery modes are used for Codex:
|
|
|
7198
7261
|
|
|
7199
7262
|
| Mode | How it is installed | Use case |
|
|
7200
7263
|
|------|----------------------|----------|
|
|
7201
|
-
| Native | Symlink to `app/skills/<name>/` | Skills
|
|
7202
|
-
| Adapted | Generated wrapper directory in `.agents/skills/<name>/` | Skills
|
|
7264
|
+
| Native | Symlink to `app/skills/<name>/` | Skills with portable tools, prompts, and paths |
|
|
7265
|
+
| Adapted | Generated wrapper directory in `.agents/skills/<name>/` | Skills with Claude-only tools, prompt placeholders, path variables, or orchestration APIs |
|
|
7203
7266
|
|
|
7204
7267
|
Adapted skills keep the same support assets (`reference/`, `scripts/`, `assets/`)
|
|
7205
7268
|
via symlinks, but rewrite `SKILL.md` to Codex-native guidance.
|
|
7206
7269
|
|
|
7207
|
-
## Claude-to-Codex
|
|
7270
|
+
## Claude-to-Codex Semantic Mapping
|
|
7208
7271
|
|
|
7209
|
-
The adapter
|
|
7210
|
-
|
|
7272
|
+
The adapter deliberately avoids embedding runtime function names or guessed
|
|
7273
|
+
signatures. Generated guidance describes stable intent:
|
|
7211
7274
|
|
|
7212
|
-
| Claude-oriented
|
|
7213
|
-
|
|
7214
|
-
|
|
|
7215
|
-
|
|
|
7216
|
-
|
|
|
7217
|
-
|
|
|
7218
|
-
|
|
|
7219
|
-
|
|
|
7275
|
+
| Claude-oriented concept | Codex guidance |
|
|
7276
|
+
|-------------------------|----------------|
|
|
7277
|
+
| Delegated agent call | Delegate a narrow task to a suitable Codex-native subagent |
|
|
7278
|
+
| Agent redirection | Use the subagent controls available in the current client |
|
|
7279
|
+
| Task bookkeeping | Use the planning mechanism available in the current client or an explicit checklist |
|
|
7280
|
+
| Waiting for a task | Wait only when the next critical-path step depends on the delegated result |
|
|
7281
|
+
| Agent teams | Coordinate subagents with explicit, non-overlapping ownership |
|
|
7282
|
+
| Prompt input placeholder | Use the task details supplied by the user |
|
|
7283
|
+
| Claude skill-directory variable | Use the installed skill directory containing `SKILL.md` |
|
|
7220
7284
|
|
|
7221
7285
|
## Adapted Skill Classes
|
|
7222
7286
|
|
|
7223
|
-
The
|
|
7287
|
+
The adapted group includes multi-agent orchestration:
|
|
7224
7288
|
|
|
7225
7289
|
- `/orchestrate`
|
|
7226
7290
|
- `/workflow`
|
|
7227
7291
|
- `/swarm`
|
|
7228
7292
|
- `/subagent-development`
|
|
7229
7293
|
|
|
7230
|
-
|
|
7231
|
-
|
|
7294
|
+
It also includes any skill that contains Claude-only prompt or path variables,
|
|
7295
|
+
even when its tool list is otherwise portable. Examples include:
|
|
7232
7296
|
|
|
7233
7297
|
- `/tdd`
|
|
7234
7298
|
- `/write-a-prd`
|
|
7235
7299
|
- `/qa-session`
|
|
7236
7300
|
- `/triage-issue`
|
|
7237
7301
|
- `/architecture-audit`
|
|
7302
|
+
- `/build`
|
|
7303
|
+
- `/cve-scan`
|
|
7238
7304
|
|
|
7239
7305
|
## Hook Compatibility
|
|
7240
7306
|
|
|
@@ -7258,11 +7324,26 @@ environment-snapshot probe). Claude-only events such as `TaskCompleted`,
|
|
|
7258
7324
|
are not available in `.codex/hooks.json`. Handler types: only `command` runs;
|
|
7259
7325
|
`prompt` and `agent` are parsed by Codex but not yet executed.
|
|
7260
7326
|
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7327
|
+
The generator merges these Codex-compatible events into project or user
|
|
7328
|
+
`hooks.json`, preserving unrelated user handlers and replacing only commands
|
|
7329
|
+
marked as ai-toolkit-owned. Project commands resolve their assets from the git
|
|
7330
|
+
root; core user commands use `$CODEX_HOME/ai-toolkit-hooks/`.
|
|
7331
|
+
|
|
7332
|
+
Hook JSON is parsed from the snapshot held by the same secure transaction that
|
|
7333
|
+
writes generated handlers, installs executable assets, and removes stale
|
|
7334
|
+
managed assets. A failure in any of those stages rolls back the whole upgrade.
|
|
7335
|
+
Existing file permissions are retained; new `hooks.json` files use a secure
|
|
7336
|
+
`0600` base filtered by umask, while new executable hook assets are explicitly
|
|
7337
|
+
installed as `0755`.
|
|
7338
|
+
|
|
7339
|
+
After installation or any hook change, open `/hooks` in Codex and review/trust
|
|
7340
|
+
the exact definitions. Project hooks additionally require a trusted `.codex`
|
|
7341
|
+
project layer. The installer never bypasses hook trust.
|
|
7342
|
+
|
|
7343
|
+
Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. Native
|
|
7344
|
+
`SessionStart`, `PreCompact`, and MCP-health adapters use Codex instruction and
|
|
7345
|
+
config terminology (`AGENTS.md`, `.codex/config.toml`) instead of Claude-only
|
|
7346
|
+
paths. The generated
|
|
7266
7347
|
`UserPromptSubmit` governance hook does not set `AI_TOOLKIT_HOOK_FORMAT=json`
|
|
7267
7348
|
by default because Codex currently renders `additionalContext` as visible hook
|
|
7268
7349
|
context in the TUI. This keeps prompt-submit output quiet while preserving hook
|
|
@@ -7294,6 +7375,18 @@ Plain-text informational hook context is also silent by default in the shared
|
|
|
7294
7375
|
hook helper. Set `AI_TOOLKIT_HOOK_VERBOSE=1` only when debugging hook output
|
|
7295
7376
|
outside the Codex UI.
|
|
7296
7377
|
|
|
7378
|
+
## MCP Configuration
|
|
7379
|
+
|
|
7380
|
+
Codex MCP servers are supported at both documented scopes:
|
|
7381
|
+
|
|
7382
|
+
- project: `.codex/config.toml` (trusted project layers only)
|
|
7383
|
+
- user: `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`)
|
|
7384
|
+
|
|
7385
|
+
The adapter renders `[mcp_servers.<name>]` for STDIO and Streamable HTTP
|
|
7386
|
+
transports. It validates documented transport, timeout, tool-filter, and
|
|
7387
|
+
approval fields, preserves unrelated TOML bytes/comments, and owns only its
|
|
7388
|
+
marker-bounded block. Invalid TOML and symlinked roots are rejected unchanged.
|
|
7389
|
+
|
|
7297
7390
|
## Behavioral Limits
|
|
7298
7391
|
|
|
7299
7392
|
Codex wrappers preserve workflow intent, but not every Claude runtime behavior
|
|
@@ -7305,7 +7398,8 @@ Known limits:
|
|
|
7305
7398
|
- No separate task object model equivalent to Claude `Task*` APIs
|
|
7306
7399
|
- Hook event coverage is narrower than Claude Code
|
|
7307
7400
|
- MCP search tool calls may not fire the shared `PostToolUse` search tracker,
|
|
7308
|
-
so `stop-search-check.sh` also checks
|
|
7401
|
+
so `stop-search-check.sh` also checks `$CODEX_HOME/log/codex-tui.log` (default
|
|
7402
|
+
`~/.codex/log/codex-tui.log`) for
|
|
7309
7403
|
`smart_query`, `hybrid_search_kb`, `crag_search`, `multi_hop_search`, and
|
|
7310
7404
|
`verify_answer` calls after the search-first flag timestamp before blocking.
|
|
7311
7405
|
The scan is bounded to a recent log window, but sized to tolerate noisy Codex
|
|
@@ -8454,9 +8548,9 @@ title: "Extension API Reference"
|
|
|
8454
8548
|
category: reference
|
|
8455
8549
|
service: ai-toolkit
|
|
8456
8550
|
tags: [extension-api, inject-rule, inject-hook, inject-mcp, mcp-templates, integration, editors]
|
|
8457
|
-
version: "1.
|
|
8551
|
+
version: "1.8.0"
|
|
8458
8552
|
created: "2026-04-07"
|
|
8459
|
-
last_updated: "2026-
|
|
8553
|
+
last_updated: "2026-07-14"
|
|
8460
8554
|
description: "Reference for ai-toolkit's extension API: inject-rule, inject-hook, inject-mcp, remove-* variants, and editor-aware MCP template management."
|
|
8461
8555
|
---
|
|
8462
8556
|
|
|
@@ -8474,8 +8568,8 @@ This design is intentional: ai-toolkit is a generic toolkit. Consumers (MCP serv
|
|
|
8474
8568
|
|---------|-------------|-----------|------------|
|
|
8475
8569
|
| `inject-rule <file.md>` | `~/.claude/CLAUDE.md` | Legacy HTML comment markers (`<!-- TOOLKIT:name -->`) | Yes |
|
|
8476
8570
|
| `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/rules/` | Unregister and remove generated Claude rule file | Yes |
|
|
8477
|
-
| `inject-hook <file.json\|url> [name]` | `~/.claude/settings.json` |
|
|
8478
|
-
| `remove-hook <name>` | `~/.claude/settings.json` | Strip
|
|
8571
|
+
| `inject-hook <file.json\|url> [name]` | `~/.claude/settings.json` + `$CODEX_HOME/hooks.json` | Claude `_source` ownership plus native Codex command translation | Yes |
|
|
8572
|
+
| `remove-hook <name>` | `~/.claude/settings.json` + `$CODEX_HOME/hooks.json` | Strip exact source ownership in both schemas, unregister URL source | Yes |
|
|
8479
8573
|
| `inject-mcp <file.json\|url> [name] [--force]` | `~/.mcp.json` + every editor with `global_path` | JSON `_source` tag per server, URL cached + registered, full editor propagation | Yes |
|
|
8480
8574
|
| `remove-mcp <name>` | `~/.mcp.json` + every editor with `global_path` | Strip all servers with matching `_source`, clean editor configs, unregister URL | Yes |
|
|
8481
8575
|
| `add-rule <file.md\|url>` | `~/.softspark/ai-toolkit/rules/` | File copy + sync to `~/.claude/rules/ai-toolkit-registered-*.md` on next `update` | Yes |
|
|
@@ -8524,6 +8618,9 @@ npx @softspark/ai-toolkit inject-hook https://example.com/my-tool-hooks.json
|
|
|
8524
8618
|
|
|
8525
8619
|
# With explicit source name
|
|
8526
8620
|
npx @softspark/ai-toolkit inject-hook https://example.com/hooks.json my-tool-hooks
|
|
8621
|
+
|
|
8622
|
+
# Local source name plus explicit target directory
|
|
8623
|
+
npx @softspark/ai-toolkit inject-hook ./hooks.json my-tool-hooks /custom/target
|
|
8527
8624
|
```
|
|
8528
8625
|
|
|
8529
8626
|
**Implementation:** `scripts/inject_hook_cli.py`, `scripts/hook_sources.py`, `scripts/url_fetch.py`.
|
|
@@ -8554,13 +8651,45 @@ npx @softspark/ai-toolkit inject-hook https://example.com/hooks.json my-tool-hoo
|
|
|
8554
8651
|
|
|
8555
8652
|
**Idempotency:** Re-running strips all existing entries with the same source name, then appends the new ones. No duplicates accumulate.
|
|
8556
8653
|
|
|
8557
|
-
**Safety:** Entries tagged `"_source": "ai-toolkit"` are never modified or
|
|
8558
|
-
|
|
8559
|
-
|
|
8654
|
+
**Safety:** Entries tagged `"_source": "ai-toolkit"` are never modified or
|
|
8655
|
+
removed by this command. External tools cannot affect the toolkit's own hooks.
|
|
8656
|
+
Only HTTPS URLs are accepted. Claude settings, the source registry/cache, and
|
|
8657
|
+
Codex hooks are parsed from the byte snapshots captured after their trusted
|
|
8658
|
+
roots and parent directories are pinned. Every create, write, replace, unlink,
|
|
8659
|
+
and rollback runs relative to those descriptors with `O_NOFOLLOW`; a swapped
|
|
8660
|
+
ancestor cannot redirect the transaction, and an inode change after snapshot
|
|
8661
|
+
capture aborts instead of overwriting concurrent work. A later failure restores
|
|
8662
|
+
every touched file byte-for-byte. Existing file modes are preserved. New JSON
|
|
8663
|
+
configuration files are created with a secure `0600` base filtered by the
|
|
8664
|
+
current umask. Mutation requires POSIX `dir_fd` support. Native Windows Python
|
|
8665
|
+
fails closed before changing any file; use WSL for `inject-hook` and
|
|
8666
|
+
`remove-hook`. Read-only parsing and validation remain available.
|
|
8667
|
+
|
|
8668
|
+
**Codex propagation:** command handlers for Codex's 10 documented events are
|
|
8669
|
+
translated into the native schema and merged into `$CODEX_HOME/hooks.json`
|
|
8670
|
+
(default `~/.codex/hooks.json`). The translated document never contains
|
|
8671
|
+
Claude's private `_source` key. Each command carries an exact, collision-resistant
|
|
8672
|
+
`AI_TOOLKIT_HOOK_OWNER=ai-toolkit-external-<source>-<digest>` marker; update and
|
|
8673
|
+
remove operations match only that owner. Existing core, plugin, and user
|
|
8674
|
+
handlers are preserved through the same validator and atomic writer used by the
|
|
8675
|
+
Codex generator.
|
|
8676
|
+
|
|
8677
|
+
Only fields shared unambiguously by native command hooks are propagated:
|
|
8678
|
+
`matcher`, `type: command`, `command`, `commandWindows`, `timeout`,
|
|
8679
|
+
`statusMessage`, and `async`. Unsupported events, non-command handlers, and
|
|
8680
|
+
schema-specific extra fields are reported as skipped instead of being guessed.
|
|
8681
|
+
`command` must be non-empty. `timeout`, when present, is a positive integer in
|
|
8682
|
+
seconds; Codex defaults it to 600 seconds when omitted.
|
|
8683
|
+
`UserPromptSubmit` and `Stop` matchers are omitted only when empty; a non-empty
|
|
8684
|
+
matcher is skipped because Codex does not support it. `CODEX_HOME` must be an
|
|
8685
|
+
existing absolute non-symlink directory when configured.
|
|
8560
8686
|
|
|
8561
8687
|
## remove-hook
|
|
8562
8688
|
|
|
8563
|
-
Strips all hook entries from `~/.claude/settings.json` that carry a given
|
|
8689
|
+
Strips all hook entries from `~/.claude/settings.json` that carry a given
|
|
8690
|
+
`_source` tag and removes only the matching native command owner from the active
|
|
8691
|
+
Codex `hooks.json`. If the hook was URL-sourced, it also unregisters the URL
|
|
8692
|
+
from `sources.json` and removes the cached file.
|
|
8564
8693
|
|
|
8565
8694
|
```bash
|
|
8566
8695
|
npx @softspark/ai-toolkit remove-hook my-tool-hooks
|
|
@@ -8611,7 +8740,15 @@ npx @softspark/ai-toolkit inject-mcp ./conflict.json --force
|
|
|
8611
8740
|
|
|
8612
8741
|
**URL support:** When an HTTPS URL is provided, the JSON is fetched, validated, cached in `~/.softspark/ai-toolkit/mcp-templates/external/<name>.json`, and registered in `sources.json`. On every `ai-toolkit update`, URL-sourced templates are re-fetched and re-injected automatically. If the fetch fails during update, the cached version is used.
|
|
8613
8742
|
|
|
8614
|
-
**Editor propagation:** Every editor with a `global_path` in `EDITOR_SPECS` is
|
|
8743
|
+
**Editor propagation:** Every editor with a `global_path` in `EDITOR_SPECS` is
|
|
8744
|
+
updated: Claude (`~/.claude.json`), Cursor (`~/.cursor/mcp.json`), GitHub
|
|
8745
|
+
Copilot (`$COPILOT_HOME/mcp-config.json`, default
|
|
8746
|
+
`~/.copilot/mcp-config.json`), Gemini CLI (`~/.gemini/settings.json`), Windsurf
|
|
8747
|
+
(`~/.codeium/windsurf/mcp_config.json`), Cline
|
|
8748
|
+
(`~/.cline/data/settings/cline_mcp_settings.json`), Augment
|
|
8749
|
+
(`~/.augment/settings.json`), and Codex CLI (`$CODEX_HOME/config.toml`, default
|
|
8750
|
+
`~/.codex/config.toml`). Per-editor failures are non-fatal; the command reports
|
|
8751
|
+
a warning and continues.
|
|
8615
8752
|
|
|
8616
8753
|
**Idempotency:** Re-running with the same source overwrites entries for that source cleanly -- no duplicates accumulate.
|
|
8617
8754
|
|
|
@@ -8728,9 +8865,9 @@ title: "Global Install Model"
|
|
|
8728
8865
|
category: reference
|
|
8729
8866
|
service: ai-toolkit
|
|
8730
8867
|
tags: [install, global, claude, codex, plugins, local-setup]
|
|
8731
|
-
version: "3.
|
|
8868
|
+
version: "3.3.0"
|
|
8732
8869
|
created: "2026-03-26"
|
|
8733
|
-
last_updated: "2026-07-
|
|
8870
|
+
last_updated: "2026-07-14"
|
|
8734
8871
|
description: "Reference description of Claude Code global install, Claude app plugin export, project-local editor setup, global Codex plugin layering, and command responsibilities in ai-toolkit."
|
|
8735
8872
|
---
|
|
8736
8873
|
|
|
@@ -8744,10 +8881,11 @@ That means one machine-level install provides agents, skills, hooks, constitutio
|
|
|
8744
8881
|
|
|
8745
8882
|
Other editor targets are opt-in and only use documented file surfaces. Cursor
|
|
8746
8883
|
rules stay project-local because Cursor's global user rules are managed through
|
|
8747
|
-
the settings UI, not a stable merge-safe file. Codex
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8884
|
+
the settings UI, not a stable merge-safe file. Codex supports both project and
|
|
8885
|
+
user installs: project files stay in the repository, while user files use the
|
|
8886
|
+
active `CODEX_HOME` (default `~/.codex`) and shared user skills use
|
|
8887
|
+
`$HOME/.agents/skills/`. Experimental plugin packs can add a layer to the same
|
|
8888
|
+
Codex user surface.
|
|
8751
8889
|
|
|
8752
8890
|
Claude Chat/Desktop/Cowork is a separate runtime. It does not read the
|
|
8753
8891
|
filesystem surfaces under `~/.claude`; it receives ai-toolkit through an
|
|
@@ -8778,12 +8916,14 @@ The `--profile` flag controls how much of each editor's native surface is activa
|
|
|
8778
8916
|
|
|
8779
8917
|
| Profile | What runs | Use when |
|
|
8780
8918
|
|---------|-----------|----------|
|
|
8781
|
-
| `minimal` |
|
|
8782
|
-
| `standard` (default) | Claude Code + editor rule files. Includes
|
|
8919
|
+
| `minimal` | Smallest editor surface. Copilot still receives its root instructions, native agents, and self-contained skills; Codex still receives instructions, agents, skills, and native safety hooks. | You want the smallest supported footprint. |
|
|
8920
|
+
| `standard` (default) | Claude Code + editor rule files. Includes Gemini hooks and native Copilot instructions, agents, portable skills, and hooks. | Day-to-day installs. Most users. |
|
|
8783
8921
|
| `strict` | Everything in `standard` plus git-hook wiring for commit-time safety checks. | Solo dev or tight team with zero tolerance for drift. |
|
|
8784
8922
|
| `full` | Every native surface across every editor: hooks, sub-agents, custom commands, skill pointers for Cursor / Windsurf / Gemini / Augment / Antigravity. | You want maximum coverage and understand that each editor will carry generated files under its own layout. |
|
|
8785
8923
|
|
|
8786
|
-
|
|
8924
|
+
Codex installs materialize the full skill catalog under `.agents/skills/`
|
|
8925
|
+
regardless of profile. The legacy `--codex-skills` flag only requests an
|
|
8926
|
+
explicit second refresh of that same mirror and is no longer required.
|
|
8787
8927
|
|
|
8788
8928
|
## Global Editor Targets
|
|
8789
8929
|
|
|
@@ -8825,14 +8965,14 @@ with documented, file-based config surfaces:
|
|
|
8825
8965
|
- `cline`: `~/Documents/Cline/Rules/ai-toolkit-*.md` plus `~/.cline/skills/ai-toolkit-skill-catalogue/SKILL.md`
|
|
8826
8966
|
- `roo`: `~/.roo/rules/ai-toolkit-*.md` plus `~/.agents/skills/*` (Roo/Zoo native skill discovery; skipped when `codex` is also selected, which fills the same dir)
|
|
8827
8967
|
- `aider`: `~/.aider.conf.yml` plus `~/.aider-ai-toolkit-CONVENTIONS.md` when the YAML file does not already exist
|
|
8828
|
-
- `codex`:
|
|
8968
|
+
- `codex`: `$CODEX_HOME/AGENTS.md`, `$CODEX_HOME/agents/*.toml`, `$CODEX_HOME/hooks.json`, `$CODEX_HOME/ai-toolkit-hooks/*`, plus `$HOME/.agents/skills/*`; `CODEX_HOME` defaults to `~/.codex`, and `~/AGENTS.md` is not Codex's user-instruction file
|
|
8829
8969
|
- `opencode`: `~/.config/opencode/*`
|
|
8830
8970
|
|
|
8831
8971
|
Cursor, GitHub Copilot, and Google Antigravity now have partial global support,
|
|
8832
8972
|
scoped to whatever documented HOME file surface each exposes:
|
|
8833
8973
|
|
|
8834
8974
|
- `cursor`: `~/.cursor/hooks.json` (safety/quality hooks; profile ≥ standard). Cursor RULES stay project-local — their only global surface is the Settings UI.
|
|
8835
|
-
- `copilot`:
|
|
8975
|
+
- `copilot`: instructions, native agents, portable skills, and native hooks under `$COPILOT_HOME` when set or `~/.copilot` otherwise. The hook config is `hooks/ai-toolkit.json`; its self-contained runtime is `hooks/ai-toolkit/copilot_hook.py`. VS Code and GitHub.com still use repo `.github/` files, which local install emits.
|
|
8836
8976
|
- `antigravity`: skill pointer at `~/.gemini/config/skills/` and `~/.gemini/antigravity-cli/skills/`. Antigravity RULES stay project-local.
|
|
8837
8977
|
|
|
8838
8978
|
Their global MCP support, where available, is handled by `ai-toolkit mcp
|
|
@@ -8859,7 +8999,15 @@ These files still stay local to a repository as part of the core install model:
|
|
|
8859
8999
|
- project `.agents/rules/*.md`
|
|
8860
9000
|
- project `.agents/skills/*`
|
|
8861
9001
|
- project `.codex/hooks.json`
|
|
9002
|
+
- project `.codex/hooks/*`
|
|
9003
|
+
- project `.codex/agents/*.toml`
|
|
9004
|
+
- project `.codex/config.toml` when Codex MCP servers are selected
|
|
8862
9005
|
- `.github/copilot-instructions.md`
|
|
9006
|
+
- `.github/instructions/ai-toolkit-*.instructions.md`
|
|
9007
|
+
- `.github/prompts/ai-toolkit-*.prompt.md`
|
|
9008
|
+
- `.github/agents/ai-toolkit-*.agent.md`
|
|
9009
|
+
- `.github/skills/ai-toolkit-*/SKILL.md` plus required assets and helper scripts
|
|
9010
|
+
- `.github/hooks/ai-toolkit.json` plus `.github/hooks/ai-toolkit/copilot_hook.py` (profile ≥ `standard`)
|
|
8863
9011
|
- `.clinerules`
|
|
8864
9012
|
- `.roomodes`
|
|
8865
9013
|
- `.aider.conf.yml`
|
|
@@ -8870,20 +9018,39 @@ These files still stay local to a repository as part of the core install model:
|
|
|
8870
9018
|
|
|
8871
9019
|
Project-local Claude Code language rules live in `.claude/rules/ai-toolkit-*.md` with `paths` frontmatter. They are separate from the global user-level `~/.claude/rules/ai-toolkit-*.md` files above.
|
|
8872
9020
|
|
|
8873
|
-
|
|
9021
|
+
Claude Code hooks do **not** live in project-local settings. They are merged only into global `~/.claude/settings.json`. Editor-native generators may emit project-local hook files when that editor documents them; Copilot uses `.github/hooks/*.json` and Codex uses `.codex/hooks.json`.
|
|
8874
9022
|
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
9023
|
+
## Copilot Install Behavior
|
|
9024
|
+
|
|
9025
|
+
`ai-toolkit install --local --editors copilot` always emits root `AGENTS.md`,
|
|
9026
|
+
`.github/copilot-instructions.md`, native `.github/agents`, and portable,
|
|
9027
|
+
self-contained `.github/skills`. Profiles `standard`, `strict`, and `full`
|
|
9028
|
+
add scoped `.github/instructions`, `.github/prompts`, and native version-1
|
|
9029
|
+
`.github/hooks`. Profile `minimal` omits those three additional directories.
|
|
9030
|
+
|
|
9031
|
+
Global install emits personal instructions, scoped instructions, agents, and
|
|
9032
|
+
skills under the active Copilot config root; profile `standard` and above adds
|
|
9033
|
+
hooks. Personal prompt files are not a documented Copilot CLI user surface and
|
|
9034
|
+
are not generated. `COPILOT_HOME` replaces `~/.copilot` for every generated
|
|
9035
|
+
Copilot surface, including `mcp-config.json`. Existing user files and user-added
|
|
9036
|
+
skill assets are preserved; reserved managed-path collisions and symlinked
|
|
9037
|
+
config roots are rejected instead of overwritten.
|
|
9038
|
+
|
|
9039
|
+
Codex hook bundles are self-contained. Project `.codex/hooks.json` commands
|
|
9040
|
+
reference executable assets in `.codex/hooks/`; user `$CODEX_HOME/hooks.json`
|
|
9041
|
+
commands reference `$CODEX_HOME/ai-toolkit-hooks/`. Neither bundle depends on
|
|
9042
|
+
Claude's shared `~/.softspark/ai-toolkit/hooks/` installation.
|
|
8878
9043
|
|
|
8879
9044
|
## Codex Local Install Behavior
|
|
8880
9045
|
|
|
8881
9046
|
`ai-toolkit install --local --editors codex` creates:
|
|
8882
9047
|
|
|
8883
9048
|
- `AGENTS.md`
|
|
8884
|
-
- `.agents/rules/*.md`
|
|
8885
9049
|
- `.agents/skills/*`
|
|
8886
9050
|
- `.codex/hooks.json`
|
|
9051
|
+
- `.codex/hooks/*`
|
|
9052
|
+
- `.codex/agents/*.toml`
|
|
9053
|
+
- `.codex/config.toml` when project MCP servers are selected
|
|
8887
9054
|
|
|
8888
9055
|
Native Codex-compatible skills are linked directly. Claude-oriented skills that
|
|
8889
9056
|
depend on `Agent`, `Team*`, or `Task*` primitives are translated into generated
|
|
@@ -8893,12 +9060,13 @@ Codex wrappers so the project still receives the full skill catalog.
|
|
|
8893
9060
|
|
|
8894
9061
|
`ai-toolkit plugin install --editor codex <pack>` additionally targets:
|
|
8895
9062
|
|
|
8896
|
-
-
|
|
8897
|
-
-
|
|
8898
|
-
-
|
|
9063
|
+
- `$CODEX_HOME/AGENTS.md` (pack rules are marker-injected here)
|
|
9064
|
+
- `$HOME/.agents/skills/*`
|
|
9065
|
+
- `$CODEX_HOME/hooks.json`
|
|
9066
|
+
- `$CODEX_HOME/ai-toolkit-hooks/plugin-<pack>-*`
|
|
8899
9067
|
|
|
8900
|
-
This is
|
|
8901
|
-
|
|
9068
|
+
This is an explicit, opt-in layer on top of the normal Codex user install.
|
|
9069
|
+
Runtime state is tracked in
|
|
8902
9070
|
`~/.softspark/ai-toolkit/plugins.json` per target (`claude`, `codex`).
|
|
8903
9071
|
|
|
8904
9072
|
## MCP Local Sync Behavior
|
|
@@ -8908,6 +9076,7 @@ If `.mcp.json` exists in the current project, `ai-toolkit install --local` mirro
|
|
|
8908
9076
|
- `.cursor/mcp.json` when `--editors cursor` is selected
|
|
8909
9077
|
- `.github/mcp.json` when `--editors copilot` is selected
|
|
8910
9078
|
- `.roo/mcp.json` when `--editors roo` is selected
|
|
9079
|
+
- `.codex/config.toml` when `--editors codex` is selected
|
|
8911
9080
|
|
|
8912
9081
|
Global-only editor MCP configs are not written during `install --local`. Use `ai-toolkit mcp install --editor <name...>` for those targets.
|
|
8913
9082
|
|
|
@@ -9132,9 +9301,9 @@ title: "Hooks Catalog"
|
|
|
9132
9301
|
category: reference
|
|
9133
9302
|
service: ai-toolkit
|
|
9134
9303
|
tags: [hooks, quality, safety, enforcement, settings.json]
|
|
9135
|
-
version: "1.
|
|
9304
|
+
version: "1.7.0"
|
|
9136
9305
|
created: "2026-03-27"
|
|
9137
|
-
last_updated: "2026-
|
|
9306
|
+
last_updated: "2026-07-14"
|
|
9138
9307
|
description: "Complete reference of all ai-toolkit hooks: events, scripts, installation, and runtime behavior."
|
|
9139
9308
|
---
|
|
9140
9309
|
|
|
@@ -9555,7 +9724,7 @@ First-match-wins per file. Built-in runners: `bats`, `pytest`, `vitest`, `jest`.
|
|
|
9555
9724
|
| Script | `~/.softspark/ai-toolkit/hooks/search-tracker.sh` |
|
|
9556
9725
|
| Fires | After any search-style tool call |
|
|
9557
9726
|
|
|
9558
|
-
**Action:** Clears `~/.softspark/ai-toolkit/state/search-required-<session_id>.flag` (per-session, keyed by `session_id` from the hook stdin payload, falling back to `transcript_path` basename, then `default`). Pairs with `user-prompt-submit.sh` (sets the flag on long technical prompts only when a search provider is detected or strict mode is enabled) and `stop-search-check.sh` (blocks Stop if the calling session's flag is still set). Search provider detection parses actual MCP server names from `mcpServers`, `mcp_servers`, or `mcp` config blocks; hook matchers and permission allowlists do not count as providers. Codex Stop enforcement also scans the recent `~/.codex/log/codex-tui.log`
|
|
9727
|
+
**Action:** Clears `~/.softspark/ai-toolkit/state/search-required-<session_id>.flag` (per-session, keyed by `session_id` from the hook stdin payload, falling back to `transcript_path` basename, then `default`). Pairs with `user-prompt-submit.sh` (sets the flag on long technical prompts only when a search provider is detected or strict mode is enabled) and `stop-search-check.sh` (blocks Stop if the calling session's flag is still set). Search provider detection parses actual MCP server names from `mcpServers`, `mcp_servers`, or `mcp` config blocks; hook matchers and permission allowlists do not count as providers. Codex Stop enforcement also scans the recent `$CODEX_HOME/log/codex-tui.log` window (default `~/.codex/log/codex-tui.log`) for `ToolCall: mcp__...__smart_query` and `tool.name="smart_query"`-style entries because Codex MCP tool calls may not fire the shared `PostToolUse` tracker. Together the hooks enforce the global CLAUDE.md GOLDEN RULE without breaking offline/no-RAG installs and without cross-session interference when multiple Claude Code windows run in parallel.
|
|
9559
9728
|
|
|
9560
9729
|
Non-blocking (exit 0). Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
9561
9730
|
|
|
@@ -9568,7 +9737,7 @@ Non-blocking (exit 0). Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
9568
9737
|
| Script | `~/.softspark/ai-toolkit/hooks/stop-search-check.sh` |
|
|
9569
9738
|
| Fires | When Claude finishes a response |
|
|
9570
9739
|
|
|
9571
|
-
**Action:** If `search-required-<session_id>.flag` for the calling session is still present (no search tool ran during this turn) and a search provider is still detectable, emits `{"decision":"block","reason":"..."}` to continue the conversation with a search-first reminder. If no RAG/Web provider is detected, it clears the stale flag and exits 0, so offline/no-MCP users are not blocked. On Codex, where MCP search tools may not trigger the shared `PostToolUse` tracker, the hook also checks `~/.codex/log/codex-tui.log` for search tool calls after the flag timestamp before blocking. Flags are scoped by `session_id` from the hook stdin payload so a Stop in session B never consumes session A's flag (and vice versa). Stale per-session flags older than 60 minutes are GC'd on the next `SessionStart`.
|
|
9740
|
+
**Action:** If `search-required-<session_id>.flag` for the calling session is still present (no search tool ran during this turn) and a search provider is still detectable, emits `{"decision":"block","reason":"..."}` to continue the conversation with a search-first reminder. If no RAG/Web provider is detected, it clears the stale flag and exits 0, so offline/no-MCP users are not blocked. On Codex, where MCP search tools may not trigger the shared `PostToolUse` tracker, the hook also checks `$CODEX_HOME/log/codex-tui.log` (default `~/.codex/log/codex-tui.log`) for search tool calls after the flag timestamp before blocking. Flags are scoped by `session_id` from the hook stdin payload so a Stop in session B never consumes session A's flag (and vice versa). Stale per-session flags older than 60 minutes are GC'd on the next `SessionStart`.
|
|
9572
9741
|
|
|
9573
9742
|
**Overrides:** `CLAUDE_SKIP_SEARCH_FIRST=1`, `AI_TOOLKIT_SEARCH_FIRST=off`, or `AI_TOOLKIT_SEARCH_FIRST=strict` to force enforcement. Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
9574
9743
|
|
|
@@ -9691,15 +9860,15 @@ commands explicitly silent, and Codex-generated hooks plus Claude's bundled
|
|
|
9691
9860
|
└── ConfigChange → config-desync-guard.sh
|
|
9692
9861
|
```
|
|
9693
9862
|
|
|
9694
|
-
**
|
|
9863
|
+
**Claude Code design decisions:**
|
|
9695
9864
|
- Scripts **copied** (not symlinked) — user can customize without breaking git
|
|
9696
9865
|
- Hooks in `settings.json` (not `hooks.json`) — Claude Code only reads settings files
|
|
9697
9866
|
- `_source: "ai-toolkit"` tag on every entry — allows idempotent merge/strip
|
|
9698
|
-
-
|
|
9867
|
+
- Claude hooks are **global only** — `--local` does not install them into project settings
|
|
9699
9868
|
|
|
9700
|
-
## Per-Editor Native Hooks
|
|
9869
|
+
## Per-Editor Native Hooks
|
|
9701
9870
|
|
|
9702
|
-
Beyond the global Claude Code hooks above,
|
|
9871
|
+
Beyond the global Claude Code hooks above, editor profiles emit native hook files for runtimes that support their own lifecycle. The profile threshold and command/output contract are editor-specific; generators must not assume Claude event names or exit semantics.
|
|
9703
9872
|
|
|
9704
9873
|
| Editor | File | Generator | Format |
|
|
9705
9874
|
|--------|------|-----------|--------|
|
|
@@ -9707,6 +9876,42 @@ Beyond the global Claude Code hooks above, full-profile project installs emit na
|
|
|
9707
9876
|
| Devin CLI | `.devin/hooks.v1.json` | `generate_devin_hooks.py` | Claude-compatible (the replacement for Cascade) |
|
|
9708
9877
|
| Gemini CLI | `.gemini/settings.json` (hooks block) | `generate_gemini_hooks.py` | Gemini `BeforeTool`/`AfterTool` events |
|
|
9709
9878
|
| Augment | `.augment/settings.json` (hooks block) | `generate_augment_hooks.py` | Claude-style events |
|
|
9879
|
+
| GitHub Copilot | `.github/hooks/ai-toolkit.json`; user `$COPILOT_HOME/hooks/ai-toolkit.json` | `generate_copilot_hooks.py` | GitHub version 1, camelCase events (profile ≥ `standard`) |
|
|
9880
|
+
| Codex CLI | `.codex/hooks.json`; user `$CODEX_HOME/hooks.json` | `generate_codex_hooks.py` | Native Codex schema, PascalCase events, command ownership markers |
|
|
9881
|
+
|
|
9882
|
+
### Cursor hooks (`.cursor/hooks.json`)
|
|
9883
|
+
|
|
9884
|
+
Cursor hooks follow the native [version-1 hooks contract](https://cursor.com/docs/hooks):
|
|
9885
|
+
|
|
9886
|
+
- **Cloud:** cloud agents load only repository `.cursor/hooks.json`; they cannot read user-level `~/.cursor/hooks.json`. Project commands call the adjacent self-contained `.cursor/hooks/ai-toolkit/cursor_hook.py` runtime and contain no host `~/.softspark` dependency.
|
|
9887
|
+
- **Events:** the generator emits the complete documented Agent, Tab, and workspace lifecycle event set, including Cursor 3.11 conversation events `beforeSubmitPrompt`, `afterAgentResponse`, `afterAgentThought`, `subagentStart`, `subagentStop`, `preCompact`, and `stop`.
|
|
9888
|
+
- **Schema:** managed entries use only documented `command`, `timeout`, and `loop_limit` fields. Regeneration recognizes the runtime command as its ownership marker and removes legacy `_source: ai-toolkit` entries without emitting that non-standard key again.
|
|
9889
|
+
- **Safety:** destructive shell commands return Cursor's native `permission: deny` response and exit 2. A failed detected quality gate returns a bounded `followup_message`; `stop` and `subagentStop` declare `loop_limit: 5`, with an earlier three-failure circuit breaker in the runtime.
|
|
9890
|
+
- **Preservation:** unrelated top-level settings and user hook entries survive regeneration. Config and runtime replacement is staged and rejects symlinked destinations or a user-owned runtime collision.
|
|
9891
|
+
|
|
9892
|
+
### GitHub Copilot hooks (`.github/hooks/ai-toolkit.json`)
|
|
9893
|
+
|
|
9894
|
+
Copilot hooks follow GitHub's native [hooks reference](https://docs.github.com/en/copilot/reference/hooks-reference), not Claude's settings schema:
|
|
9895
|
+
|
|
9896
|
+
- **Locations:** repository hooks live in `.github/hooks/*.json`; user hooks live in `hooks/*.json` below `$COPILOT_HOME` or `~/.copilot`.
|
|
9897
|
+
- **File shape:** top-level `version: 1` plus a `hooks` object containing camelCase events.
|
|
9898
|
+
- **Runtime:** `ai-toolkit.json` calls the adjacent self-contained `ai-toolkit/copilot_hook.py`; local hooks do not depend on a package checkout or `~/.softspark` scripts.
|
|
9899
|
+
- **Native decisions:** `preToolUse` returns `permissionDecision`, `permissionDecisionReason`, and optional `modifiedArgs`. `agentStop` returns `decision` plus `reason`. Context events use `additionalContext`.
|
|
9900
|
+
- **Failure semantics:** the runtime uses GitHub's event-specific stdout and exit-code contracts. It does not reuse Claude's generic exit-2 blocking behavior.
|
|
9901
|
+
- **Loop safety:** a failing `agentStop` quality gate can block twice; the third consecutive failure opens the circuit so the session cannot loop forever.
|
|
9902
|
+
- **Ownership:** generated configs carry `AI_TOOLKIT_HOOK_OWNER=ai-toolkit`; unrelated hook files are not edited.
|
|
9903
|
+
|
|
9904
|
+
### Codex CLI hooks (`.codex/hooks.json`)
|
|
9905
|
+
|
|
9906
|
+
Codex hooks follow the native [Codex hooks contract](https://learn.chatgpt.com/docs/hooks):
|
|
9907
|
+
|
|
9908
|
+
- **Locations:** repository hooks live in `.codex/hooks.json`; user hooks live in `$CODEX_HOME/hooks.json` (default `~/.codex/hooks.json`). Project hooks load only for a trusted `.codex` layer.
|
|
9909
|
+
- **Assets:** repository commands use self-contained `.codex/hooks/*`; user commands use `$CODEX_HOME/ai-toolkit-hooks/*`. They do not call Claude's `~/.softspark/ai-toolkit/hooks/` paths.
|
|
9910
|
+
- **Events:** Codex documents 10 events. ai-toolkit wires 9: `SessionStart`, `PreToolUse`, `PostToolUse`, `PermissionRequest`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, `PreCompact`, and `Stop`. `PostCompact` is intentionally unwired.
|
|
9911
|
+
- **Compaction:** `PreCompact` runs `codex-pre-compact.sh`, a Codex-native reminder that refers to the active `AGENTS.md` chain, plan, and git state. It does not run Claude's `pre-compact.sh` or `pre-compact-save.sh` payload adapters.
|
|
9912
|
+
- **Ownership:** native JSON contains no private `_source` keys. Core handlers carry `AI_TOOLKIT_HOOK_OWNER=ai-toolkit` in their command; plugin and external handlers use exact source-specific command markers.
|
|
9913
|
+
- **Preservation:** generation replaces only toolkit-owned handlers and assets. Unrelated user handlers and plugin-owned handlers remain intact.
|
|
9914
|
+
- **Trust:** installation never bypasses trust. Review the active definitions with `/hooks` after install or update.
|
|
9710
9915
|
|
|
9711
9916
|
### Devin CLI hooks (`.devin/hooks.v1.json`)
|
|
9712
9917
|
|
|
@@ -10314,10 +10519,10 @@ No existing install scripts or CI configurations need changes.
|
|
|
10314
10519
|
title: "AI Toolkit - MCP Editor Compatibility"
|
|
10315
10520
|
category: reference
|
|
10316
10521
|
service: ai-toolkit
|
|
10317
|
-
tags: [mcp, editors, compatibility, codex, cursor]
|
|
10318
|
-
version: "1.
|
|
10522
|
+
tags: [mcp, editors, compatibility, codex, cursor, antigravity]
|
|
10523
|
+
version: "1.3.0"
|
|
10319
10524
|
created: "2026-04-12"
|
|
10320
|
-
last_updated: "2026-
|
|
10525
|
+
last_updated: "2026-07-14"
|
|
10321
10526
|
description: "Official MCP support matrix and native config targets for editors supported by ai-toolkit."
|
|
10322
10527
|
---
|
|
10323
10528
|
|
|
@@ -10333,13 +10538,14 @@ ai-toolkit keeps `.mcp.json` as the project-level canonical template format and
|
|
|
10333
10538
|
|--------|-------|--------------------|------------------|
|
|
10334
10539
|
| Claude Code | project + global | `.claude/settings.local.json`, `~/.claude/settings.json` | Merges `mcpServers` while preserving other settings keys |
|
|
10335
10540
|
| Cursor | project + global | `.cursor/mcp.json`, `~/.cursor/mcp.json` | Mirrors `mcpServers` directly |
|
|
10336
|
-
| GitHub Copilot | project + global | `.github/mcp.json`, `~/.copilot/mcp-config.json` | Adds Copilot-required `type` and `tools` fields |
|
|
10541
|
+
| GitHub Copilot | project + global | `.github/mcp.json`, `$COPILOT_HOME/mcp-config.json` (default `~/.copilot/mcp-config.json`) | Adds Copilot-required `type` and `tools` fields |
|
|
10337
10542
|
| Gemini CLI | project + global | `.gemini/settings.json`, `~/.gemini/settings.json` | Merges `mcpServers` into settings JSON |
|
|
10543
|
+
| Google Antigravity | project + global | `.agents/mcp_config.json`, `~/.gemini/config/mcp_config.json` | Preserves documented `command`, `serverUrl`, and `url` transports plus optional authentication, disablement, and tool-filter fields |
|
|
10338
10544
|
| Roo Code | project | `.roo/mcp.json` | Mirrors `mcpServers` into the documented project-level MCP file |
|
|
10339
10545
|
| Windsurf | global | `~/.codeium/windsurf/mcp_config.json` | Global-only JSON config |
|
|
10340
10546
|
| Cline | global | `~/.cline/data/settings/cline_mcp_settings.json` | Global-only JSON config |
|
|
10341
10547
|
| Augment | global | `~/.augment/settings.json` | Global-only JSON settings file |
|
|
10342
|
-
| Codex CLI | global | `~/.codex/config.toml` | Renders
|
|
10548
|
+
| Codex CLI | project + global | `.codex/config.toml`, `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) | Renders validated TOML `mcp_servers` tables inside a managed block while preserving unrelated bytes and comments |
|
|
10343
10549
|
|
|
10344
10550
|
## Unsupported for Automatic Install
|
|
10345
10551
|
|
|
@@ -10348,13 +10554,14 @@ These editors are still supported by ai-toolkit for rules and instructions, but
|
|
|
10348
10554
|
| Editor | Reason |
|
|
10349
10555
|
|--------|--------|
|
|
10350
10556
|
| Aider | No verified native MCP config surface was adopted in ai-toolkit |
|
|
10351
|
-
| Google Antigravity | MCP can be configured via UI/import flows, but no stable file target was adopted in ai-toolkit |
|
|
10352
10557
|
|
|
10353
10558
|
## CLI
|
|
10354
10559
|
|
|
10355
10560
|
```bash
|
|
10356
10561
|
ai-toolkit mcp editors
|
|
10357
10562
|
ai-toolkit mcp install --editor cursor --scope project github --target .
|
|
10563
|
+
ai-toolkit mcp install --editor antigravity --scope project context7 --target .
|
|
10564
|
+
ai-toolkit mcp install --editor codex --scope project context7 --target .
|
|
10358
10565
|
ai-toolkit mcp install --editor codex context7
|
|
10359
10566
|
ai-toolkit mcp remove github --editor cursor --scope project --target .
|
|
10360
10567
|
```
|
|
@@ -10365,7 +10572,26 @@ When `.mcp.json` exists in a project, `ai-toolkit install --local` mirrors its s
|
|
|
10365
10572
|
- `.claude/settings.local.json`
|
|
10366
10573
|
- `.cursor/mcp.json` when `--editors cursor` is selected
|
|
10367
10574
|
- `.github/mcp.json` when `--editors copilot` is selected
|
|
10575
|
+
- `.agents/mcp_config.json` when `--editors antigravity` is selected
|
|
10368
10576
|
- `.roo/mcp.json` when `--editors roo` is selected
|
|
10577
|
+
- `.codex/config.toml` when `--editors codex` is selected; project config is
|
|
10578
|
+
active only after the repository `.codex` layer is trusted
|
|
10579
|
+
|
|
10580
|
+
Codex project and user config preserve unrelated TOML text. ai-toolkit owns only
|
|
10581
|
+
the marker-bounded MCP block it generates. Invalid TOML, unsupported transport
|
|
10582
|
+
fields, and symlinked config roots are rejected without rewriting the file.
|
|
10583
|
+
Portable `type` metadata is translated only when it matches the Codex transport:
|
|
10584
|
+
`http` requires `url`, while `local` and `stdio` require `command`. The adapter
|
|
10585
|
+
removes that metadata from native TOML and rejects SSE, unknown types, and
|
|
10586
|
+
conflicting transport fields before writing.
|
|
10587
|
+
|
|
10588
|
+
Antigravity project and global configs preserve unrelated top-level keys and
|
|
10589
|
+
user-owned servers. The adapter accepts both `serverUrl` and `url` for remote
|
|
10590
|
+
servers, as documented by the Antigravity 2.1.4 changelog, but rejects the
|
|
10591
|
+
unsupported legacy `httpUrl` field before any file in the transaction changes.
|
|
10592
|
+
|
|
10593
|
+
`CODEX_HOME` and `COPILOT_HOME` replace their editors' default user config
|
|
10594
|
+
roots. They never relocate project files.
|
|
10369
10595
|
|
|
10370
10596
|
Global-only clients are configured explicitly via `ai-toolkit mcp install --editor ...`.
|
|
10371
10597
|
|
|
@@ -10383,9 +10609,9 @@ title: "MCP Server Templates"
|
|
|
10383
10609
|
category: reference
|
|
10384
10610
|
service: ai-toolkit
|
|
10385
10611
|
tags: [mcp, templates, servers, configuration, editors, inject-mcp, external-templates]
|
|
10386
|
-
version: "1.
|
|
10612
|
+
version: "1.4.0"
|
|
10387
10613
|
created: "2026-04-07"
|
|
10388
|
-
last_updated: "2026-
|
|
10614
|
+
last_updated: "2026-07-14"
|
|
10389
10615
|
description: "Reference for 26 built-in MCP server templates, external template injection via inject-mcp, and native editor MCP installation support."
|
|
10390
10616
|
---
|
|
10391
10617
|
|
|
@@ -10406,6 +10632,8 @@ ai-toolkit mcp show <name> # Print a template's JSON config
|
|
|
10406
10632
|
ai-toolkit mcp add <name> # Merge a template into .mcp.json
|
|
10407
10633
|
ai-toolkit mcp add <n1> <n2> # Add multiple templates at once
|
|
10408
10634
|
ai-toolkit mcp install --editor cursor --scope project github --target .
|
|
10635
|
+
ai-toolkit mcp install --editor antigravity --scope project context7 --target .
|
|
10636
|
+
ai-toolkit mcp install --editor codex --scope project context7 --target .
|
|
10409
10637
|
ai-toolkit mcp install --editor codex context7
|
|
10410
10638
|
ai-toolkit mcp remove <name> # Remove from .mcp.json or native editor config
|
|
10411
10639
|
```
|
|
@@ -10415,7 +10643,7 @@ ai-toolkit mcp remove <name> # Remove from .mcp.json or native editor confi
|
|
|
10415
10643
|
The `add` command merges the `mcpServers` block from the template into `.mcp.json`. If `.mcp.json` does not exist it is created. If the server name already exists in `.mcp.json`, the entry is overwritten with the template version.
|
|
10416
10644
|
|
|
10417
10645
|
The `install` command renders the same canonical template into an editor-native config format:
|
|
10418
|
-
- JSON clients with `mcpServers` blocks: Claude Code, Cursor, Gemini CLI, Roo Code, Windsurf, Cline, Augment
|
|
10646
|
+
- JSON clients with `mcpServers` blocks: Claude Code, Cursor, Gemini CLI, Google Antigravity, Roo Code, Windsurf, Cline, Augment
|
|
10419
10647
|
- JSON clients with additional transport metadata: GitHub Copilot
|
|
10420
10648
|
- TOML clients: Codex CLI (`[mcp_servers.<name>]`)
|
|
10421
10649
|
|
|
@@ -10427,15 +10655,19 @@ When `install` runs with `--scope project`, ai-toolkit also updates the project'
|
|
|
10427
10655
|
|--------|-------|--------------------|-------|
|
|
10428
10656
|
| `claude` | project + global | `.claude/settings.local.json`, `~/.claude/settings.json` | Preserves existing hooks and env keys |
|
|
10429
10657
|
| `cursor` | project + global | `.cursor/mcp.json`, `~/.cursor/mcp.json` | Mirrors canonical `mcpServers` |
|
|
10430
|
-
| `copilot` | project + global | `.github/mcp.json`, `~/.copilot/mcp-config.json` | Adds `type` and `tools: ["*"]` automatically |
|
|
10658
|
+
| `copilot` | project + global | `.github/mcp.json`, `$COPILOT_HOME/mcp-config.json` (default `~/.copilot/mcp-config.json`) | Adds `type` and `tools: ["*"]` automatically |
|
|
10431
10659
|
| `gemini` | project + global | `.gemini/settings.json`, `~/.gemini/settings.json` | Uses Gemini CLI `mcpServers` format |
|
|
10660
|
+
| `antigravity` | project + global | `.agents/mcp_config.json`, `~/.gemini/config/mcp_config.json` | Preserves `url` or `serverUrl` remote transports and Antigravity authentication/tool-control fields |
|
|
10432
10661
|
| `roo` | project | `.roo/mcp.json` | Mirrors canonical `mcpServers` into Roo's project MCP file |
|
|
10433
10662
|
| `windsurf` | global | `~/.codeium/windsurf/mcp_config.json` | Global-only official config |
|
|
10434
10663
|
| `cline` | global | `~/.cline/data/settings/cline_mcp_settings.json` | Global-only official config |
|
|
10435
10664
|
| `augment` | global | `~/.augment/settings.json` | Global-only settings file |
|
|
10436
|
-
| `codex` | global | `~/.codex/config.toml` |
|
|
10665
|
+
| `codex` | project + global | `.codex/config.toml`, `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) | Validated TOML `mcp_servers` tables in a marker-bounded managed block; unrelated TOML/comments preserved |
|
|
10437
10666
|
|
|
10438
|
-
Project-local `ai-toolkit install --local` also mirrors `.mcp.json` into Claude
|
|
10667
|
+
Project-local `ai-toolkit install --local` also mirrors `.mcp.json` into Claude
|
|
10668
|
+
project settings plus selected project editors that have official
|
|
10669
|
+
repository/workspace MCP files (`cursor`, `copilot`, `antigravity`, `roo`, `codex`). Codex
|
|
10670
|
+
loads `.codex/config.toml` only for trusted project layers.
|
|
10439
10671
|
|
|
10440
10672
|
## Template List
|
|
10441
10673
|
|
|
@@ -11130,9 +11362,9 @@ title: "AI Toolkit - opencode Compatibility"
|
|
|
11130
11362
|
category: reference
|
|
11131
11363
|
service: ai-toolkit
|
|
11132
11364
|
tags: [opencode, compatibility, install, skills, hooks, mcp, plugins]
|
|
11133
|
-
version: "1.0.
|
|
11365
|
+
version: "1.0.1"
|
|
11134
11366
|
created: "2026-04-16"
|
|
11135
|
-
last_updated: "2026-
|
|
11367
|
+
last_updated: "2026-07-14"
|
|
11136
11368
|
description: "Reference for how ai-toolkit integrates with opencode — AGENTS.md, subagents, slash commands, JS plugin hook bridge, and MCP merge into opencode.json."
|
|
11137
11369
|
---
|
|
11138
11370
|
|
|
@@ -11171,16 +11403,16 @@ Files land directly under `~/.config/opencode/` (no `.opencode/` nesting) becaus
|
|
|
11171
11403
|
| Feature | Claude Code | Codex CLI | opencode |
|
|
11172
11404
|
|--------------------|-------------|-----------------|-------------------------------------------|
|
|
11173
11405
|
| Rules file | `CLAUDE.md` | `AGENTS.md` | `AGENTS.md` + `CLAUDE.md` fallback |
|
|
11174
|
-
| Subagents | Yes |
|
|
11406
|
+
| Subagents | Yes | Yes (`.codex/agents/*.toml`) | Yes (`mode: subagent`) |
|
|
11175
11407
|
| Slash commands | Skills | Adapted skills | Native commands with frontmatter |
|
|
11176
11408
|
| MCP | Yes | Yes | Yes (`opencode.json`) |
|
|
11177
11409
|
| Lifecycle hooks | JSON config | `.codex/hooks` | JS/TS plugins (~30+ events) |
|
|
11178
|
-
| Global config dir | `~/.claude` | `~/.codex`
|
|
11179
|
-
| Project config dir | `.claude` | `.agents`
|
|
11410
|
+
| Global config dir | `~/.claude` | `$CODEX_HOME` (default `~/.codex`) | `~/.config/opencode` |
|
|
11411
|
+
| Project config dir | `.claude` | `.codex` + `.agents/skills` | `.opencode` |
|
|
11180
11412
|
|
|
11181
11413
|
## Shared AGENTS.md
|
|
11182
11414
|
|
|
11183
|
-
opencode and Codex CLI both read `AGENTS.md`. The toolkit emits two distinct marker-bounded sections in a single file, so installing both editors does not clobber either. The Codex section is produced by `generate_codex.py`; the opencode section is produced by `generate_opencode.py`.
|
|
11415
|
+
opencode and Codex CLI both read `AGENTS.md`. The toolkit emits two distinct marker-bounded sections in a single file, so installing both editors does not clobber either. The Codex section is produced by `generate_codex.py`; the opencode section is produced by `generate_opencode.py`. OpenCode commands use a platform-specific portable renderer for Claude-only orchestration primitives, so generated content uses OpenCode-native wording.
|
|
11184
11416
|
|
|
11185
11417
|
## Subagent Translation Model
|
|
11186
11418
|
|
|
@@ -11200,6 +11432,12 @@ Only user-invocable skills (`user-invocable: true` or no `disable-model-invocati
|
|
|
11200
11432
|
|
|
11201
11433
|
Each command file carries the prompt in its markdown body (built from the SKILL.md body). opencode reads the body as the prompt; the `template` field is JSON-config-only and is ignored in `.md` command files.
|
|
11202
11434
|
|
|
11435
|
+
OpenCode natively interpolates `$ARGUMENTS` and positional placeholders `$1`
|
|
11436
|
+
through `$9` in command bodies. The renderer preserves those placeholders for
|
|
11437
|
+
OpenCode while translating Claude-only skill-directory variables and runtime
|
|
11438
|
+
APIs. Codex output uses a separate renderer and converts prompt placeholders to
|
|
11439
|
+
durable user-input prose.
|
|
11440
|
+
|
|
11203
11441
|
## Hook Bridge (JS Plugin)
|
|
11204
11442
|
|
|
11205
11443
|
`.opencode/plugins/ai-toolkit-hooks.js` is a single-file plugin that maps opencode events to the shared Bash hooks in `~/.softspark/ai-toolkit/hooks/`:
|
|
@@ -11256,7 +11494,7 @@ User-authored opencode files and user-authored `opencode.json` keys are never de
|
|
|
11256
11494
|
## Behavioral Limits
|
|
11257
11495
|
|
|
11258
11496
|
- opencode does not expose the full Claude hook event surface; only the events in the mapping table above are bridged. Claude-only events (`TaskCompleted`, `TeammateIdle`, `SubagentStart`, `SubagentStop`, `PreCompact`) are silently skipped.
|
|
11259
|
-
- Multi-agent orchestration skills (`/orchestrate`, `/workflow`, `/swarm`, `/subagent-development`) run through the
|
|
11497
|
+
- Multi-agent orchestration skills (`/orchestrate`, `/workflow`, `/swarm`, `/subagent-development`) run through the OpenCode renderer and use OpenCode-native subagents with explicit file ownership.
|
|
11260
11498
|
|
|
11261
11499
|
## Verification
|
|
11262
11500
|
|
|
@@ -11296,9 +11534,9 @@ title: "Plugin Pack Conventions"
|
|
|
11296
11534
|
category: reference
|
|
11297
11535
|
service: ai-toolkit
|
|
11298
11536
|
tags: [plugins, plugin-packs, conventions, manifests, hooks, policy-packs]
|
|
11299
|
-
version: "1.
|
|
11537
|
+
version: "1.1.0"
|
|
11300
11538
|
created: "2026-03-28"
|
|
11301
|
-
last_updated: "2026-
|
|
11539
|
+
last_updated: "2026-07-14"
|
|
11302
11540
|
description: "Conventions for experimental ai-toolkit plugin packs, policy packs, hook packs, and plugin-creator scaffolding across Claude Code and Codex runtimes."
|
|
11303
11541
|
---
|
|
11304
11542
|
|
|
@@ -11380,11 +11618,11 @@ ai-toolkit plugin status --editor all # show installed packs with r
|
|
|
11380
11618
|
### What `plugin install` Does
|
|
11381
11619
|
|
|
11382
11620
|
1. **Parses** `--editor claude|codex|all` (default: `claude`)
|
|
11383
|
-
2. **Copies** plugin-specific hooks to `~/.softspark/ai-toolkit/hooks/plugin-<pack>-<hook>.sh`
|
|
11384
|
-
3. **Copies** plugin
|
|
11621
|
+
2. **Copies** plugin-specific hooks to runtime-owned storage: Claude uses `~/.softspark/ai-toolkit/hooks/plugin-<pack>-<hook>.sh`; Codex uses `$CODEX_HOME/ai-toolkit-hooks/plugin-<pack>-<hook>.sh`
|
|
11622
|
+
3. **Copies** shared plugin scripts to `~/.softspark/ai-toolkit/plugin-scripts/<pack>/`
|
|
11385
11623
|
4. **Runs** init scripts if present (e.g. `init_db.py` for memory-pack — safe to re-run, preserves data)
|
|
11386
11624
|
5. **Claude Code target**: links missing agents/skills into `~/.claude/`, injects plugin-local rules into `~/.claude/CLAUDE.md`, and merges plugin hook entries into `~/.claude/settings.json`
|
|
11387
|
-
6. **Codex target**: bootstraps
|
|
11625
|
+
6. **Codex target**: bootstraps `$CODEX_HOME/AGENTS.md`, `$HOME/.agents/skills`, `$CODEX_HOME/hooks.json`, and self-contained `$CODEX_HOME/ai-toolkit-hooks`, then layers plugin-specific rules and hooks on top; it does not write `~/AGENTS.md` or `.agents/rules/`
|
|
11388
11626
|
7. **Records** installed state per runtime in `~/.softspark/ai-toolkit/plugins.json`
|
|
11389
11627
|
|
|
11390
11628
|
### What `plugin update` Does
|
|
@@ -11404,8 +11642,8 @@ ai-toolkit plugin status --editor all # show installed packs with r
|
|
|
11404
11642
|
### What `plugin remove` Does
|
|
11405
11643
|
|
|
11406
11644
|
1. **Claude Code target**: strips plugin hook entries from `~/.claude/settings.json` and removes plugin-local rule sections from `~/.claude/CLAUDE.md`
|
|
11407
|
-
2. **Codex target**: strips plugin
|
|
11408
|
-
3. **
|
|
11645
|
+
2. **Codex target**: strips only command handlers carrying the exact `AI_TOOLKIT_HOOK_OWNER=ai-toolkit-plugin-<pack>` marker from `$CODEX_HOME/hooks.json`, removes owned `$CODEX_HOME/ai-toolkit-hooks/plugin-<pack>-*` assets, and removes the pack's marker-bounded sections from `$CODEX_HOME/AGENTS.md`
|
|
11646
|
+
3. **Claude/shared assets** (`~/.softspark/ai-toolkit/hooks/plugin-*`, `plugin-scripts/<pack>/`) are removed only when no remaining runtime still uses that pack
|
|
11409
11647
|
4. **Updates** `plugins.json` state per runtime
|
|
11410
11648
|
5. **Leaves** core agents/skills untouched (they belong to the base install)
|
|
11411
11649
|
6. **Leaves** plugin data intact (e.g. `memory.db` — use `clean` to prune)
|
|
@@ -11657,7 +11895,7 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
|
|
|
11657
11895
|
| **cve-scan** | `/cve-scan` | medium | Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, ruby, dart) |
|
|
11658
11896
|
| **docs** | `/docs` | high | Generate/update docs: README, API docs, architecture notes, changelogs (Tier 1 — single agent) |
|
|
11659
11897
|
| **explain** | `/explain` | medium | Explain architecture of a file/module using Mermaid diagrams |
|
|
11660
|
-
| **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, native in Claude, Codex-adapted
|
|
11898
|
+
| **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, native in Claude, Codex-adapted with semantic subagent guidance |
|
|
11661
11899
|
| **swarm** | `/swarm` | max | Massive parallelism: map-reduce, consensus, relay — Tier 3 |
|
|
11662
11900
|
| **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2, Codex-adapted to native subagent orchestration |
|
|
11663
11901
|
| **instinct-review** | `/instinct-review` | low | Review, curate, and manage learned instincts from past sessions |
|
|
@@ -11837,8 +12075,8 @@ Codex CLI receives the full skill catalog during `ai-toolkit install --local --e
|
|
|
11837
12075
|
Claude Chat/Desktop/Cowork receives this same catalog through `ai-toolkit claude-app export`. The export also adds an app-only `ai-toolkit-rules` skill because the Claude app does not read Claude Code's `CLAUDE.md` or `.claude/rules/` surfaces.
|
|
11838
12076
|
|
|
11839
12077
|
- Native Codex-compatible skills are symlinked directly into `.agents/skills/`
|
|
11840
|
-
- Claude-
|
|
11841
|
-
- Adapted wrappers
|
|
12078
|
+
- Skills with Claude-only tools, placeholders, path variables, or orchestration APIs are generated as Codex wrappers
|
|
12079
|
+
- Adapted wrappers describe subagent control, waiting, and planning as durable current-client semantics without embedding guessed tool signatures
|
|
11842
12080
|
|
|
11843
12081
|
Common adapted skills:
|
|
11844
12082
|
|
|
@@ -12046,9 +12284,9 @@ title: "Supported Tools Registry"
|
|
|
12046
12284
|
category: reference
|
|
12047
12285
|
service: ai-toolkit
|
|
12048
12286
|
tags: [editors, platforms, generators, integration, ecosystem]
|
|
12049
|
-
version: "1.
|
|
12287
|
+
version: "1.10.0"
|
|
12050
12288
|
created: "2026-04-23"
|
|
12051
|
-
last_updated: "2026-07-
|
|
12289
|
+
last_updated: "2026-07-14"
|
|
12052
12290
|
description: "Human-readable view of scripts/ecosystem_tools.json — the canonical list of tools ai-toolkit integrates with (Claude Code, Claude Chat/Cowork, and 11 editors), their documentation URLs, config paths, our generators, and tracked capability markers."
|
|
12053
12291
|
---
|
|
12054
12292
|
|
|
@@ -12111,9 +12349,10 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
|
|
|
12111
12349
|
| Stable docs mirror | https://cursor.com/llms.txt (all doc pages have .md twins) |
|
|
12112
12350
|
| Config paths | `.cursorrules` (**legacy** — no longer in cursor.com/docs/rules; deprecated ~0.43–0.45 in favor of `.cursor/rules/*.mdc`, still read, no removal deadline; we keep emitting for back-compat), `.cursor/rules/*.mdc` (plain `.md` files in `.cursor/rules/` are **ignored** by the rules system), `AGENTS.md`, `.cursor/mcp.json`, `~/.cursor/mcp.json`, `.cursor/hooks.json`, `~/.cursor/hooks.json` (user-level hooks scope; enterprise system paths + dashboard team hooks not adopted, class C), `.cursor/skills/*/SKILL.md`, `~/.cursor/skills/*/SKILL.md`, `.cursor/agents/*.md`, `~/.cursor/agents/*.md` |
|
|
12113
12351
|
| Compat read paths | skills: `.agents/skills/`, `~/.agents/skills/`, `.claude/skills/`, `~/.claude/skills/`, `.codex/skills/`, `~/.codex/skills/`; subagents: `.claude/agents/`, `~/.claude/agents/`, `.codex/agents/`, `~/.codex/agents/` (`.cursor/` wins on name conflicts) |
|
|
12114
|
-
| Our generators | `scripts/generate_cursor_rules.py`, `scripts/generate_cursor_mdc.py`, `scripts/generate_cursor_hooks.py` (profile=full local **and** global `~/.cursor/hooks.json`), `scripts/generate_cursor_agents.py` (profile=full), `scripts/generate_cursor_skills.py` (profile=full pointer) |
|
|
12352
|
+
| Our generators | `scripts/generate_cursor_rules.py`, `scripts/generate_cursor_mdc.py`, `scripts/generate_cursor_hooks.py` (complete version-1 event set plus self-contained `.cursor/hooks/ai-toolkit/cursor_hook.py`; profile=full local **and** global `~/.cursor/hooks.json`), `scripts/generate_cursor_agents.py` (profile=full), `scripts/generate_cursor_skills.py` (profile=full pointer) |
|
|
12115
12353
|
| Global install | Cursor is in `GLOBAL_CAPABLE_EDITORS` for **hooks only**: `ai-toolkit install --editors cursor` writes `~/.cursor/hooks.json` (profile ≥ standard). RULES stay project-local (Cursor's only global rules surface is the Settings UI). |
|
|
12116
12354
|
| Tracked capabilities | `cursorrules`, `.cursor/rules`, `AGENTS.md`, `mcp.json`, Composer, Agent Mode, hooks.json, subagents, skills, plugins |
|
|
12355
|
+
| Hook compatibility | Cursor 3.11 project hooks run locally and in cloud agents from repository `.cursor/hooks.json`; cloud VMs do not load `~/.cursor/hooks.json`. The generated project manifest uses only documented command-entry keys, calls a repo-relative runtime, covers conversation hooks including `afterAgentResponse` and `afterAgentThought`, preserves user entries, and caps `stop`/`subagentStop` follow-up loops at 5. |
|
|
12117
12356
|
|
|
12118
12357
|
### Windsurf
|
|
12119
12358
|
|
|
@@ -12139,12 +12378,13 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
|
|
|
12139
12378
|
| ID | `github-copilot` |
|
|
12140
12379
|
| Docs | https://docs.github.com/en/copilot |
|
|
12141
12380
|
| Release notes | https://github.blog/changelog/label/copilot/ |
|
|
12142
|
-
|
|
|
12143
|
-
|
|
|
12144
|
-
|
|
|
12145
|
-
|
|
|
12381
|
+
| Native docs | [Hooks reference](https://docs.github.com/en/copilot/reference/hooks-reference), [skills](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-skills), [CLI config directory](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference) |
|
|
12382
|
+
| Config paths | **Repo (`.github/`):** `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, `.github/prompts/*.prompt.md`, `.github/agents/*.agent.md`, `.github/skills/<name>/SKILL.md`, `.github/hooks/*.json`, `AGENTS.md`. **Copilot CLI user-level (`~/.copilot/`, `COPILOT_HOME` override):** `copilot-instructions.md`, `instructions/*.instructions.md`, `agents/*.agent.md`, `skills/<name>/SKILL.md`, `hooks/*.json`, `settings.json`, `mcp-config.json` below the active config root. |
|
|
12383
|
+
| Compat read paths | Copilot also discovers project `.claude/skills` and `.agents/skills`, and personal `~/.agents/skills`. ai-toolkit nevertheless materializes self-contained native skills under `.github/skills` and the active Copilot config root so assets and helper scripts remain available and `COPILOT_HOME` sessions do not depend on fallback discovery. |
|
|
12384
|
+
| Our generators | `scripts/generate_copilot.py` (instructions, prompts, agents, and portable skill directories), `scripts/generate_copilot_hooks.py` (native version-1 hook config plus self-contained runtime) |
|
|
12385
|
+
| Global install | `ai-toolkit install --editors copilot` writes instructions, agents, skills, and, for profile ≥ `standard`, native hooks below `$COPILOT_HOME` when set or `~/.copilot` otherwise. VS Code Copilot and GitHub.com use repo `.github/` files, so local emission remains required. |
|
|
12146
12386
|
| Tracked capabilities | `copilot-instructions.md`, Copilot Chat, Copilot Workspace, Copilot cloud agent, `applyTo`, custom agents, prompt files, `instructions.md`, `AGENTS.md`, MCP, skills, CLI hooks, `~/.copilot/` |
|
|
12147
|
-
|
|
|
12387
|
+
| Compatibility notes | Custom agents use native `.agent.md` files with `name` and `description`; `tools` is omitted instead of guessing editor-specific aliases. Prompt and skill bodies remove Claude-only interpolation and delegation APIs. Hooks use the GitHub version-1 schema, camelCase event names, native decision payloads, and a repository/config-root-contained Python runtime instead of Claude hook scripts. Project MCP remains owned by the editor MCP sync path. Copilot code review also reads the nearest `AGENTS.md`; local install keeps its generated section separate from Codex/OpenCode sections. |
|
|
12148
12388
|
|
|
12149
12389
|
### Gemini CLI
|
|
12150
12390
|
|
|
@@ -12221,27 +12461,27 @@ The canonical data lives in **`scripts/ecosystem_tools.json`** and is consumed b
|
|
|
12221
12461
|
| ID | `google-antigravity` |
|
|
12222
12462
|
| Docs | https://antigravity.google/docs (JavaScript SPA — use bundle strings / sitemap to verify) |
|
|
12223
12463
|
| Changelog | https://antigravity.google/changelog (SPA; changelog entries embedded in main-*.js) |
|
|
12224
|
-
| Config paths | `.agents/rules/*.md`, `.agents/workflows/*.md` (plural is the Antigravity 2.0 default; singular `.agent/rules`, `.agent/workflows` still read as fallback), `.agent/skills/*/SKILL.md` (IDE), `.agents/skills/*/SKILL.md` (CLI), `.agents/hooks.json` (CLI hooks), `.agents/mcp_config.json` (
|
|
12464
|
+
| Config paths | `.agents/rules/*.md`, `.agents/workflows/*.md` (plural is the Antigravity 2.0 default; singular `.agent/rules`, `.agent/workflows` still read as fallback), `.agent/skills/*/SKILL.md` (IDE), `.agents/skills/*/SKILL.md` (CLI), `.agents/hooks.json` (CLI hooks), `.agents/mcp_config.json` (workspace MCP), `AGENTS.md`, `GEMINI.md` |
|
|
12225
12465
|
| Global config paths | Skills: `~/.gemini/config/skills/*/SKILL.md` (shared across all Antigravity products) and `~/.gemini/antigravity-cli/skills/*/SKILL.md` (CLI-private) — both documented in the official Skills codelab. MCP: `~/.gemini/config/mcp_config.json` (shared global, resolved by CLI v1.0.14; the `~/.gemini/antigravity-cli/mcp_config.json` path is legacy). Rules: `~/.gemini/GEMINI.md` (dual-owner with Gemini CLI — Antigravity's IDE "+ Global" writes the same file; gemini-cli#16058 closed "not planned"). Hooks: `~/.gemini/config/hooks.json` (shared, since CLI v1.0.8). |
|
|
12226
|
-
| Our generators | `scripts/generate_antigravity.py` (rules + workflows + skill pointer dual-emitted to `.agent/skills/` and `.agents/skills/`; `generate_global()` writes the pointer to the two HOME skill dirs) |
|
|
12227
|
-
| Global install | `ai-toolkit install --editors antigravity` writes the skill pointer to `~/.gemini/config/skills/` and `~/.gemini/antigravity-cli/skills/`. Rules stay project-local (no mergeable global rules file beyond the Gemini-CLI-shared `~/.gemini/GEMINI.md`, covered by `--editors gemini`). |
|
|
12466
|
+
| Our generators | `scripts/generate_antigravity.py` (rules + workflows + skill pointer dual-emitted to `.agent/skills/` and `.agents/skills/`; `generate_global()` writes the pointer to the two HOME skill dirs). Native MCP project/global merge and removal are provided by `scripts/mcp_editors.py`. |
|
|
12467
|
+
| Global install | `ai-toolkit install --editors antigravity` writes the skill pointer to `~/.gemini/config/skills/` and `~/.gemini/antigravity-cli/skills/`. Rules stay project-local (no mergeable global rules file beyond the Gemini-CLI-shared `~/.gemini/GEMINI.md`, covered by `--editors gemini`). `ai-toolkit mcp install --editor antigravity <template>` writes the global MCP config; add `--scope project --target <repo>` for `.agents/mcp_config.json`. |
|
|
12228
12468
|
| Tracked capabilities | Antigravity, agent manager, artifacts, MCP, workflows, rules, skills, hooks, `AGENTS.md`, `GEMINI.md`, agent permissions, global skills, `~/.gemini/config/mcp_config.json` |
|
|
12229
|
-
| CLI notes | Antigravity CLI (GA 2026-05-19; latest CLI v1.0.14 2026-06-30, IDE 2.2.1). Hooks are IDE + CLI (`.agents/hooks.json` workspace, `~/.gemini/config/hooks.json` global; event set `PreToolUse`/`PostToolUse`/`PreInvocation`/`PostInvocation`/`Stop` — `PreInvocation`/`PostInvocation` have no Claude equivalent; shell tool is `run_command` with args at `.toolCall.args.CommandLine`). MCP: `url` is
|
|
12230
|
-
| Doc access note | Docs are
|
|
12469
|
+
| CLI notes | Antigravity CLI (GA 2026-05-19; latest CLI v1.0.14 2026-06-30, IDE 2.2.1). Hooks are IDE + CLI (`.agents/hooks.json` workspace, `~/.gemini/config/hooks.json` global; event set `PreToolUse`/`PostToolUse`/`PreInvocation`/`PostInvocation`/`Stop` — `PreInvocation`/`PostInvocation` have no Claude equivalent; shell tool is `run_command` with args at `.toolCall.args.CommandLine`). MCP: the official 2.1.4 changelog (2026-06-11) confirms that `url` is accepted alongside `serverUrl`; `httpUrl` is not documented and the adapter rejects it. The native adapter preserves documented `args`, `env`, `cwd`, `headers`, `authProviderType`, `oauth`, `disabled`, and `disabledTools` fields. A `generate_antigravity_hooks.py` remains backlog. |
|
|
12470
|
+
| Doc access note | Docs are a JavaScript SPA, but the official search index exposes the current MCP guide and changelog text. Verify changelog claims against the dated official entry because the MCP guide's warning can lag schema releases. |
|
|
12231
12471
|
|
|
12232
12472
|
### Codex CLI
|
|
12233
12473
|
|
|
12234
12474
|
| Field | Value |
|
|
12235
12475
|
|-------|-------|
|
|
12236
12476
|
| ID | `codex-cli` |
|
|
12237
|
-
| Docs | https://
|
|
12477
|
+
| Docs | https://learn.chatgpt.com/docs/codex/cli (official Codex CLI documentation; the previous `https://developers.openai.com/codex` endpoint now redirects to the generic ChatGPT Learn overview; latest verified local/npm release: codex-cli 0.144.4, 2026-07-14) |
|
|
12238
12478
|
| Release notes | https://github.com/openai/codex/releases |
|
|
12239
|
-
| Config paths | **Instructions:** project `AGENTS.md` (root→cwd chain, closest wins) and global `~/.codex/AGENTS.md` (`$CODEX_HOME/AGENTS.md`; `~/.codex/AGENTS.override.md` takes precedence). NOTE: `~/AGENTS.md` is NOT a global-instruction surface — Codex only reads it if a session's cwd is exactly `$HOME`. Plus `.agents/skills/*/SKILL.md`, `.codex/hooks.json`, `~/.codex/hooks.json`, `.codex/config.toml` (project layers, root→cwd, closest wins, trusted projects only), `~/.codex/config.toml`. |
|
|
12240
|
-
| Our generators | `scripts/generate_codex.py`, `scripts/generate_codex_hooks.py`, `scripts/generate_codex_skills.py` (opt-in via `--codex-skills`) |
|
|
12479
|
+
| Config paths | **Instructions:** project `AGENTS.md` (root→cwd chain, closest wins) and global `~/.codex/AGENTS.md` (`$CODEX_HOME/AGENTS.md`; `~/.codex/AGENTS.override.md` takes precedence). NOTE: `~/AGENTS.md` is NOT a global-instruction surface — Codex only reads it if a session's cwd is exactly `$HOME`. Plus `.agents/skills/*/SKILL.md`, `.codex/agents/*.toml`, `~/.codex/agents/*.toml`, `.codex/hooks.json`, `~/.codex/hooks.json`, `.codex/config.toml` (project layers, root→cwd, closest wins, trusted projects only), `~/.codex/config.toml`. |
|
|
12480
|
+
| Our generators | `scripts/generate_codex.py`, `scripts/generate_codex_agents.py` (native custom-agent TOML), `scripts/generate_codex_hooks.py`, `scripts/generate_codex_skills.py` (opt-in via `--codex-skills`) |
|
|
12241
12481
|
| Rules delivery | Universal coding rules are inlined into `AGENTS.md` (Codex reads instructions only from AGENTS.md, not `.agents/rules/`); language rules ship as `<lang>-rules` skills under `.agents/skills/`. Global install writes `~/.codex/AGENTS.md` (not `~/AGENTS.md`, which Codex never loads globally); plugin-pack rules are marker-injected into the same file. `project_doc_max_bytes` default is 32 KiB and Codex silently truncates AGENTS.md past that (see codex-cli-compatibility.md). |
|
|
12242
12482
|
| Tracked hook events | Upstream canonical (codex-rs `HookEventName` enum): `PreToolUse`, `PostToolUse`, `PermissionRequest`, `PreCompact`, `PostCompact`, `SessionStart`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, `Stop` (10 events). We wire 9 of these to shared toolkit hook scripts (via `generate_codex_hooks.py` AND `inject-hook` propagation, kept in sync), mirroring the Claude Code mapping in `app/hooks.json`. `PostCompact` is not wired (its only hook was the removed environment-snapshot probe). |
|
|
12243
12483
|
| Tracked handler types | `command` (emitted by default; the only handler Codex actually runs). `prompt` and `agent` are parsed by Codex but NOT yet executed, so hand-authored handlers of those types are inert. |
|
|
12244
|
-
| Other capabilities | `AGENTS.md`, `config.toml`, `mcp_servers`, sandbox policies, `.agents/skills/*/SKILL.md` (native Codex skill discovery path) |
|
|
12484
|
+
| Other capabilities | `AGENTS.md`, `config.toml`, `mcp_servers`, sandbox policies, `.agents/skills/*/SKILL.md` (native Codex skill discovery path), `.codex/agents/*.toml` (native custom agents) |
|
|
12245
12485
|
| Version probe | `codex --version` |
|
|
12246
12486
|
|
|
12247
12487
|
### opencode
|
|
@@ -12621,10 +12861,10 @@ Agents follow a research-before-action protocol enforced via rules:
|
|
|
12621
12861
|
title: "Windows Support"
|
|
12622
12862
|
category: reference
|
|
12623
12863
|
service: ai-toolkit
|
|
12624
|
-
tags: [windows, wsl, install, dependencies, hooks]
|
|
12864
|
+
tags: [windows, wsl, install, uninstall, dependencies, hooks, security]
|
|
12625
12865
|
created: "2026-04-24"
|
|
12626
|
-
last_updated: "2026-
|
|
12627
|
-
description: "Windows support model for ai-toolkit: WSL, Git Bash, dependency detection, and
|
|
12866
|
+
last_updated: "2026-07-14"
|
|
12867
|
+
description: "Windows support model for ai-toolkit: WSL, Git Bash, dependency detection, hooks, and fail-closed managed mutations."
|
|
12628
12868
|
---
|
|
12629
12869
|
|
|
12630
12870
|
# Windows Support
|
|
@@ -12658,6 +12898,29 @@ ai-toolkit hooks are Bash scripts. On Windows, use WSL or Git Bash so Claude Cod
|
|
|
12658
12898
|
|
|
12659
12899
|
Cross-platform hooks should keep the Bash entrypoint small and delegate complex work to Python or Node when Windows behavior diverges.
|
|
12660
12900
|
|
|
12901
|
+
## Managed Mutation Safety
|
|
12902
|
+
|
|
12903
|
+
Managed cleanup by `ai-toolkit uninstall`, external hook injection/removal, and
|
|
12904
|
+
native Codex hook generation require POSIX `dir_fd` and `O_NOFOLLOW` support.
|
|
12905
|
+
These primitives are the platform prerequisite for pinning directories between
|
|
12906
|
+
a trusted configuration root and the file being changed, so a symlink swap
|
|
12907
|
+
cannot redirect a mutation outside that root. Absolute trusted roots are opened
|
|
12908
|
+
component by component from a stable filesystem-root descriptor; all target
|
|
12909
|
+
parsing, mutation, and rollback then use the pinned descriptors.
|
|
12910
|
+
|
|
12911
|
+
- **WSL:** managed cleanup is supported.
|
|
12912
|
+
- **Native Windows Python, including invocation from Git Bash:** managed cleanup
|
|
12913
|
+
is unavailable because Windows CPython does not expose the required POSIX
|
|
12914
|
+
traversal primitives. Git Bash provides a shell, but it does not add those
|
|
12915
|
+
primitives to Python.
|
|
12916
|
+
|
|
12917
|
+
On an unsupported runtime, help, dry-run modes where available, component
|
|
12918
|
+
discovery, validation, cancellation, and other read-only operations remain
|
|
12919
|
+
available. A requested mutation exits non-zero before its transaction starts
|
|
12920
|
+
and reports `No files were changed`. Run the command from WSL to remove managed
|
|
12921
|
+
customizations, inject or remove external hooks, and generate/update native
|
|
12922
|
+
Codex hooks safely.
|
|
12923
|
+
|
|
12661
12924
|
## Verification
|
|
12662
12925
|
|
|
12663
12926
|
```bash
|