plugins/gateflow/skills/gf-lint/SKILL.md
SystemVerilog lint checker with structured output for orchestration. Runs Verilator lint, categorizes errors/warnings, explains issues, and returns a parseable result block for /gf orchestration.
npx skillsauth add codejunkie99/gateflow-plugin gf-lintInstall 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.
Lint SystemVerilog files with structured output for orchestration.
Before running lint, check if Verilator is available:
which verilator
If Verilator is not available, check for Verible:
which verible-verilog-lint
If neither is available, return immediately:
---GATEFLOW-RESULT---
STATUS: ERROR
ERRORS: 0
WARNINGS: 0
FILES: []
DETAILS: No lint tool available. Install Verilator (recommended) or Verible.
macOS: brew install verilator
Linux: sudo apt install verilator
---END-GATEFLOW-RESULT---
Do NOT attempt to lint without a tool. Return the ERROR status and let the orchestrator handle it.
If files specified in args: Use the provided file paths.
If no files specified: Auto-detect SV files:
ls *.sv rtl/*.sv 2>/dev/null | head -20
verilator --lint-only -Wall <files>
Count issues by category:
%Error: lines - must be fixed%Warning-*: lines - should be reviewedFor each warning type found, explain:
| Warning | Meaning | Fix |
|---------|---------|-----|
| UNUSED | Signal declared but not used | Remove signal or suppress with /* verilator lint_off UNUSED */ |
| UNDRIVEN | Signal never assigned a value | Assign the signal or connect it |
| WIDTH | Bit width mismatch in operation | Add explicit sizing: [7:0] |
| CASEINCOMPLETE | Case statement missing items | Add default: branch |
| LATCH | Inferred latch from incomplete if/case | Add default assignment at start of always_comb |
| BLKSEQ | Blocking assignment in always_ff | Use <= (non-blocking) in sequential blocks |
| PINCONNECTEMPTY | Module port left unconnected | Connect or explicitly mark as .* |
| IMPLICIT | Implicit wire declaration | Declare with logic or wire |
ALWAYS end your response with this exact block format:
---GATEFLOW-RESULT---
STATUS: PASS|FAIL|ERROR
ERRORS: <count>
WARNINGS: <count>
FILES: <comma-separated list>
DETAILS: <one-line summary>
---END-GATEFLOW-RESULT---
Status definitions:
PASS: No errors, warnings OK (0-N warnings acceptable)FAIL: One or more errors foundERROR: Could not run lint (missing files, tool error)Running lint on: rtl/fifo.sv, rtl/uart.sv
$ verilator --lint-only -Wall rtl/fifo.sv rtl/uart.sv
%Warning-UNUSED: rtl/fifo.sv:25: Signal 'debug_flag' is not used
%Warning-WIDTH: rtl/uart.sv:42: Operator ASSIGN expects 8 bits but got 16
## Summary
**Files:** 2 | **Errors:** 0 | **Warnings:** 2
### Warnings Explained
1. **UNUSED** (rtl/fifo.sv:25): `debug_flag` is declared but never read
- Fix: Remove if unneeded, or suppress with lint pragma
2. **WIDTH** (rtl/uart.sv:42): Assigning 16-bit value to 8-bit signal
- Fix: Truncate explicitly `data[7:0]` or widen the target
---GATEFLOW-RESULT---
STATUS: PASS
ERRORS: 0
WARNINGS: 2
FILES: rtl/fifo.sv,rtl/uart.sv
DETAILS: Lint passed with 2 warnings
---END-GATEFLOW-RESULT---
$ verilator --lint-only -Wall rtl/broken.sv
%Error: rtl/broken.sv:10: syntax error, unexpected IDENTIFIER
---GATEFLOW-RESULT---
STATUS: FAIL
ERRORS: 1
WARNINGS: 0
FILES: rtl/broken.sv
DETAILS: Syntax error on line 10
---END-GATEFLOW-RESULT---
The /gf skill uses this skill internally and parses the result block:
Parse ---GATEFLOW-RESULT--- block:
- STATUS: PASS -> proceed to next step
- STATUS: FAIL -> spawn sv-refactor agent with error context
- STATUS: ERROR -> report issue to user
| Code | Description |
|---|---|
| ASSIGNEQEXPR | = used inside expression (may mean ==) |
| ALWNEVER | always @* has empty event list |
| ALWCOMBORDER | Variable set after use in always_comb |
| IMPLICITSTATIC | Task/function variable implicitly static |
| WIDTHEXPAND | Value is zero-expanded |
| WIDTHTRUNC | Value is truncated |
| ENUMVALUE | Enum assigned incompatible type |
| CASEOVERLAP | Case values overlap |
| CASTCONST | $cast always succeeds or fails |
| CMPCONST | Comparison always yields constant |
| MISINDENT | Misleading indentation |
| MULTIDRIVEN | Signal driven by multiple always blocks |
| SYNCASYNCNET | Signal mixed sync/async resets |
| INFINITELOOP | Loop condition always true |
| SELRANGE | Selection index out of bounds |
| Code | Description |
|---|---|
| ASCRANGE | Packed vector with ascending range [0:7] |
| DECLFILENAME | Module name doesn't match filename |
| DEFPARAM | Deprecated defparam |
| GENUNNAMED | Generate block unnamed |
| IMPORTSTAR | import pkg::* in $unit scope |
--assert enabled by default since v5.038--lint-only now implies --timing/* verilator lint_off WIDTH */
assign narrow = wide;
/* verilator lint_on WIDTH */
lint_off -rule WIDTH -file "*.sv" -match "Operator ASSIGN*"
%Error: file.sv:42:5: syntax error, unexpected ';'
%Warning-WIDTH: file.sv:25:15: Operator ASSIGN expects 8 bits
| Code | Meaning | |---|---| | 0 | Success (no errors or fatal warnings) | | 1 | Errors or warnings (warnings are fatal by default) |
Use -Wno-fatal to make warnings non-fatal.
verilator --lint-only --diagnostics-sarif *.sv # SARIF JSON output
tools
GateFlow release readiness workflow. Validates plugin manifests, marketplace metadata, docs index coverage, root mirrors, release notes, and component counts before a version tag is created. Use when preparing, checking, or cutting a GateFlow plugin release.
testing
Testbench verification best practices and patterns. This skill should be used when the user needs testbench architecture guidance, verification methodology, or wants to write professional-quality testbenches. Example requests: "testbench best practices", "how to structure TB", "verification patterns"
testing
Primary SystemVerilog/RTL orchestrator for GateFlow. Routes to specialist agents, runs verification, and iterates until working. Use when the user wants to create, test, fix, or implement any RTL design — FIFO, UART, AXI, state machines, or any digital hardware module.
development
Terminal visualization for GateFlow codebase maps. Renders module hierarchies, FSM state diagrams, and module detail cards as interactive ASCII/Unicode art. Example requests: "visualize the codebase", "show hierarchy", "show FSM", "show module detail"