.agents/skills/local-code-review/SKILL.md
Runs a local code review workflow for the Skill System Foundry repository — executes tests, coverage checks, skill validation, and shellcheck, then analyzes the diff for pattern violations and produces a structured verdict. Triggers when asked to check code locally, run a local review, verify changes pass all checks, or catch issues before CI. Also triggers on phrases like "check this before I push," "does this look right," "run the checks," or "review the current branch locally." Use this skill to catch issues locally and avoid spending CI tokens and time on problems that can be detected on the development machine. For a deep review replicating the CI code review pipeline with confidence scoring and structured findings, use the local-ci-code-review skill instead. For design-level criticism and constructive feedback, use the critique skill instead. For human PR review process guidance, use the review skill instead.
npx skillsauth add milanhorvatovic/skill-system-foundry local-code-reviewInstall 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.
Runs a structured, opinionated local code review of changes in the Skill System Foundry repository. When activated, follow this workflow end to end.
Determine the scope of what to review:
# Uncommitted changes (working tree + staged)
git diff HEAD
# Changes on current branch vs main
git diff main...HEAD
# Specific PR (if a PR number or branch is provided)
git diff main...<branch>
List the changed files and categorize them:
| Category | File Pattern | Review Focus |
|---|---|---|
| Python entry points | scripts/*.py | Thin wrapper, delegates to lib, argparse, --json |
| Python library | scripts/lib/*.py | Domain logic, (errors, passes) pattern, no print/exit |
| Tests | tests/test_*.py | Coverage of new branches, descriptive names, boundary cases |
| SKILL.md / capability.md | **/SKILL.md, **/capability.md | Description quality, progressive disclosure |
| Reference docs | references/*.md | Conciseness, one-level-deep cross-refs, ToC if 100+ lines |
| Templates | assets/*.md | Placeholder markers preserved |
| Configuration | scripts/lib/configuration.yaml | Key naming, inline comments, structure |
| Shell scripts | .github/scripts/*.sh | strict mode, env validation |
| Workflows | .github/workflows/*.yaml | SHA-pinned actions, permission isolation |
| Other Markdown | README.md, CONTRIBUTING.md | Accuracy, consistency with SKILL.md |
Run these and capture the output. Any failures here must be reported as High severity — do not proceed to the AI-judgment phase until these are understood:
# Tests + coverage
python -m coverage run -m unittest discover -s tests -p "test_*.py" -v
python -m coverage report
# Skill validation
cd skill-system-foundry
python scripts/validate_skill.py . --allow-nested-references --json
python scripts/audit_skill_system.py . --json
cd ..
# Shell lint (only if .sh files changed)
shellcheck .github/scripts/*.sh
Report automated results as a summary. Do not re-flag individual issues that these tools already caught — the tools are authoritative. Example:
Automated checks: Tests pass (14 files, 342 tests). Coverage 78% (threshold 70%). Skill validation clean. ShellCheck clean.
Or if something fails:
Automated checks: Tests pass. Coverage 78%. Skill validation: 1 FAIL —
descriptionexceeds 1024 characters. Fix this before merge.
Now review the diff for issues that no script can catch. This is the core of the review. Check only the categories relevant to the changed files.
Check for logic errors:
ExceptionCheck for pattern violations:
(errors, passes)print() or sys.exit() in library code outside reporting.pyconfiguration.yamlpathlib usage (this repo uses os.path exclusively)encoding="utf-8" on open() callsLEVEL_FAIL/LEVEL_WARN/LEVEL_INFOCheck for missing test coverage:
Check description quality (SKILL.md and capability.md only):
Check progressive disclosure:
references/?Check for consistency:
Check for missing safeguards:
${VAR:?} validation at script toptrap cleanup for temporary files> instead of >> for $GITHUB_OUTPUTCheck permission boundaries:
Check configuration.yaml:
snake_case convention?_pattern?constants.py update present? (New YAML keys need int() conversion and cleanup with del)Check actions:
Structure the output as follows. Be direct and concise — every finding must be actionable.
Severity levels:
Output format:
Start with the automated check summary, then list findings:
## Automated Checks
Tests: ✓ (14 files, 342 tests)
Coverage: ✓ 78% (threshold 70%)
Skill validation: ✓
ShellCheck: ✓ (or N/A if no .sh changes)
## Findings
### High
(list or "None")
### Medium
(list or "None")
### Low
(list or "None")
## Verdict
(Approve / Request changes — with one-sentence rationale)
For each finding, use this format:
[file:line] Brief title Description of the problem and concrete fix guidance.
Rules:
Based on the findings, give a clear verdict:
State the verdict with a one-sentence rationale. Do not hedge.
tools
Greets a recipient through one of two registered tones — formal or casual — by dispatching to a dedicated capability. Activates when the conversation asks for a tone-specific welcome or a switch between formal and casual greetings; use when comparing the two styles. Demonstrates the router pattern in the Skill System Foundry — a thin SKILL.md entry point routing to capability files, with allowed-tools declared in frontmatter so capability shell fences pass validation.
testing
Greets a single recipient with a friendly welcome message rendered in a formal or casual tone. Activates when the conversation asks to say hello or welcome someone; use when a minimal standalone skill is needed. Demonstrates the smallest valid standalone skill in the Skill System Foundry — required name and description frontmatter plus an optional metadata block — and how its layout passes validation.
testing
Designs and evolves AI-agnostic skill systems. Triggers on skill/capability creation, role definition, or router migration; use when auditing consistency or improving token efficiency.
development
Governs the configuration.yaml file that serves as the single source of truth for all validation rules in the Skill System Foundry. Triggers when adding, modifying, or reviewing validation rules, limits, patterns, or reserved words. Also triggers when working with constants.py, yaml_parser.py, or any code that reads from configuration.yaml. Use this skill when asked to add a new validation check, change a limit or threshold, update reserved word lists, add SPDX license identifiers, modify regex patterns, or troubleshoot why a validation rule is not working as expected. Activates on mentions of configuration, validation rules, constants, thresholds, or pattern definitions.