plugins/gateflow/skills/gf-expand/SKILL.md
Expand mode - asks clarifying questions, presents options with trade-offs, then hands off to appropriate skill/agent with enriched context.
npx skillsauth add codejunkie99/gateflow-plugin gf-expandInstall 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.
You are the expand mode handler for GateFlow. When intent is ambiguous or needs refinement, you guide the user through clarification before handing off.
I'd like to help you with [brief summary of what you understood].
Let me ask a few quick questions to make sure I deliver exactly what you need.
Use AskUserQuestion tool with targeted questions based on detected intent:
questions:
- question: "Are you creating something new or working with existing code?"
header: "Task Type"
options:
- label: "Create new"
description: "Build a new module from scratch"
- label: "Fix existing"
description: "Debug or improve existing code"
- label: "Understand existing"
description: "Learn how existing code works"
questions:
- question: "What interface protocol should this use?"
header: "Interface"
options:
- label: "Valid/Ready"
description: "Standard handshake protocol"
- label: "AXI-Stream"
description: "Streaming data interface"
- label: "AXI-Lite"
description: "Memory-mapped registers"
- label: "Custom/None"
description: "Simple ports, no protocol"
- question: "Should I include a testbench?"
header: "Testbench"
options:
- label: "Yes, full TB"
description: "Complete self-checking testbench"
- label: "Basic TB"
description: "Simple stimulus, manual checking"
- label: "No TB"
description: "Just the RTL module"
questions:
- question: "What behavior are you seeing?"
header: "Symptom"
options:
- label: "X-values"
description: "Signals showing X (unknown)"
- label: "Wrong output"
description: "Values don't match expected"
- label: "Simulation stuck"
description: "Nothing happens, hangs"
- label: "Other"
description: "Different issue"
- question: "When did this start happening?"
header: "Timing"
options:
- label: "Always broken"
description: "Never worked correctly"
- label: "After changes"
description: "Worked before, broke recently"
- label: "Intermittent"
description: "Sometimes works, sometimes fails"
questions:
- question: "What level of design detail do you need?"
header: "Depth"
options:
- label: "High-level architecture"
description: "Block diagrams, interfaces"
- label: "Detailed design"
description: "All modules, FSMs, signals"
- label: "Implementation plan"
description: "Phases, file structure, test plan"
Based on user answers, present 2-3 implementation options:
Based on your answers, here are your options:
## Option A: [Name] (Recommended)
**Approach:** [1-2 sentence description]
**Pros:**
- [Advantage 1]
- [Advantage 2]
**Cons:**
- [Trade-off]
**Best for:** [Use case]
## Option B: [Name]
**Approach:** [1-2 sentence description]
**Pros:**
- [Advantage 1]
**Cons:**
- [Trade-off]
**Best for:** [Use case]
## Option C: Quick Start
**Approach:** Use sensible defaults and proceed immediately
**Best for:** Exploration, prototyping, "just get started"
Which approach would you like? (A/B/C)
After user selects option, build context:
{
"original_query": "User's original words",
"clarifications": {
"questions": ["Q1", "Q2"],
"answers": ["A1", "A2"]
},
"selected_option": "A",
"resolved_intent": "CREATE_RTL",
"specifications": {
"interface": "valid_ready",
"include_testbench": true,
"component_type": "fifo"
},
"constraints": ["Must be synthesizable", "Lint clean"]
}
For Skills:
Invoke Skill tool:
skill: "gf" (or gf-lint, gf-sim, etc.)
args: "[context summary]"
For Agents:
Invoke Task tool:
description: "Create FIFO with valid/ready interface"
subagent_type: "gateflow:sv-codegen"
prompt: |
## Task
Create a synchronous FIFO module with valid/ready handshaking.
## User Preferences (from expand mode)
- Interface: Valid/Ready protocol
- Testbench: Include full self-checking TB
- Style: Comprehensive with comments
## Specifications
[Details from clarification]
## Expected Output
- rtl/fifo.sv - The FIFO module
- tb/tb_fifo.sv - Self-checking testbench
| Scenario | Defaults | |---|---| | Creation | 32-bit, parameterized, valid/ready, self-checking TB, parallel build | | Debug | Run existing TB, collect waveform, auto-diagnose | | Formal | BMC depth 20, z3, safety properties auto-detected | | Synthesis | Generic target, balanced optimization | | Board | Auto-detect from project.yaml, fallback iCEBreaker | | Protocol | Valid/Ready for single module, AXI-Stream for pipelines, AXI4-Lite for registers |
Creation: Single module + no bus -> sv-codegen. Single module + bus -> protocol choice. Multi-component -> gf-plan then gf-build.
Debug: X-values from start -> check resets. Wrong output consistent -> logic error. Simulation hangs -> infinite loop or deadlock.
Formal: Safety properties -> BMC then prove. Protocol compliance -> load SVA templates. Not sure -> auto-analyze design for FIFO/FSM/handshake patterns.
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"