.claude/skills/scout/SKILL.md
Scout Rule — identify the top 3 highest-impact improvement opportunities in files you're already touching. Analyzes entire file content, not just changed lines. Focuses on pre-existing code quality, not PR bugs. Use when preparing a PR, during code review, or after completing a feature.
npx skillsauth add dirien/yet-another-agent-harness scoutInstall 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.
"Leave the code better than you found it."
Identify the top 3 highest-impact, lowest-risk improvement opportunities in files touched by a diff. Reads entire file content, not just changed lines. Focuses on pre-existing code quality — things the next developer will thank you for fixing.
git --version 2>/dev/null && git rev-parse --is-inside-work-tree 2>/dev/null
If git is not installed or the working directory is not a git
repository, stop and report the issue. Do not proceed.
Determine which files to analyze based on input.
# Detect base branch
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
| sed 's@^refs/remotes/origin/@@' || echo "main")
# Combine committed + uncommitted + staged changes vs base
{ git diff --name-only ${BASE_BRANCH}...HEAD 2>/dev/null; \
git diff --name-only; \
git diff --name-only --cached; } | sort -u
If all sources return empty, report that there are no changed files to analyze.
If the user specifies a target branch to analyze, detect the base branch the same way as the default mode, then diff:
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null \
| sed 's@^refs/remotes/origin/@@' || echo "main")
git diff --name-only ${BASE_BRANCH}...${BRANCH}
If given an explicit list of file paths rather than a branch name, use those directly without running git diff.
Read the full content of each changed file, not just diff hunks. Look for improvements in the entire file.
Do not:
dead-codeUnused functions, variables, imports, or types. Commented-out code blocks. Unreachable branches. Stale TODO/FIXME comments referencing completed work.
namingMisleading names that don't match current behavior (code evolved,
name didn't). Inconsistent patterns within the same file (e.g.,
getUserID vs fetchUserId). Single-letter variables in
non-trivial scope (beyond simple loop counters). Abbreviations
that hurt readability when the full word is short.
magic-valuesHardcoded numbers or strings that should be named constants. Repeated literal values that represent the same concept. Timeout/limit values embedded in logic without explanation.
deprecated-patternsOld APIs when newer alternatives exist in the same codebase. Patterns that the project has moved away from (check other recent files for the modern approach). Legacy error handling when the project now uses a different convention.
simplificationOverly complex logic that can be expressed more directly. Unnecessary indirection (wrapper functions that add no value). Redundant nil/error checks where the invariant is already guaranteed. Nested conditionals that can be flattened with early returns.
Score each opportunity on two dimensions (1-5 each):
Composite score = Impact × Low-Risk. Return only the top 3.
Present a summary table followed by per-suggestion details:
| # | File:Line | Category | Description | Effort | Score | | - | --------- | -------- | ----------- | ------ | ----- | | 1 | location | category | description | effort | I×R=S | | 2 | location | category | description | effort | I×R=S | | 3 | location | category | description | effort | I×R=S |
For each suggestion, include:
If no improvement opportunities are found, report:
No significant improvement opportunities found. The touched files are in good shape.
tools
Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety with tRPC.
development
Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.
development
Systematic technical debt analysis across architecture, testing, documentation, and infrastructure. Investigates the codebase, scores findings by impact and effort, and generates a prioritized TECH_DEBT.md remediation plan. Delegates to specialized skills for code quality (scout) and linting (lint-fix). Use when assessing overall project health, planning cleanup sprints, or onboarding to an unfamiliar codebase.
testing
Install and configure Tailscale across platforms. Detects OS, distro, and environment (including WSL2 and containers). Verifies existing installations, performs platform-appropriate install, and guides initial connection. Use when setting up Tailscale on a new machine, onboarding a server to a tailnet, or verifying an existing install.