Skip to main content
Slash commands are quick shortcuts you can type inside any description or comment field on GitHub (issues, pull requests, and discussions) to insert structured Markdown components. They save time, reduce repetitive typing, and help keep comments consistently formatted and readable. Why use slash commands
  • Speed: Insert common Markdown fragments without manually typing the structure.
  • Consistency: Enforce a consistent format for code blocks, tables, task lists, and more.
  • Readability: Collapse large outputs or hide secondary details for cleaner threads.
Common slash commands and what they produce Code block example inserted by /code
Details (collapsible) example inserted by /details
Table example inserted by /table
Task list example inserted by /task-list
The /task-list shortcut is restricted to the issue description. Use standard Markdown task lists (- [ ] / - [x]) in other comment fields if needed.
Tips and best practices
  • Use /code when sharing code snippets to enable proper syntax highlighting (choose the language when prompted).
  • Hide large logs or verbose output with /details so the main discussion stays focused.
  • Use /table for data that benefits from a clear, tabular layout—this avoids manual pipe/dash formatting errors.
  • Save frequently used replies with GitHub’s saved replies and insert them via /saved-replies to maintain a consistent voice across issues and PRs.
  • Apply repository templates with /template to ensure all required sections are present when filing issues or PRs.
Quick links and references By incorporating slash commands into your workflow you can keep issue and PR descriptions concise, readable, and standardized—improving collaboration and the overall quality of your project documentation.

Watch Video