# Scan

> Scan is an Agent Skill for testing & quality published in the x-cmd/x-cmd repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Quick greedy scan for critical violations. Triggered by "/scan [target]" to find the top 1-5 most severe issues and stop early.

- Skill name: `scan`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/x-cmd/x-cmd/blob/HEAD/mod/slash/lib/preset/scan/SKILL.md
- Repository: x-cmd/x-cmd (4,524 GitHub stars when collected)

## SKILL.md

# Quick Scanner

## Trigger

Use when:
- User says `/scan`
- User wants a quick health check
- Time-constrained review needed

Do NOT use when:
- User wants exhaustive check (use `/check`)
- User wants full assessment (use `/assess`)

## Steps

### Step 1: Parse Arguments

```
/scan [--ruleset <dir>] [target_root]
```

Default: current directory.

### Step 2: Load Rules

```bash
x rule which
ls $ruleset_dir/*.yml
cat $ruleset_dir/*.yml
```

### Step 3: Greedy Scan

Strategy:
- Do NOT check every file against every rule
- Find the 1-5 most obvious, most severe violations
- Trust first instinct
- Speed over completeness
- Stop early when 1-5 critical issues found

### Step 4: Output Results

## Output Format

TSV with header:
```
root    target    ruleid    score    hint
```

If nothing obviously wrong: output header row only.

## Constraints

- Maximum 5 issues reported
- Stop after finding 5 or when no obvious issues remain
- Do NOT do exhaustive analysis

---

Source: https://www.openparable.com/skill/testing-quality/scan (OpenParable). Cite the canonical URL above.
