opencode-create-command

Create OpenCode slash commands with Markdown or JSON configs.

1|Updated May 7, 2022
One-click install
npx skills add https://github.com/brandonburrus/dotfiles --skill opencode-create-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-create-command
Source: https://github.com/brandonburrus/dotfiles/tree/main/.config/opencode/skills/opencode-create-command
Command: npx skills add https://github.com/brandonburrus/dotfiles --skill opencode-create-command

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of new reusable slash commands for the OpenCode TUI, automating the process of defining command behavior, arguments, and context injection.

Core Features & Use Cases

  • Command Definition: Generates valid Markdown command files or JSON config entries.
  • Context Injection: Supports embedding shell output and file contents directly into prompts.
  • Use Case: When you find yourself performing a repetitive task in the TUI, use this skill to create a custom slash command like /review-diff that automatically pulls git diffs and prompts for review.

Quick Start

Use the opencode-create-command skill to create a new global command named 'generate-report' that takes a date argument and runs a git log command.

Frequently Asked Questions about opencode-create-command

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom slash commands in the OpenCode TUI?

To create custom slash commands in the OpenCode TUI, you can automate the generation of Markdown command files or JSON config entries by defining the command's purpose, arguments, and context injection mechanisms.

Can I inject shell output directly into OpenCode command prompts?

Yes, you can inject shell output directly into OpenCode command prompts. The command creation process supports embedding dynamic shell command outputs and file contents directly into your parameterized prompts.

What is the best way to automate repetitive tasks in the OpenCode TUI?

The best way to automate repetitive tasks in the OpenCode TUI is to generate dynamic slash commands. You can define a custom command with specific arguments to handle repetitive workflows like automatically pulling git diffs for review.

Does OpenCode command creation support both Markdown and JSON formats?

Yes, OpenCode command creation supports both Markdown file and JSON config formats for command registration. This allows you to define command behavior and context injection using your preferred configuration format.

How do I add arguments to OpenCode commands for context-aware workflows?

You add arguments to OpenCode commands by defining them during the command creation process. This enables parameterized prompts and context-aware workflows, allowing commands to accept dynamic inputs like specific dates or identifiers.

When should I generate a custom OpenCode command instead of typing prompts manually?

You should generate a custom OpenCode command when you find yourself performing a repetitive task in the TUI. Creating a parameterized command automates the workflow, saving time compared to manually typing the same context-aware prompts repeatedly.