sno-ai/sno-station-skills / skills/J-peer-review-and-audit/peer-review/skill
peer-review
VerifiedAdversarial review and fix loop for code, specs, plans, and migration manifests.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 32.7 KB |
| agents/openai.yaml | config | 216 B |
| assets/adversarial-plan-review.prompt.md | markdown | 11.0 KB |
| assets/adversarial-review.prompt.md | markdown | 12.0 KB |
| assets/adversarial-test-review.prompt.md | markdown | 3.5 KB |
| references/code-layers.md | markdown | 5.4 KB |
| references/doc-layers.md | markdown | 5.5 KB |
| references/python-advanced-patterns.md | markdown | 7.8 KB |
| references/python-standards.md | markdown | 8.3 KB |
| references/ts-standards.md | markdown | 7.1 KB |
| scripts/lib/sno-model.sh | script | 1.5 KB |
| scripts/review-backfill.shexecutable | script | 4.7 KB |
| scripts/review-findings.shexecutable | script | 11.7 KB |
| scripts/review-receipt.shexecutable | script | 5.3 KB |
| scripts/run-adversarial-review.shexecutable | script | 57.6 KB |
| scripts/selftest/cursor-process-group.t | other | 2.0 KB |
| scripts/selftest/run-cross-vendor.sh | script | 14.5 KB |
| scripts/selftest/run-model-settings.shexecutable | script | 5.1 KB |
| scripts/selftest/run-selftest.shexecutable | script | 39.2 KB |
scripts/selftest/run-model-settings.sh
View on GitHub#!/usr/bin/env bash
# Check the existing CLI boundary, without importing the settings implementation.
set -Eeuo pipefail
here="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
review="${REVIEW:-$here/../run-adversarial-review.sh}"
root="$(mktemp -d)"
trap 'rm -r -- "$root"' EXIT
mkdir -p "$root/bin" "$root/tmp" "$root/config with spaces/sno" "$root/absent"
cat >"$root/bin/sno" <<'STUB'
#!/usr/bin/env bash
[[ "${1:-}" == subscription-quota-check ]] || exit 0
if [[ "$*" == *'--from codex'* ]]; then
printf '%s\n' '{"ok":true,"from":{"vendor":"openai"},"candidates":[{"agent":"claude-code","vendor":"anthropic"}]}'
else
printf '%s\n' '{"ok":true,"from":{"vendor":"anthropic"},"candidates":[{"agent":"codex","vendor":"openai"}]}'
fi
STUB
chmod +x "$root/bin/sno"
printf 'export const value = 1;\n' >"$root/target.ts"
cat >"$root/bin/codex" <<'STUB'
#!/usr/bin/env bash
set -Eeuo pipefail
[[ "${1:-}" == login ]] && exit 0 # the wrapper's logged-in probe
printf '%s\n' "$@" >"$CAPTURE_ARGS"
while [[ $# -gt 0 ]]; do
if [[ "$1" == --output-last-message ]]; then
printf 'Verdict: approve\n' >"$2"
shift
fi
shift
done
cat >/dev/null
STUB
chmod +x "$root/bin/codex"
failures=0
for state in configured absent empty missing; do
config="$root/config with spaces"
case "$state" in
configured) printf '[other]\nreviewer = "wrong-section"\n[models] # roles\n coder = "coder-fixture"\n reviewer = "review-fixture" # selected\n eval = "eval-fixture"\n' >"$config/sno/models.toml" ;;
absent) config="$root/absent" ;;
empty) printf '[models]\nreviewer = ""\n' >"$config/sno/models.toml" ;;
missing) printf "[models]\neval = 'eval-fixture'\n[other]\nreviewer = 'wrong-section'\n" >"$config/sno/models.toml" ;;
esac
env -u CODEX_EFFORT REVIEW_CALLER=claude-code PATH="$root/bin:$PATH" TMPDIR="$root/tmp" \
XDG_CONFIG_HOME="$config" CODEX_MODEL=ignored-env-model \
CAPTURE_ARGS="$root/args" STATS_FILE="$root/$state.jsonl" \
FINDINGS_FILE="$root/findings.jsonl" REVIEW_ARCHIVE_DIR="$root/archive" \
MAX_RETRIES=0 POLL_SECS=1 \
timeout 15 bash "$review" "$root/target.ts" >"$root/out" 2>"$root/err"
if python3 - "$root/args" "$state" <<'PY'
import pathlib
import sys
args = pathlib.Path(sys.argv[1]).read_text().splitlines()
flags = [arg for arg in args if arg in ('--model', '-m') or arg.startswith(('--model=', '-m='))]
if sys.argv[2] == 'configured':
assert flags == ['--model'], args
assert args[args.index('--model') + 1] == 'review-fixture', args
else:
assert flags == [], args
assert 'ignored-env-model' not in args, args
assert 'model_reasoning_effort=high' in args, args
PY
then
printf 'PASS reviewer model settings: %s\n' "$state"
else
printf 'FAIL reviewer model settings: %s\n' "$state" >&2
failures=1
fi
done
cat >"$root/bin/claude" <<'STUB'
#!/usr/bin/env bash
[[ "${1:-}" == auth ]] && exit 0 # the wrapper's logged-in probe
printf '%s\n' "$@" >"$CAPTURE_ARGS"
cat >/dev/null
case "$CLAUDE_TEST_RESULT" in
ok) printf 'Verdict: needs-attention\n\n- [high] Wrong total (target.ts:1)\n' ;;
empty) exit 0 ;;
fail) printf 'provider unavailable\n' >&2; exit 3 ;;
esac
STUB
chmod +x "$root/bin/claude"
mkdir -p "$root/claude-config/sno"
for result in ok empty fail; do
status=0
config="$root/claude-config"
case "$result" in
ok) printf '[models]\nreviewer = "codex-fixture"\nreviewer_claude = "review-model-x"\n' >"$config/sno/models.toml" ;;
empty) printf '[models]\nreviewer_claude = ""\n' >"$config/sno/models.toml" ;;
fail) config="$root/absent" ;;
esac
env REVIEW_CALLER=codex CLAUDECODE=1 CODEX_THREAD_ID=inherited \
PATH="$root/bin:$PATH" TMPDIR="$root/tmp" XDG_CONFIG_HOME="$config" \
CLAUDE_TEST_RESULT="$result" CAPTURE_ARGS="$root/args" \
STATS_FILE="$root/claude-$result.jsonl" FINDINGS_FILE="$root/findings.jsonl" \
REVIEW_OUTPUT_FILE="$root/report.md" MAX_RETRIES=0 POLL_SECS=1 \
timeout 15 bash "$review" "$root/target.ts" >"$root/out" 2>"$root/err" || status=$?
if python3 - "$root" "$result" "$status" <<'PY'
import json
import pathlib
import sys
root = pathlib.Path(sys.argv[1])
result = sys.argv[2]
args = (root / 'args').read_text().splitlines()
if result == 'ok':
assert args[args.index('--model') + 1] == 'review-model-x', args
else:
assert '--model' not in args, args
assert args[args.index('--effort') + 1] == 'medium', args
assert args[args.index('--tools') + 1] == '', args
rows = [json.loads(line) for line in (root / f'claude-{result}.jsonl').read_text().splitlines()]
end = next(row for row in rows if row['event'] == 'end')
if result == 'ok':
assert sys.argv[3] == '0', sys.argv
assert end['outcome'] == 'success', end
assert 'Wrong total' in (root / 'report.md').read_text()
else:
assert sys.argv[3] == '2', sys.argv
assert end['outcome'] == 'failed', end
assert end['failure'] == ('empty' if result == 'empty' else 'exit:3'), end
PY
then printf 'PASS Claude review: %s\n' "$result"
else failures=1
fi
done
exit "$failures"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |