.agents/skills/oat-review-provide/SKILL.md
Use when you need an ad-hoc review outside an active OAT project lifecycle. Reviews code or artifacts without project phase state, unlike oat-project-review-provide.
npx skillsauth add tkstang/open-agent-toolkit oat-review-provideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Request and execute a code/file review that is not tied to an OAT project lifecycle.
activeProject entry in .oat/config.local.json or project artifacts.OAT MODE: Ad-Hoc Review
Purpose: Review commit ranges, working-tree diffs, or explicit files and write an optional review artifact even when no project state exists.
BLOCKED Activities:
ALLOWED Activities:
Self-Correction Protocol: If you catch yourself:
state.md, plan.md) for this review → STOP and continue in ad-hoc mode.Recovery:
When executing this skill, provide lightweight progress feedback so the user can tell what’s happening after they confirm.
Print a phase banner once at start using horizontal separators, e.g.:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OAT ▸ PROVIDE AD-HOC REVIEW ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before multi-step work, print step indicators, e.g.:
[1/4] Resolving review scope…[2/4] Gathering files + context…[3/4] Running review analysis…[4/4] Writing review artifact…Parse $ARGUMENTS and resolve one scope mode:
--files <path1,path2,...> → explicit file review (works for old/pre-existing files)unstaged → review current unstaged working tree changesstaged → review staged changes (--cached)base_branch=<branch> → review current branch against merge-base with branch (e.g., base_branch=main)base_sha=<sha> → {sha}..HEAD<sha1>..<sha2> → exact rangeunstaged for in-progress local review.Recommended fallback:
MERGE_BASE=$(git merge-base origin/main HEAD 2>/dev/null || git merge-base main HEAD 2>/dev/null)
SCOPE_RANGE="$MERGE_BASE..HEAD"
Branch-based range example:
BASE_BRANCH="main"
MERGE_BASE=$(git merge-base "origin/$BASE_BRANCH" HEAD 2>/dev/null || git merge-base "$BASE_BRANCH" HEAD 2>/dev/null)
SCOPE_RANGE="$MERGE_BASE..HEAD"
For --files mode:
FILES_CHANGED to explicit filesSCOPE_RANGE="" and COMMITS=""For unstaged mode:
FILES_CHANGED=$(git diff --name-only 2>/dev/null || true)
FILE_COUNT=$(echo "$FILES_CHANGED" | sed '/^$/d' | wc -l | awk '{print $1}')
COMMITS=""
For staged mode:
FILES_CHANGED=$(git diff --cached --name-only 2>/dev/null || true)
FILE_COUNT=$(echo "$FILES_CHANGED" | sed '/^$/d' | wc -l | awk '{print $1}')
COMMITS=""
For commit-range modes:
FILES_CHANGED=$(git diff --name-only "$SCOPE_RANGE" 2>/dev/null || true)
FILE_COUNT=$(echo "$FILES_CHANGED" | sed '/^$/d' | wc -l | awk '{print $1}')
COMMITS=$(git log --oneline "$SCOPE_RANGE" 2>/dev/null || true)
Show the resolved scope and ask for confirmation before review.
If user requested inline review explicitly, skip file output.
Otherwise resolve destination via helper script:
bash .agents/skills/oat-review-provide/scripts/resolve-review-output.sh --mode auto
Policy:
.oat/repo/reviews exists and is not gitignored, assume user wants tracked active artifacts there..oat/projects/local/orphan-reviews.archived/ directory; those are historical locations used after oat-review-receive processes a review.If user asks for tracked .oat/repo/reviews and it is gitignored, warn and ask whether to:
Derive a scope slug from the resolved scope mode so that the filename indicates what was reviewed:
| Scope mode | Slug derivation | Example filename |
| ---------------------- | ------------------------------------ | --------------------------------------------- |
| base_branch=<branch> | Current branch name | ad-hoc-review-2026-02-16-oat-repo.md |
| unstaged | Literal unstaged | ad-hoc-review-2026-02-16-unstaged.md |
| staged | Literal staged | ad-hoc-review-2026-02-16-staged.md |
| --files <paths> | First 2–3 basenames, joined with - | ad-hoc-review-2026-02-16-auth-login.md |
| base_sha=<sha> | Short SHA (7 chars) | ad-hoc-review-2026-02-16-abc1234.md |
| <sha1>..<sha2> | Both short SHAs joined with - | ad-hoc-review-2026-02-16-abc1234-def5678.md |
mkdir -p "$OUTPUT_DIR"
TODAY=$(date +%Y-%m-%d)
# Derive SCOPE_SLUG based on scope mode (examples):
# base_branch → SCOPE_SLUG=$(git branch --show-current | tr '/' '-')
# unstaged → SCOPE_SLUG="unstaged"
# staged → SCOPE_SLUG="staged"
# --files → SCOPE_SLUG from first 2-3 basenames, stripped of extensions, joined with '-'
# sha range → SCOPE_SLUG from short SHAs
# Sanitize: lowercase, replace non-alphanumeric with '-', collapse runs, trim to 40 chars
SCOPE_SLUG=$(echo "$SCOPE_SLUG" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9-]/-/g; s/--*/-/g; s/^-//; s/-$//' | cut -c1-40)
OUT_FILE="$OUTPUT_DIR/ad-hoc-review-${TODAY}-${SCOPE_SLUG}.md"
If the file already exists (same scope reviewed twice in one day), suffix with -v2, -v3, etc.
Use the same severity model and checklist as project reviews:
Template source of truth:
.agents/skills/oat-review-provide/references/review-artifact-template.mdOUT_FILE.If artifact is in tracked storage (e.g., .oat/repo/reviews), ask whether to commit bookkeeping.
Suggested commit (when approved):
git add "{artifact-path}"
git commit -m "chore(oat): record ad-hoc review artifact"
For local-active or inline modes, do not commit unless user explicitly requests.
Report (required):
Review artifact: {absolute-or-repo-relative path} (or explicitly inline-only)--files, unstaged, staged, or commit range).documentation
Use when OAT implementation changes and repository reference docs must be synchronized. Updates .oat/repo/reference to match current behavior.
business
Merge multiple analysis artifacts into a single coherent report with provenance tracking. Reads existing artifacts from /deep-research, /analyze, and /compare.
testing
Use when the user questions or suspects an agent claim is wrong. Adversarially gathers evidence to verify or refute the claim using the best sources available in the current environment.
tools
Use when prioritizing backlog work or evaluating a roadmap. Produces value-effort ratings, dependency mapping, and execution recommendations.