home / skills / fusengine / agents / sniper-check

This skill validates code quality quickly by running an isolated sniper-check workflow and returning a final report with zero main-context pollution.

npx playbooks add skill fusengine/agents --skill sniper-check

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.1 KB
---
name: sniper-check
description: Use when validating code quality after modifications. Runs sniper agent in isolated forked context for clean, fast validation.
context: fork
agent: fuse-ai-pilot:sniper
user-invocable: true
argument-hint: "[file-or-directory]"
---

**Target:** $ARGUMENTS

# Sniper Check

## Overview

Quick code quality validation using the sniper agent in an isolated forked context. Executes the full 6-phase workflow without polluting the main conversation context.

| Feature | Detail |
|---------|--------|
| **Context** | Forked (isolated sub-agent) |
| **Agent** | sniper (Sonnet) |
| **Phases** | 6-phase code-quality workflow |
| **Result** | Only final report returns to parent |

---

## When to Use

| Scenario | Use |
|----------|-----|
| After code modifications | `/sniper-check src/` |
| Validate specific file | `/sniper-check path/to/file.ts` |
| Full project check | `/sniper-check .` |
| After refactoring | `/sniper-check src/components/` |

---

## Workflow

Execute the mandatory 6-phase `code-quality` workflow:

1. **PHASE 1+2 (PARALLEL)**: Launch both in parallel:
   - `explore-codebase` (Haiku) → Architecture discovery
   - `research-expert` (Sonnet) → Documentation verification
2. **PHASE 3**: Grep all usages → Impact analysis
3. **PHASE 4**: Run linters → Detect errors
4. **PHASE 5**: Apply corrections → Minimal changes
5. **PHASE 6**: Re-run linters → Zero errors

**CRITICAL**: Phases 1+2 must run in PARALLEL (two Task calls in one message).

---

## Critical Rules

| Rule | Reason |
|------|--------|
| Never skip phases 1+2 | Documentation-backed fixes only |
| Always run phases in order | Dependencies between phases |
| Zero linter errors | Non-negotiable exit criteria |
| Minimal changes only | Smallest fix necessary |

---

## Report Format

Return a validation report with:

- Architecture summary (from explore-codebase)
- Documentation references (from research-expert)
- Impact analysis table (usages, risk level)
- Errors fixed (critical, high, medium, low)
- SOLID compliance status
- Final linter status (must be ZERO errors)

Overview

This skill runs a focused code-quality validation using the sniper agent in an isolated, forked context. It performs a mandatory 6-phase workflow to find, analyze, and fix issues while keeping the main conversation context clean. The final output is a concise validation report returned to the parent process.

How this skill works

The skill forks an isolated sub-agent that executes the six-phase code-quality workflow: parallel architecture discovery and documentation research, usage grep, linting, targeted fixes, and a final lint pass. Phases 1 and 2 run in parallel as two Task calls in one message to ensure documentation-backed fixes. Only the final validation report is sent back to the parent, preventing intermediate noise.

When to use it

  • After making code modifications to validate changes quickly
  • When validating a specific file or directory before committing
  • After refactoring to ensure no regressions or hidden usages remain
  • For a full-project sanity check before release or merge
  • When you need documentation-backed fixes and minimal code edits

Best practices

  • Always run the skill after edits to guarantee zero linter errors before merge
  • Point the skill at the smallest relevant path to reduce runtime and noise
  • Do not interrupt the forked workflow; phases must run in order
  • Review the impact analysis before accepting automated fixes
  • Enforce minimal change principle: prefer targeted fixes only

Example use cases

  • Validate a single file: /sniper-check path/to/file.ts to catch lint and usage issues
  • Sanity-check a refactor: /sniper-check src/components/ to detect missed usages
  • Full repository sweep: /sniper-check . before a release to ensure clean linters
  • Pre-merge gate: integrate sniper-check as a CI step for code-quality validation

FAQ

What happens if linters still report errors after the run?

The workflow requires a final zero-error lint status; if errors remain, the report highlights them and the run is considered failing until fixed.

Why run phases 1 and 2 in parallel?

Running explore-codebase and research-expert in parallel speeds validation and ensures fixes are supported by both architecture context and documentation.