From neohive
Use when the user says "make NeoHive smarter", "rewrite my prompts before searching memory", "enable smart recall", "give me a smarter hook", or during `/neohive:getting-started` Phase 4. Generates a tailored UserPromptSubmit hook that uses a small model (Haiku by default) to rewrite the user's prompt into a good `memory_recall` query, decides when lookup is worthwhile, calls NeoHive, and injects only the most relevant results. Replaces the default plugin hook which passes prompts verbatim.
How this skill is triggered — by the user, by Claude, or both
Slash command
/neohive:enable-smart-promptsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You help the user install a customized `UserPromptSubmit` hook that intercepts their prompt, uses a small model to formulate a good NeoHive query, calls `memory_recall`, and injects relevant results back into Claude's context.
You help the user install a customized UserPromptSubmit hook that intercepts their prompt, uses a small model to formulate a good NeoHive query, calls memory_recall, and injects relevant results back into Claude's context.
This is a dynamic setup — every user has a different hive layout, shell, API key location, and tolerance for latency. You walk them through each choice with a strong recommended default, then write the script.
Before asking anything, verify:
command -v claude >/dev/null && echo "claude-cli: OK" || echo "claude-cli: MISSING"
command -v curl >/dev/null && echo "curl: OK" || echo "curl: MISSING"
command -v python3>/dev/null && echo "python3: OK" || echo "python3: MISSING"
[ -n "${ANTHROPIC_API_KEY:-}" ] && echo "ANTHROPIC_API_KEY: set" || echo "ANTHROPIC_API_KEY: not set (required for headless claude)"
If claude-cli or python3 is missing, stop and tell the user to install them. If the API key is missing, tell them to export it first and point at https://console.anthropic.com/.
Ask these in sequence, one per AskUserQuestion call (never combine):
Call list_hives. Ask:
list_hives, first option (Recommended) All hives (cross-hive RRF) — this calls memory_recall without a hive param.claude-haiku-4-5 (Recommended) — fast + cheapclaude-sonnet-4-6 — more accurate, slower, ~10x costclaude-opus-4-7 — overkill, only for very noisy hives(Recommended) Every prompt longer than 10 chars — skips short clarificationsOnly when prompt contains a keyword I pickEvery prompt — no filteringManual only — I'll trigger it via an env flagIf "keyword": ask for the keyword(s) via a follow-up AskUserQuestion with Other.
(Recommended) ~/.claude/hooks/neohive-smart-recall.sh — personal, all projects./.claude/hooks/neohive-smart-recall.sh — this project onlyJust show me the script — I'll place it myself(Recommended) NEOHIVE_SMART_DISABLEDNEOHIVE_HOOK_DISABLED (same flag as the default dumb hook — one switch turns both off)Custom — I'll type itBuild the script from the template at ${CLAUDE_PLUGIN_ROOT}/skills/enable-smart-prompts/template.sh, substituting the chosen values. Show the final script to the user in a fenced code block. Summarize changes at the top:
Generated hook with:
• Hive: <hive-or-all>
• Model: <model>
• Trigger: <policy>
• Install path: <path>
• Disable flag: <env-var>
Ask one last AskUserQuestion:
(Recommended) Yes, write it and register it in settings.jsonYes, write it — I'll register it myselfNo — I want to tweak the script firstIf "tweak": ask what they want to change, regenerate, re-preview. If "no" at any point: stop with "Nothing written."
Create parent directories if needed. Write the script to the chosen location with mode 0755. Show:
Wrote <path> (N bytes, mode 755).
Edit ~/.claude/settings.json (personal) or ./.claude/settings.json (project) to add the hook under hooks.UserPromptSubmit. Preserve existing entries. If the file has an existing NeoHive UserPromptSubmit entry from the plugin itself, do not remove it — the two can coexist; warn the user that both will run.
Use python3 -c with json to do the edit — never hand-edit JSON via sed. Pattern:
python3 <<PY
import json, pathlib, os
p = pathlib.Path(os.path.expanduser("<settings-path>"))
data = json.loads(p.read_text()) if p.exists() else {}
data.setdefault("hooks", {}).setdefault("UserPromptSubmit", [])
entry = {
"matcher": "",
"hooks": [{"type": "command", "command": "<hook-path>", "timeout": 15000}]
}
if entry not in data["hooks"]["UserPromptSubmit"]:
data["hooks"]["UserPromptSubmit"].append(entry)
p.parent.mkdir(parents=True, exist_ok=True)
p.write_text(json.dumps(data, indent=2))
print(f"Registered: {p}")
PY
Tell the user:
Restart Claude (or run
/reload-plugins) for the hook to take effect.Test it: start a new session and ask about something you know is in your hive. You should see a block starting with "NeoHive smart context:" before Claude's reply.
Disable temporarily:
export <DISABLE_FLAG>=1in your shell. Disable permanently: remove the entry from your settings.json, or delete the script.
$ANTHROPIC_API_KEY at runtime..mcp.json / ~/.claude.json).--max-time on every curl and claude -p call. A slow hook blocks every prompt.npx claudepluginhub neohiveai/neohiveclaude --plugin neohiveGuides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Applies curated color/font themes to slides, docs, and HTML artifacts. Includes 10 preset themes and can generate custom themes on demand.
Guides users through a structured three-stage workflow for co-authoring documentation: context gathering, iterative refinement, and reader testing.