-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·48 lines (44 loc) · 1.8 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·48 lines (44 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env sh
# priors installer — one command, any harness.
# The enforcement core is a plain Node script; "installing" just means
# teaching your harness the ritual. This detects what you have and does the
# right thing for each; nothing here is destructive.
set -e
SRC="$(cd "$(dirname "$0")" && pwd)"
KEEPER="$SRC/skills/priors/scripts/priors.mjs"
found=0
if ! command -v node >/dev/null 2>&1; then
echo "priors requires node >= 18, but node was not found." >&2
exit 1
fi
NODE_MAJOR="$(node -p 'Number(process.versions.node.split(".")[0])')"
if [ "$NODE_MAJOR" -lt 18 ]; then
echo "priors requires node >= 18; found $(node --version)." >&2
exit 1
fi
# Claude Code (and anything else reading ~/.claude/skills)
if [ -d "$HOME/.claude" ]; then
mkdir -p "$HOME/.claude/skills" "$HOME/.claude/commands"
cp -R "$SRC/skills/priors" "$HOME/.claude/skills/"
cp "$SRC/commands/with-priors.md" "$HOME/.claude/commands/"
echo "✓ Claude Code — skill 'priors' + /with-priors command installed"
found=1
fi
# OpenClaw (Agent Skills native)
if [ -d "$HOME/.openclaw" ]; then
mkdir -p "$HOME/.openclaw/skills"
cp -R "$SRC/skills/priors" "$HOME/.openclaw/skills/"
echo "✓ OpenClaw — skill 'priors' installed"
found=1
fi
echo ""
echo "For harnesses without a skills directory (the protocol is identical everywhere):"
echo " → Codex: paste adapters/AGENTS-snippet.md into your repo's AGENTS.md"
echo " → Kimi CLI & other Agent-Skills harnesses: point them at $SRC/skills/priors"
echo " → Anything with a shell (Hermes, custom): use adapters/system-prompt.md"
echo ""
echo "Keeper path for adapters: $KEEPER"
if [ "$found" -eq 0 ]; then
echo "No skills directory detected — that's fine: the adapters above are the install."
fi
echo "Runtime verified: $(node --version) (node >= 18 required)."