zenstory-ai/oh-story-claudecode / 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/templates/hooks/run-story-hook.sh
View on GitHub#!/usr/bin/env bash
# Project-local Claude Code hook launcher (pure ASCII for GBK/non-UTF-8 locale safety).
# Routes all 8 Claude Code hook events to story_hook_cli.js (backed by story_hook_core.js).
set -euo pipefail
EVENT="${1:-}"
case "$EVENT" in
session-start|detect-story-gaps|session-end|pre-compact|post-compact|pre-tool-prose-guard|pre-tool-commit-advisory|post-tool-prose-check) ;;
*) exit 2 ;;
esac
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
CLI="$SCRIPT_DIR/story_hook_cli.js"
if ! node -e "" >/dev/null 2>&1; then
if [ "$EVENT" = "session-start" ]; then
printf '%s\n' "[WARN] Node.js 18+ not found on PATH: oh-story hooks are disabled. Install Node.js 18+ (https://nodejs.org) and open a new session."
elif [ "$EVENT" = "pre-tool-prose-guard" ]; then
printf '%s\n' "[WARN] Node.js 18+ not found on PATH: prose guard failed open; install Node.js 18+ and open a new session." >&2
fi
exit 0
fi
if [ ! -f "$CLI" ] || [ ! -f "$SCRIPT_DIR/story_hook_core.js" ]; then
if [ "$EVENT" = "session-start" ]; then
printf '%s\n' "[WARN] oh-story hook runtime missing (story_hook_cli.js / story_hook_core.js). Re-run /story-setup to restore .claude/hooks/."
fi
exit 0
fi
exec node "$CLI" "$EVENT"
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: 323k | 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: 323k | 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: 323k | Updated | Claude CodeCodex | Verified | Install |