mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
feat: add Cursor, Codex, and OpenCode harnesses — maximize every AI coding tool
- AGENTS.md: universal cross-tool file read by Claude Code, Cursor, Codex, and OpenCode - .cursor/: 15 hook events via hooks.json, 16 hook scripts with DRY adapter pattern, 29 rules (9 common + 20 language-specific) with Cursor YAML frontmatter - .codex/: reference config.toml, Codex-specific AGENTS.md supplement, 10 skills ported to .agents/skills/ with openai.yaml metadata - .opencode/: 3 new tools (format-code, lint-check, git-summary), 3 new hooks (shell.env, experimental.session.compacting, permission.ask), expanded instructions, version bumped to 1.6.0 - README: fixed Cursor section, added Codex section, added cross-tool parity table - install.sh: now copies hooks.json + hooks/ for --target cursor
This commit is contained in:
109
.cursor/hooks.json
Normal file
109
.cursor/hooks.json
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"hooks": {
|
||||
"sessionStart": [
|
||||
{
|
||||
"command": "node .cursor/hooks/session-start.js",
|
||||
"event": "sessionStart",
|
||||
"description": "Load previous context and detect environment"
|
||||
}
|
||||
],
|
||||
"sessionEnd": [
|
||||
{
|
||||
"command": "node .cursor/hooks/session-end.js",
|
||||
"event": "sessionEnd",
|
||||
"description": "Persist session state and evaluate patterns"
|
||||
}
|
||||
],
|
||||
"beforeShellExecution": [
|
||||
{
|
||||
"command": "node .cursor/hooks/before-shell-execution.js",
|
||||
"event": "beforeShellExecution",
|
||||
"description": "Tmux dev server blocker, tmux reminder, git push review"
|
||||
}
|
||||
],
|
||||
"afterShellExecution": [
|
||||
{
|
||||
"command": "node .cursor/hooks/after-shell-execution.js",
|
||||
"event": "afterShellExecution",
|
||||
"description": "PR URL logging, build analysis"
|
||||
}
|
||||
],
|
||||
"afterFileEdit": [
|
||||
{
|
||||
"command": "node .cursor/hooks/after-file-edit.js",
|
||||
"event": "afterFileEdit",
|
||||
"description": "Auto-format, TypeScript check, console.log warning"
|
||||
}
|
||||
],
|
||||
"beforeMCPExecution": [
|
||||
{
|
||||
"command": "node .cursor/hooks/before-mcp-execution.js",
|
||||
"event": "beforeMCPExecution",
|
||||
"description": "MCP audit logging and untrusted server warning"
|
||||
}
|
||||
],
|
||||
"afterMCPExecution": [
|
||||
{
|
||||
"command": "node .cursor/hooks/after-mcp-execution.js",
|
||||
"event": "afterMCPExecution",
|
||||
"description": "MCP result logging"
|
||||
}
|
||||
],
|
||||
"beforeReadFile": [
|
||||
{
|
||||
"command": "node .cursor/hooks/before-read-file.js",
|
||||
"event": "beforeReadFile",
|
||||
"description": "Warn when reading sensitive files (.env, .key, .pem)"
|
||||
}
|
||||
],
|
||||
"beforeSubmitPrompt": [
|
||||
{
|
||||
"command": "node .cursor/hooks/before-submit-prompt.js",
|
||||
"event": "beforeSubmitPrompt",
|
||||
"description": "Detect secrets in prompts (sk-, ghp_, AKIA patterns)"
|
||||
}
|
||||
],
|
||||
"subagentStart": [
|
||||
{
|
||||
"command": "node .cursor/hooks/subagent-start.js",
|
||||
"event": "subagentStart",
|
||||
"description": "Log agent spawning for observability"
|
||||
}
|
||||
],
|
||||
"subagentStop": [
|
||||
{
|
||||
"command": "node .cursor/hooks/subagent-stop.js",
|
||||
"event": "subagentStop",
|
||||
"description": "Log agent completion"
|
||||
}
|
||||
],
|
||||
"beforeTabFileRead": [
|
||||
{
|
||||
"command": "node .cursor/hooks/before-tab-file-read.js",
|
||||
"event": "beforeTabFileRead",
|
||||
"description": "Block Tab from reading secrets (.env, .key, .pem, credentials)"
|
||||
}
|
||||
],
|
||||
"afterTabFileEdit": [
|
||||
{
|
||||
"command": "node .cursor/hooks/after-tab-file-edit.js",
|
||||
"event": "afterTabFileEdit",
|
||||
"description": "Auto-format Tab edits"
|
||||
}
|
||||
],
|
||||
"preCompact": [
|
||||
{
|
||||
"command": "node .cursor/hooks/pre-compact.js",
|
||||
"event": "preCompact",
|
||||
"description": "Save state before context compaction"
|
||||
}
|
||||
],
|
||||
"stop": [
|
||||
{
|
||||
"command": "node .cursor/hooks/stop.js",
|
||||
"event": "stop",
|
||||
"description": "Console.log audit on all modified files"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user