command-creator
Create custom /slash commands for repetitive tasks. Use proactively for command creation, prompt automation, or workflow shortcuts. Examples: - user: "Make a /test command that runs pytest" → create command in opencode.json, set prompt to run tests with bash tool - user: "Add a /review command for PRs" → design prompt to fetch diff, analyze changes, generate review comments - user: "Automate this repetitive task" → identify pattern, create slash command with parameterized prompt - user: "Make a /deploy command" → design workflow (build, test, deploy), encode in command prompt
What this skill does
# Command Creator
Create custom slash commands for repetitive tasks in OpenCode.
<core_approach>
**Command creation is conversational, not transactional.**
- MUST NOT assume what the user wants—ask
- SHOULD start simple, add complexity only if needed
- MUST show drafts and iterate based on feedback
</core_approach>
<question_tool>
**Batching:** Use the `question` tool for 2+ related questions. Single questions → plain text.
**Syntax:** `header` ≤12 chars, `label` 1-5 words, add "(Recommended)" to default.
When to ask: Vague request ("make a command"), or multiple implementation approaches exist.
</question_tool>
<reference>
## Command Locations
| Scope | Path |
| ------- | -------------------------------------- |
| Project | `.opencode/command/<name>.md` |
| Global | `~/.config/opencode/command/<name>.md` |
## Template Placeholders (CRITICAL)
- **Single Insertion**: Each placeholder (`$ARGUMENTS`, `$1`, `@filename`, etc.) MUST be inserted ONLY ONCE in the command body.
- **Dedicated Blocks**: Use dedicated XML blocks for user inputs and file contents to keep the objective and instructions clean.
- **Preference**: Prefer using a single argument (`$ARGUMENTS`) over complex positional ones unless strictly necessary.
BAD: "Do $ARGUMENTS and then check $ARGUMENTS for errors."
GOOD:
```markdown
<user_guidelines>
$ARGUMENTS
</user_guidelines>
<context>
@src/schema.ts
</context>
<objective>
Analyze findings based on user guidelines and the provided schema.
</objective>
```
| Placeholder | Description | Example |
| ---------------- | ---------------------- | ----------------------------------- |
| `$ARGUMENTS` | All arguments passed | `/cmd foo bar` → "foo bar" |
| `$1`, `$2`, `$3` | Positional arguments | `/cmd foo bar` → $1="foo", $2="bar" |
| `!command` | Shell output injection | `!ls -F` |
| `@filename` | Include file content | `@src/index.ts` |
## Terminology Standard
- **Direct Address**: You MUST use "you" (referring to the agent executing the command) instead of "the agent" or "opencode".
## Command File Format
```markdown
---
description: 3-word command summary
agent: build # Optional: build, plan, or custom agent
model: provider/model-id # Optional: override model
subtask: true # Optional: run as subagent
---
<summary>
Line 1: You MUST [purpose].
Line 2: You SHOULD [inputs].
Line 3: You MUST [outcome].
</summary>
<user_guidelines>
$ARGUMENTS
</user_guidelines>
Template body goes here.
```
## Frontmatter Options
| Field | Purpose | Required |
| ------------- | ------------------------- | ----------- |
| `description` | Shown in command list | RECOMMENDED |
| `agent` | Route to specific agent | No |
| `model` | Override model | No |
| `subtask` | Force subagent invocation | No |
## Conceptual Boundary (CRITICAL)
- **Commands are for USERS**: They are high-level shortcuts for humans to trigger an agent with specific context.
- **Agents CANNOT use commands**: Agents lack a terminal interface to "type" commands. They execute the *template body* provided by the command.
- **One-Way Street**: User -> Command -> Agent.
- **NEVER** tell an agent to use a command "proactively"—they literally cannot.
- If logic needs to be shared, put it in a **Skill** (script/instruction), not a Command.
## Shell Commands in Templates
Use the !`command` syntax to inject bash output into your prompt. The shell execution is triggered by an exclamation mark followed by the command wrapped in backticks:
```markdown
Review recent changes:
!`git log --oneline -10`
Suggest improvements.
```
## File References
Use `@` to include file content:
```markdown
Given the schema in @prisma/schema.prisma, generate a migration for $ARGUMENTS.
```
<workflow>
## Phase 1: Understand the Task
1. **"What task do you want to automate?"**
- Get the repetitive prompt/workflow
- Examples: "run tests", "review this file", "create a component"
2. **"Can you show me how you'd normally ask for this?"**
- Get the actual prompt they'd type
- This becomes the template body
## Phase 2: Inputs & Routing
3. **"Does it need arguments?"**
- If they mention "this file", "a name", "the function" → yes
- Explain: `/command foo bar` → `$ARGUMENTS` = "foo bar", `$1` = "foo", `$2` = "bar"
4. **"Should it make changes or just analyze?"**
- Changes → default agent (build)
- Analysis only → set `agent: plan`
5. **"Should it run as a background subtask?"**
- Long-running or parallel work → set `subtask: true`
- Interactive or quick → leave unset
6. **"Project-specific or use everywhere?"**
- Project → `.opencode/command/`
- Global → `~/.config/opencode/command/`
## Phase 3: Review & Refine
7. **Show the draft command, ask for feedback**
- "Here's what I've created. Want to adjust anything?"
- Iterate until user is satisfied
**Be flexible:** If user provides lots of info upfront, adapt—MUST NOT rigidly ask every question.
</workflow>
<examples>
## /test - Run and Fix Tests
```markdown
---
description: Run tests and fix failures
---
<summary>
You MUST run the full test suite.
You SHOULD identify and fix failures.
You MUST re-verify fixes.
</summary>
<objective>
You MUST run the full test suite, find the root cause of any failures, and fix the issue.
</objective>
1. Show the failing test
2. Identify the root cause
3. Fix the issue
4. Re-run to verify
```
## /review - Code Review (Read-Only)
```markdown
---
description: Review code for issues
agent: plan
---
<summary>
You MUST review $ARGUMENTS for issues.
You SHOULD check for bugs, security, and performance.
You MUST provide actionable feedback.
</summary>
<objective>
You MUST review $ARGUMENTS for bugs, security, and performance issues and provide actionable feedback without making changes.
</objective>
- Bugs and edge cases
- Security issues
- Performance problems
```
## /commit - Smart Commit with Prefixes
```markdown
---
description: Stage and commit with conventional prefix
---
<summary>
You MUST analyze changes and stage files.
You SHOULD choose a conventional commit prefix.
You MUST commit with a concise message.
</summary>
<context>
!`git status`
!`git diff`
</context>
<objective>
You MUST analyze changes, stage relevant files, and commit with a concise message.
</objective>
1. Analyze all changes
2. Choose appropriate prefix: docs:, feat:, fix:, refactor:, test:, ci:
3. Write concise commit message (imperative mood)
4. Stage relevant files and commit
```
## /spellcheck - Check Spelling
```markdown
---
description: Check spelling in markdown files
subtask: true
---
<summary>
You MUST find unstaged markdown files.
You SHOULD check them for spelling errors.
You MUST report any found errors.
</summary>
Check spelling in all unstaged markdown files:
<context>
!`git diff --name-only | grep -E '\.md$'`
</context>
<objective>
You MUST check for and report any spelling errors found in unstaged markdown files.
</objective>
```
## /issues - Search GitHub Issues
```markdown
---
description: Search GitHub issues
model: anthropic/claude-3-5-haiku-20241022
subtask: true
---
<summary>
You MUST search GitHub issues for $ARGUMENTS.
You SHOULD limit results to the top 10.
You MUST summarize the relevant issues.
</summary>
Search GitHub issues matching: $ARGUMENTS
<context>
!`gh issue list --search "$ARGUMENTS" --limit 10`
</context>
<objective>
You MUST summarize the top 10 relevant GitHub issues found for $ARGUMENTS.
</objective>
```
## /component - Create Component
```markdown
---
description: Create a new React component
---
<summary>
You MUST create a React component named $1.
You SHOULD include TypeScript props and basic styling.
You MUST provide a unit test file.
</summary>
Create a React component namRelated 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.