leonj1/external-claude-skills/violation-scanner

Claude Code and agent skill by leonj1/external-claude-skills

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Delegates coding standards violation scanning to a lightweight agent. Use when checking files for violations without loading full source files into context.

Install

npx vskill@latest install leonj1/external-claude-skills/violation-scanner

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as majiayu000/claude-skill-registry/violation-scanner.

Violation Scanner Skill

This skill delegates coding standards violation scanning to a specialized lightweight agent, keeping your context lean.

When to Invoke This Skill

Invoke this skill when ANY of these conditions are true:

  1. Post-implementation check: Code was just written and needs standards verification
  2. Pre-refactor analysis: You need to identify violations before refactoring
  3. File size/complexity check: You need to verify files stay under 500 lines / 5 functions
  4. Standards compliance audit: You need to scan multiple files for violations
  5. Hardcoded value detection: You need to find hardcoded URLs, ports, credentials

Why Use This Skill?

Without this skill: You would read full source files (100-500 lines each) to check for violations manually.

With this skill: The violation-scanner agent (haiku model) uses Grep patterns to find violations and returns a concise violation list.

Context savings: 80-95% reduction in violation-checking context usage.

Invocation

When you need to check for violations, invoke the agent:

Task(subagent_type="violation-scanner", prompt="
Scan for coding standards violations.
Files to scan:
- src/services/user_service.py
- src/services/order_service.py
- src/utils/helpers.py
")

For directory scanning:

Task(subagent_type="violation-scanner", prompt="
Scan for coding standards violations.
Directory: src/services/
")

For specific standards focus:

Task(subagent_type="violation-scanner", prompt="
Scan for coding standards violations.
Files: src/api/endpoints.py
Focus on: hardcoded values, environment variable reads
")

What violation-scanner Will Do

The agent will:

  1. Detect language: Determine which standards apply based on file extensions
  2. Pattern scan: Use Grep to find violations without reading full files
  3. Check limits: Verify file size (<500 lines) and function count (<5)
  4. Categorize severity: Critical vs Warning violations
  5. Return summary: Concise violation list with file:line references

Violations Detected

Critical (must fix):

  • Hardcoded secrets/credentials
  • Global mutable state
  • Environment reads in business logic
  • File > 500 lines
  • Functions > 5 per file

Warning (should fix):

  • Missing type hints
  • Default argument values
  • Console/print statements
  • Hardcoded URLs/ports (non-secret)

Expected Output

You will receive a structured summary like:

## Violation Scan Results
**Files Scanned**: 5
**Violations Found**: 8
### Critical Violations
| File | Line | Violation | Rule |
|------|------|-----------|------|
| src/services/auth.py | 45 | `os.getenv('SECRET')` | no env reads in functions |
| src/services/auth.py | 89 | Global: `CACHE = {}` | no global mutable state |
### Warnings
| File | Line | Violation | Rule |
|------|------|-----------|------|
| src/services/user.py | 12 | Default arg: `id=None` | no default arguments |
| src/utils/helpers.py | 8 | `print()` statement | use logging |
### File Size Violations
| File | Lines | Limit |
|------|-------|-------|
| src/services/order.py | 623 | 500 |
### Summary by Category
- Hardcoded values: 1
- Environment reads: 1
- Global state: 1
- File size: 1

Example Usage

Scenario: Coder agent just finished implementing a new service.

Without skill: Read the 200-line service file, manually check each standards rule.

With skill:

Task(subagent_type="violation-scanner", prompt="
Scan for coding standards violations.
Files: src/services/new_service.py
")

Result: You get a violation list with exact line numbers in 20 lines of context.

Do NOT Invoke When

  • You're already reading the file for other reasons (check violations while reading)
  • The file is very small (<50 lines) - just read it directly
  • You only need to check one specific pattern (use Grep directly)
  • The user has explicitly said to skip standards checks

Consumers

This skill is particularly useful for:

  • coding-standards-checker - Post-implementation verification
  • refactorer - Identifying what needs to be fixed
  • coder - Pre-commit validation
  • acceptance-qa - Final quality gate

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/leonj1/external-claude-skills/violation-scanner/badge)](https://verified-skill.com/skills/leonj1/external-claude-skills/violation-scanner)

Something wrong with this skill or its page? Tell us.