zjs105910/workbuddy-market / bundled/novel-writing-suite/skills/story-setup
story-setup
Flagged网文写作工具集基础设施部署与检查。为 Claude Code / OpenCode / Codex / Google Antigravity / ZCode / OpenClaw / Reasonix 提供内置适配;Web AI / 通用 Agent 可走 skills + AGENTS.md 文件模式。触发方式:/story-setup、$story-setup、「准备写书」「帮我搭一下环境」「配置写作项目」「检查写作环境」。
references/codex/hooks/hooks.json
View on GitHub{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" session-start",
"timeout": 10,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'session-start'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\"",
"statusMessage": "Loading story context"
}
],
"matcher": "startup|resume|clear|compact"
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" pre-tool-prose-guard",
"timeout": 10,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'pre-tool-prose-guard'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\"",
"statusMessage": "Checking story outline guard"
}
],
"matcher": "Bash|apply_patch|Edit|Write"
},
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" pre-tool-commit-advisory",
"timeout": 15,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'pre-tool-commit-advisory'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\"",
"statusMessage": "Checking story commit warnings"
}
],
"matcher": "Bash"
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" pre-compact",
"timeout": 10,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'pre-compact'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\"",
"statusMessage": "Summarizing story context"
}
],
"matcher": "manual|auto"
}
],
"PostCompact": [
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" post-compact",
"timeout": 10,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'post-compact'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\"",
"statusMessage": "Restoring story context hint"
}
],
"matcher": "manual|auto"
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "ROOT=\"${CODEX_PROJECT_DIR:-${CLAUDE_PROJECT_DIR:-$PWD}}\"; [ -d \"$ROOT\" ] || ROOT=\"$PWD\"; ROOT=\"$(cd \"$ROOT\" 2>/dev/null && pwd)\" || exit 0; while [ ! -f \"$ROOT/.codex/hooks/run-story-hook.sh\" ]; do PARENT=\"$(dirname \"$ROOT\")\"; [ \"$PARENT\" != \"$ROOT\" ] || exit 0; ROOT=\"$PARENT\"; done; sh \"$ROOT/.codex/hooks/run-story-hook.sh\" stop",
"timeout": 5,
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"$r=$env:CODEX_PROJECT_DIR; if (-not $r) { $r=$env:CLAUDE_PROJECT_DIR }; if (-not $r -or -not (Test-Path -LiteralPath $r -PathType Container)) { $r=(Get-Location).Path }; while ($true) { $launcher=Join-Path $r '.codex\\hooks\\run-story-hook.cmd'; if (Test-Path -LiteralPath $launcher -PathType Leaf) { & $launcher 'stop'; exit $LASTEXITCODE }; $parent=Split-Path -Parent $r; if (-not $parent -or $parent -eq $r) { exit 0 }; $r=$parent }\""
}
]
}
]
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |