software-planner
Comprehensive software development planning and implementation skill for multi-interface Python applications with academic research integration. Triggers when: Creating new Python software with CLI/GUI/Web interfaces, planning software architecture and modules, designing scientific or engineering applications, setting up bilingual documentation and PyPI publishing, or needing academic research-based feature design. Commands: - /planner research <topic> - Conduct domain research - /planner design <project> - Design system architecture - /planner modules - Generate module specifications - /planner docs - Create bilingual documentation - /planner verify - Run verification checklist Capabilities: Pre-development planning and research, multi-interface design (CLI + PySide6 GUI + Flask Web), scientific visualization with pyqtgraph, academic literature-based feature design, sample data and test documentation generation, bilingual README with structured sections, GPLv3 licensing and PyPI publishing setup
What this skill does
## Safety Rules
**Critical**: Read and follow [global-rules/bash-safety.md](file:///Users/fred/.config/opencode/skills/global-rules/rules/bash-safety.md) for all bash/command execution.
Core rules:
1. **Always set explicit `timeout` on bash calls** — 30s for tests, 60s for installs, never default
2. **Never run unscoped full test suites** — use `-k` or file paths to limit scope
3. **Never use `rm -rf` without variable guards**, `curl|bash`, `sudo`, or `kill -9`
4. **Infinite loops must have hard timeout + budget limits** — no unbounded while(True)
5. **Redirect stdin** with `< /dev/null` for non-interactive commands
A bash timeout that triggers SIGKILL corrupts the terminal FD, crashes opencode's TUI, and forces a GUI restart.
## Quick Commands
| Command | Description |
|---------|-------------|
| `/planner research <topic>` | Conduct domain research |
| `/planner design <project>` | Design system architecture |
| `/planner modules` | Generate module specifications |
| `/planner docs` | Create bilingual documentation |
| `/planner verify` | Run verification checklist |
# Software Development Planner
Complete workflow for planning and implementing Python software with CLI, GUI, and Web interfaces, following established project patterns from GangDan, Chou, Huan, LaPian, and NuoYi.
## Pre-Development Planning
### Step 1: Domain Research
Before writing any code, conduct thorough research:
1. **Academic Literature Search**
- Search Google Scholar, CNKI, IEEE, ACM for relevant papers
- Download key PDFs to `pdf/` directory in project root
- Extract core concepts and methodologies
- Identify evaluation criteria and metrics
2. **Existing Solutions Analysis**
- Search GitHub for similar projects
- Identify feature gaps and improvement opportunities
- Note UI/UX patterns and architectural decisions
3. **Requirements Synthesis**
- Combine academic findings with practical needs
- Define functional requirements with citations
- Establish non-functional requirements (performance, usability)
### Step 2: Architecture Design
Design the system before implementation:
```
Software Name (v1.0)
├── Core Features (from research)
│ ├── Feature 1: [description with citation]
│ ├── Feature 2: [description with citation]
│ └── Feature 3: [description with citation]
├── Data Models
│ ├── Model 1: fields, relationships
│ └── Model 2: fields, relationships
├── Algorithms
│ ├── Algorithm 1: input, output, complexity
│ └── Algorithm 2: input, output, complexity
└── User Interfaces
├── CLI: commands, flags, arguments
├── GUI: windows, panels, controls
└── Web: routes, templates, API endpoints
```
### Step 3: Module Specification
Define each module with clear responsibilities and size targets. The `cli.py` module handles command-line argument parsing and routing, targeting around 100 lines. The `gui.py` module provides PySide6 window, controls, and event handlers, targeting around 200 lines. The `app.py` module contains Flask routes and API endpoints, targeting around 100 lines. The `core.py` module implements business logic, algorithms, and data models, targeting around 200 lines. The `api.py` module provides the unified Python API with ToolResult, targeting around 100 lines. Total target is 500+ lines across all modules.
## Interface Requirements
### CLI (Command-Line Interface)
Follow unified flag conventions from GangDan:
```python
import argparse
def main():
parser = argparse.ArgumentParser(
prog="softwarename",
description="Software description",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
# Unified flags (required)
parser.add_argument("-V", "--version", action="version", version=f"softwarename {__version__}")
parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
parser.add_argument("-o", "--output", help="Output path")
parser.add_argument("--json", action="store_true", dest="json_output", help="Output as JSON")
parser.add_argument("-q", "--quiet", action="store_true", help="Suppress output")
# Mode selection
subparsers = parser.add_subparsers(dest="mode")
# GUI mode
gui_parser = subparsers.add_parser("gui", help="Launch GUI")
gui_parser.add_argument("--no-web", action="store_true", help="Disable embedded web server")
# Web mode
web_parser = subparsers.add_parser("web", help="Launch web server")
web_parser.add_argument("--host", default="127.0.0.1")
web_parser.add_argument("--port", type=int, default=5000)
# CLI operations
cli_parser = subparsers.add_parser("cli", help="CLI mode")
cli_parser.add_argument("input", help="Input file or data")
```
Entry Points (following GangDan pattern): The software supports multiple entry points. The default invocation launches GUI or web based on context. Explicit GUI mode uses `softwarename gui`. Web server mode uses `softwarename web`. CLI mode uses `softwarename cli <args>`. Module invocation uses `python -m packagename`.
### GUI (PySide6 Interface)
Use default PySide6 styling - NO custom colors, fonts, or backgrounds:
```python
from PySide6.QtWidgets import (
QApplication, QMainWindow, QWidget, QVBoxLayout,
QHBoxLayout, QPushButton, QLabel, QLineEdit,
QComboBox, QSpinBox, QDoubleSpinBox, QTableWidget,
QTabWidget, QGroupBox, QFileDialog, QMessageBox,
)
from PySide6.QtCore import Qt
import pyqtgraph as pg
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Software Name v1.0")
self.setMinimumSize(800, 600)
# Central widget with default styling
central = QWidget()
self.setCentralWidget(central)
layout = QVBoxLayout(central)
# Controls in group box
control_group = QGroupBox("Parameters")
control_layout = QHBoxLayout(control_group)
# Input controls
self.input_edit = QLineEdit()
self.input_edit.setPlaceholderText("Enter input...")
control_layout.addWidget(QLabel("Input:"))
control_layout.addWidget(self.input_edit)
# Action buttons
btn_run = QPushButton("Run")
btn_run.clicked.connect(self.run_analysis)
control_layout.addWidget(btn_run)
layout.addWidget(control_group)
# Visualization with pyqtgraph
self.plot_widget = pg.PlotWidget()
self.plot_widget.setBackground('w') # White background for plots
self.plot_widget.showGrid(x=True, y=True)
layout.addWidget(self.plot_widget)
# Results table
self.results_table = QTableWidget()
self.results_table.setColumnCount(4)
self.results_table.setHorizontalHeaderLabels(["ID", "Name", "Value", "Score"])
layout.addWidget(self.results_table)
```
GUI Design Principles: Three principles guide GUI implementation. First, use default styling only with system default colors, system default fonts, no custom backgrounds, and no custom stylesheets. Second, follow a consistent layout structure with the control panel with parameters at the top, visualization area with pyqtgraph in the middle, and results table or log output at the bottom. Third, select appropriate control types: `QLineEdit` for text input, `QSpinBox` or `QDoubleSpinBox` for numeric input, `QComboBox` for selections, `QCheckBox` for boolean options, and `QPushButton` for actions.
### Web (Flask Interface)
```python
from flask import Flask, render_template, jsonify, request
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html")
@app.route("/api/analyze", methods=["POST"])
def analyze():
data = request.json
result = perform_analysis(data)
return jsonify(result.to_dict())
@app.route("/api/results/<id>")
def get_results(id):
result = get_stored_result(id)
return jsonify(result.to_dict())
def Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.