Add security-audit skill install and restore paid Go crew dispatch
Install cloudflare/security-audit through the Skills CLI with Homebrew npx so the multi-file skill stays upstream-identical. The universal target ~/.agents/skills is read by OpenCode, Codex, Pi, and Grok; the CLI also links it into ~/.claude/skills for Claude Code. Skip when installed, warn instead of failing when GitHub is unreachable, and never target the read-only ~/.config/opencode/skills store link. Return crew dispatch to opencode-go/deepseek-v4.1-flash in both the UI rule and the default, per the captain's 2026-10-21 order, and correct the AGENTS.md routing note. Stop opencode2's activation from calling exit 0: activation blocks are inlined into one flat script, so it silently skipped every later block (securityAuditSkill, setupLaunchAgents, syncMusic).
This commit is contained in:
1 parent
b37ee69be1
commit
1a3c38406a
4 files changed
+78
-14
No files matched your search
@@ -317,19 +317,20 @@ in
|
||||
|
||||
# OpenCode 2 is not on Homebrew (beta). Install via Homebrew's npm, never
|
||||
# Nix's npm (EACCES on the store). Skip when already present so a rebuild
|
||||
# does not pull a new beta under a live TUI.
|
||||
# does not pull a new beta under a live TUI. Activation blocks are inlined
|
||||
# into one flat script, so never `exit 0` here: that would skip every later
|
||||
# block (securityAuditSkill, setupLaunchAgents, syncMusic).
|
||||
home.activation.opencode2 = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
npm=/opt/homebrew/bin/npm
|
||||
bin=/opt/homebrew/bin/opencode2
|
||||
if [ -x "$bin" ]; then
|
||||
exit 0
|
||||
if [ ! -x "$bin" ]; then
|
||||
if [ ! -x "$npm" ]; then
|
||||
echo "opencode2: /opt/homebrew/bin/npm missing (declare node in homebrew.brews)" >&2
|
||||
exit 1
|
||||
fi
|
||||
"$npm" install -g --allow-scripts=@opencode-ai/cli @opencode-ai/cli@beta
|
||||
fi
|
||||
if [ ! -x "$npm" ]; then
|
||||
echo "opencode2: /opt/homebrew/bin/npm missing (declare node in homebrew.brews)" >&2
|
||||
exit 1
|
||||
fi
|
||||
"$npm" install -g --allow-scripts=@opencode-ai/cli @opencode-ai/cli@beta
|
||||
'';
|
||||
|
||||
# backpass (kunchenguid/backpass) - gradient descent for agent memory: reads
|
||||
@@ -402,6 +403,47 @@ in
|
||||
"$bin" daemon restart >/dev/null 2>&1 || "$bin" daemon start >/dev/null 2>&1 || true
|
||||
'';
|
||||
|
||||
# cloudflare/security-audit - vulnerability-hunting skill for the coding agents.
|
||||
# Installed by the upstream Skills CLI through Homebrew's npx, because the skill
|
||||
# is a multi-file bundle and an upstream refresh must stay byte-identical.
|
||||
# Scope: the CLI's "universal" target is ~/.agents/skills, which OpenCode, Codex,
|
||||
# Pi, and Grok all read as a user-level skill directory; Claude Code reads
|
||||
# ~/.claude/skills, so the CLI also links the skill there. Never target
|
||||
# ~/.config/opencode/skills: home-manager owns it and points it into the
|
||||
# read-only Nix store. Skip when installed, like opencode2/backpass, so a rebuild
|
||||
# never pulls a new skill version mid-session. Refresh manually with
|
||||
# /opt/homebrew/bin/npx --yes skills update security-audit --global --yes
|
||||
# The skill's own README still requires an OS-enforced sandbox before it may run
|
||||
# target-controlled builds, tests, browsers, or fuzzers; this machine has none,
|
||||
# so those leads stay `needs_validation`. See readme.md.
|
||||
home.activation.securityAuditSkill = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
# Activation PATH lacks /opt/homebrew/bin, so npx's `#!/usr/bin/env node`
|
||||
# shebang fails. Prepend only - replacing PATH breaks the rest of the HM
|
||||
# activation (nix-env, gettext).
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
npx=/opt/homebrew/bin/npx
|
||||
# Canonical copy plus the Claude Code link: rerun when either is missing so a
|
||||
# half-removed install heals, then skip while both exist. No `exit 0` here:
|
||||
# activation blocks are inlined into one flat script, and later blocks must
|
||||
# still run.
|
||||
if [ ! -f "$HOME/.agents/skills/security-audit/SKILL.md" ] \
|
||||
|| [ ! -e "$HOME/.claude/skills/security-audit" ]; then
|
||||
if [ ! -x "$npx" ]; then
|
||||
echo "securityAuditSkill: /opt/homebrew/bin/npx missing (declare node in homebrew.brews)" >&2
|
||||
exit 1
|
||||
fi
|
||||
# A rebuild must not fail when GitHub or npm is unreachable: the skill is an
|
||||
# enhancement, so warn and keep the rest of the switch going.
|
||||
if ! "$npx" --yes skills add https://github.com/cloudflare/security-audit-skill \
|
||||
--skill security-audit --global \
|
||||
--agent claude-code codex pi opencode --yes; then
|
||||
echo "securityAuditSkill: WARNING: skill install failed (network or Skills CLI unavailable); rebuild continues." >&2
|
||||
echo "securityAuditSkill: rerun ./rebuild.sh or install manually with the command in readme.md." >&2
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
# OpenSuperWhisper - local voice-first prompting (cask in configuration.nix).
|
||||
# The app reads its model from its own Application Support directory, so the
|
||||
# 1.6 GB Whisper model is downloaded here once and kept outside the Nix store.
|
||||
|
||||
Reference in new issue
Block a user