Skip to main content

Overview

Commands allow you to save and reuse frequently used prompts across all your Blocks sessions. Instead of typing the same instructions repeatedly, create a custom command and invoke it with a simple slash command.

What Are Commands?

A command is a saved prompt that you can quickly access with /<command-name>. Commands are perfect for:
  • Repeated workflows - Tasks you perform regularly across different sessions
  • Consistent instructions - Ensuring the same approach is used every time
  • Complex prompts - Saving detailed instructions that would be tedious to retype
  • Team standards - Sharing common workflows across your organization

Creating Commands

From the Dashboard

  1. Navigate to Dashboard > Commands in the main navigation
  2. Click the “Create” button
  3. Fill in the command details:
    • Name: The keyword you’ll use to invoke the command (e.g., review-security)
    • Prompt: The full prompt text that will be executed
  4. Click “Save” to create the command

Command Examples

Security Review Command
Name: review-security
Prompt: Review this code for security vulnerabilities. Focus on:
- SQL injection risks
- XSS vulnerabilities
- Authentication/authorization issues
- Secrets or credentials in code
Provide specific line numbers and suggested fixes.
Documentation Command
Name: add-docs
Prompt: Add comprehensive documentation to this code including:
- Function/method descriptions
- Parameter explanations
- Return value documentation
- Usage examples
Test Generation Command
Name: gen-tests
Prompt: Generate unit tests for this code with:
- Edge cases coverage
- Happy path scenarios
- Error handling tests
- At least 80% code coverage

Using Commands

In the Dashboard

  1. Open any session
  2. Click the Commands button in the message box
  3. Select your command from the menu
  4. The command prompt will be inserted into your message
  5. Add any additional context if needed
  6. Send the message

In External Providers (Slack, GitHub, Linear)

Use commands by combining @blocks with your command name: Standard Usage:
@blocks /<command-name>
With Plan Mode:
@blocks /plan /<command-name>
Examples:
@blocks /review-security
@blocks /plan /gen-tests
@blocks /add-docs for the authentication module
You can add additional context after the command to customize the request for your specific use case.

Managing Commands

Editing Commands

  1. Navigate to Dashboard > Commands
  2. Find the command you want to edit
  3. Click the edit icon
  4. Update the name or prompt
  5. Click “Save” to save your changes

Deleting Commands

  1. Navigate to Dashboard > Commands
  2. Find the command you want to remove
  3. Click the delete icon
  4. Confirm deletion

Best Practices

  • Use Clear Names: Choose command names that are easy to remember and describe the action
  • Be Specific: Write detailed prompts that provide clear instructions
  • Include Context: Specify what you want Blocks to focus on or avoid
  • Test Your Commands: Try out new commands to ensure they produce the desired results
  • Update Regularly: Refine your command prompts based on the results you get
  • Share with Team: Create commands for common team workflows to maintain consistency

Command Visibility

Commands are workspace-specific, meaning:
  • All team members in a workspace can see and use shared commands
  • Commands you create are available across all integrations (Dashboard, Slack, GitHub, Linear)
  • Commands persist across sessions

Commands help you work more efficiently by eliminating repetitive typing and ensuring consistent results across your development workflow.