Skip to content

ericrisco/rsc-harness / skills/building-agents

building-agents

Unverified

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is `postgresdb`) or service deployment (that is `deployment`).

FileKindSize
SKILL.mdskill md19.4 KB
evals/README.mdmarkdown2.9 KB
evals/cases.yamlconfig6.3 KB
references/agent-loops-and-harness.mdmarkdown14.4 KB
references/evals-and-observability.mdmarkdown15.6 KB
references/mcp-servers.mdmarkdown11.6 KB
references/provider-abstraction.mdmarkdown20.8 KB
references/tools-and-rag.mdmarkdown15.6 KB
scripts/verify.shexecutablescript4.6 KB

scripts/verify.sh

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

# Usage: bash scripts/verify.sh
# Lints example agent code and dry-runs the eval smoke test in THIS project.
# Detects each tool; missing tools print a yellow WARN and are skipped (not failures).
# Exit 0 = all present checks passed (or only skips). Non-zero = a real failure.
# Read-only: never writes files, never installs anything (npx uses --no-install).
#
# Portable to stock macOS bash 3.2: no `mapfile`, no `pipefail` reliance, and every
# array expansion is guarded so it is safe under `set -u` even when empty.

if [ -t 1 ] && command -v tput >/dev/null 2>&1 && [ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]; then
  YELLOW="$(tput setaf 3)"; RED="$(tput setaf 1)"; GREEN="$(tput setaf 2)"; RESET="$(tput sgr0)"
else
  YELLOW=""; RED=""; GREEN=""; RESET=""
fi

rc=0
warn() { printf '%s[WARN]%s %s\n' "$YELLOW" "$RESET" "$1" >&2; }
info() { printf '[INFO] %s\n' "$1"; }
fail() { printf '%s[FAIL]%s %s\n' "$RED" "$RESET" "$1" >&2; rc=1; }
have() { command -v "$1" >/dev/null 2>&1; }

# Directories likely to hold example code; fall back to "." with vendored dirs pruned.
# Result is returned newline-delimited so callers read it without arrays (bash 3.2 safe).
PRUNE='-path ./node_modules -o -path ./.venv -o -path ./venv -o -path ./dist -o -path ./build -o -path ./.git'
pick_dirs() {
  found=""
  for d in examples agents src; do
    [ -d "$d" ] && found="${found}${d}
"
  done
  if [ -n "$found" ]; then printf '%s' "$found"; else printf '%s\n' "."; fi
}

# Populate the PYDIRS array portably (no `mapfile`; works on bash 3.2).
PYDIRS=()
while IFS= read -r _d; do
  [ -n "$_d" ] && PYDIRS+=("$_d")
done <<EOF
$(pick_dirs)
EOF
[ "${#PYDIRS[@]}" -gt 0 ] || PYDIRS=(".")   # never expand an empty array under set -u

# 1. Python lint (ruff)
if have ruff; then
  if find "${PYDIRS[@]}" \( $PRUNE \) -prune -o -name '*.py' -print 2>/dev/null | grep -q .; then
    info "ruff: linting ${PYDIRS[*]}"
    if ! ruff check "${PYDIRS[@]}"; then fail "ruff reported lint errors"; fi
  else
    info "ruff present but no .py files found; skipping"
  fi
else
  warn "ruff not found; skipping Python lint"
fi

# 2. Python typecheck (mypy) — soft: only if config present
if have mypy && { [ -f mypy.ini ] || [ -f setup.cfg ] || grep -qs '\[tool.mypy\]' pyproject.toml 2>/dev/null; }; then
  info "mypy: typechecking ${PYDIRS[*]}"
  if ! mypy "${PYDIRS[@]}"; then fail "mypy reported type errors"; fi
elif have mypy; then
  warn "mypy present but no config (mypy.ini/setup.cfg/[tool.mypy]); skipping typecheck"
else
  warn "mypy not found; skipping Python typecheck"
fi

# 3. TS/JS check
if [ -f tsconfig.json ] && have npx; then
  info "tsc: typechecking (no emit)"
  if ! npx --no-install tsc --noEmit; then fail "tsc reported type errors"; fi
elif have node && find . \( $PRUNE \) -prune -o \( -name '*.mjs' -o -name '*.js' \) -print 2>/dev/null | grep -q .; then
  info "node --check: syntax-checking JS/MJS examples"
  while IFS= read -r f; do
    [ -n "$f" ] || continue
    node --check "$f" || fail "node --check failed: $f"
  done < <(find . \( $PRUNE \) -prune -o \( -name '*.mjs' -o -name '*.js' \) -print)
else
  warn "no tsconfig.json + npx and no node/JS examples; skipping TS/JS check"
fi

# 4. Go vet (only if module present)
if [ -f go.mod ]; then
  if have go; then
    info "go vet ./..."
    if ! go vet ./...; then fail "go vet reported issues"; fi
  else
    warn "go.mod present but go not found; skipping go vet"
  fi
fi

# 5. Eval smoke dry-run (must not hit live APIs)
EVAL_ENTRY=""
for cand in evals/run.py evals/smoke.py scripts/eval_smoke.py; do
  [ -f "$cand" ] && { EVAL_ENTRY="$cand"; break; }
done
if [ -n "$EVAL_ENTRY" ] && have python; then
  info "eval smoke (dry-run): $EVAL_ENTRY"
  if ! EVAL_DRY_RUN=1 python "$EVAL_ENTRY" --dry-run; then fail "eval smoke dry-run failed"; fi
elif [ -f package.json ] && have npm && grep -qs '"eval"' package.json; then
  info "eval smoke (dry-run): npm run eval -- --dry-run"
  if ! EVAL_DRY_RUN=1 npm run eval -- --dry-run; then fail "eval smoke dry-run failed"; fi
else
  warn "no eval smoke entrypoint (evals/run.py|smoke.py|scripts/eval_smoke.py|package.json eval); skipping"
fi

# 6. Markdown lint (soft — advisory, never fails the gate)
if have markdownlint-cli2; then
  markdownlint-cli2 '**/*.md' >/dev/null 2>&1 || warn "markdownlint-cli2 reported style issues (advisory)"
elif have markdownlint; then
  markdownlint '**/*.md' >/dev/null 2>&1 || warn "markdownlint reported style issues (advisory)"
else
  warn "markdownlint not found; skipping markdown lint (advisory)"
fi

if [ "$rc" -ne 0 ]; then
  printf '%sverify.sh: FAILED%s\n' "$RED" "$RESET" >&2
  exit "$rc"
fi
printf '%sverify.sh: OK%s\n' "$GREEN" "$RESET"
exit 0
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall