Skip to content

KamiJeong/tech-bridge-book / .agents/skills/speckit-guards

speckit-guards

Verified

Guard scripts for Codex Spec Kit multi-agent workflow safety and token observability.

FileKindSize
SKILL.mdskill md1.7 KB
scripts/generate-token-report.shexecutablescript5.9 KB
scripts/guard-before-commit.shexecutablescript1.0 KB
scripts/guard-before-implement.shexecutablescript1.3 KB
scripts/guard-before-pr.shexecutablescript1007 B
scripts/guard-no-app-code-change.shexecutablescript737 B
scripts/guard-token-analyzer-available.shexecutablescript1.4 KB
scripts/record-token-step.shexecutablescript4.4 KB
scripts/validate-agent-definitions.shexecutablescript3.7 KB

scripts/guard-before-implement.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

MODE="gated"
RISK="low"
ANALYZE_FILE=""
TEST_STATUS="pass"
ALLOW_MISSING_TOKEN_ANALYZER="false"

while [[ $# -gt 0 ]]; do
  case "$1" in
    --mode) MODE="$2"; shift 2 ;;
    --risk) RISK="$2"; shift 2 ;;
    --analyze-file) ANALYZE_FILE="$2"; shift 2 ;;
    --test-status) TEST_STATUS="$2"; shift 2 ;;
    --allow-missing-token-analyzer) ALLOW_MISSING_TOKEN_ANALYZER="true"; shift ;;
    -h|--help) echo "Usage: $0 [--mode MODE] [--risk low|medium|high|critical] [--analyze-file PATH]"; exit 0 ;;
    *) echo "Unknown argument: $1" >&2; exit 2 ;;
  esac
done

if [[ -n "$ANALYZE_FILE" && -f "$ANALYZE_FILE" ]] && rg -q "CRITICAL" "$ANALYZE_FILE"; then
  echo "FAIL: CRITICAL analyze issue found in $ANALYZE_FILE" >&2
  exit 1
fi

case "$RISK" in
  high|critical) echo "FAIL: ${RISK}-risk slice requires explicit approval before implementation" >&2; exit 1 ;;
esac

if [[ "$TEST_STATUS" != "pass" ]]; then
  echo "FAIL: prerequisite test status is ${TEST_STATUS}" >&2
  exit 1
fi

if [[ "$MODE" == "auto-implement" || "$MODE" == "auto-pr" ]]; then
  args=(--mode "$MODE")
  [[ "$ALLOW_MISSING_TOKEN_ANALYZER" == "true" ]] && args+=(--allow-missing)
  .agents/skills/speckit-guards/scripts/guard-token-analyzer-available.sh "${args[@]}"
fi

echo "PASS: implementation guard checks passed"
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall