Slash commands for GitHub markdown fields. Includes GIF search, emoji picker, Mermaid diagrams, and more.
Try the extension without installing it. All deployments (main + PR previews): Deployments Index
- Adds slash command palette to GitHub markdown textareas
- Type
//to see all available commands //giphyto search and insert GIFs//emojito search and insert emojis//fontto style text with sizes, colors, and formatting//kbdto format keyboard shortcuts//linkto insert markdown links with auto-generated titles//link cito link to CI jobs and artifacts (requires GitHub token)//mentionfor context-aware participant mentions//mermaidto insert diagram templates//nowto insert formatted timestamps- Uses
//prefix to avoid conflicts with GitHub's native/commands - Easily extensible with new commands
See docs/commands/README.md for a full list and usage details.
- Bun (v1.0+)
bun install
bun run build- Build:
bun install && bun run build - Open
chrome://extensions - Enable Developer mode
- Click Load unpacked
- Select the
distfolder
- Go to GitHub
- Open an issue or PR comment field
- Type
//giphy cats(or just//for command list) - Use arrow keys to navigate
- Press Enter to insert
- Press Esc to close
Note: We use
//(double slash) to avoid conflicts with GitHub's native/commands like/code,/table, etc.
For development with automatic rebuilding:
bun run devThis starts Bun in watch mode. Reload the extension in Chrome to see changes.
To check bundle sizes:
bun run analyzeThis reports the size of each bundle after building.
Run Playwright E2E tests:
bun run test:e2esrc/
├── assets/ # Static assets (icons, images)
├── content/ # Content scripts
│ ├── commands/ # Slash command implementations
│ │ ├── <command>/ # Each command in its own folder
│ │ │ ├── api.ts # Data layer (API calls, storage)
│ │ │ ├── api.test.ts # API tests
│ │ │ ├── command.ts # CommandSpec implementation
│ │ │ ├── command.test.ts
│ │ │ └── index.ts # Barrel exports
│ │ ├── grid-handlers.ts # Shared grid rendering handlers
│ │ ├── registry.ts # Command registry
│ │ └── index.ts # Command exports
│ ├── picker/ # Picker UI (React components)
│ │ ├── components/ # React UI components
│ │ ├── state.ts # Global picker state
│ │ └── styles.ts # Shared styles
│ ├── index.ts # Content entry
│ └── types.ts # Shared types
├── options/ # Options page
│ ├── components/ # React options components
│ └── github/ # GitHub API options
├── utils/ # Shared utilities
│ ├── dom.ts # DOM manipulation
│ ├── filter-sort.ts # Generic filtering/sorting
│ ├── math.ts # Math utilities
│ ├── storage.ts # Chrome storage wrapper
│ ├── svg.ts # SVG utilities
│ ├── theme.ts # Theme detection
│ └── tile-builder.ts # SVG tile generation
dist/ # Build output (load in Chrome)
docs/commands/ # Per-command documentation
e2e/ # End-to-end tests (Playwright)
scripts/ # Build scripts
| Script | Description |
|---|---|
bun run build |
Production build to dist/ |
bun run dev |
Watch mode for development |
bun run typecheck |
TypeScript type checking |
bun run lint |
ESLint check |
bun run lint:fix |
ESLint auto-fix |
bun run format |
Format with Prettier |
bun run format:check |
Check Prettier formatting |
bun run test |
Run unit tests (Vitest) |
bun run test:e2e |
Run E2E tests (Playwright) |
bun run analyze |
Build and report bundle sizes |
bun run check |
Run all checks (type, lint, format, test) |
bun run clean |
Remove dist/ folder |
- Create a new folder
src/content/commands/<command>/with:api.ts- Data layer (API calls, storage)command.ts- CommandSpec implementationindex.ts- Barrel exports
- Export the command from
src/content/commands/index.ts. - Add end-user docs under
docs/commands/<command>/README.md.
Example skeleton:
import { registerCommand, type CommandSpec } from "../registry.ts"
import { createGridHandlers } from "../grid-handlers.ts"
import { insertTextAtCursor } from "../../picker/index.ts"
import type { PickerItem } from "../../types.ts"
type MyItem = { id: string; label: string }
const myCommand: CommandSpec = {
preflight: async () => ({ showSetup: false }),
getEmptyState: async () => ({ items: [], suggest: [] }),
getResults: async (query) => ({ items: [] }),
...createGridHandlers<MyItem>((item) => insertTextAtCursor(item.label)),
}
registerCommand("mycommand", myCommand)Some features require a GitHub Personal Access Token (PAT):
//link ci- Link to CI jobs and artifacts
- Type
//link cior click the settings gear - Find GitHub Token section
- Paste your token and click Save
- Open
chrome://extensions - Find GitHub Slash Palette → Details
- Click Extension options
- Find GitHub API section
- Paste the token and Save
Token requirements:
- Create a Personal Access Token
- For public repos:
public_reposcope - For private repos:
reposcope
Where is the token stored?
The token is stored using
chrome.storage.localon your device only.
- Type
//giphy - Paste your key in the setup panel
- Press Test to verify
- Press Save
- Open
chrome://extensions - Find GitHub Slash Palette
- Click Details
- Click Extension options
- Paste the key and Save
Where is the key stored?
The key is stored using
chrome.storage.localon your device only.
- Build Tool: Bun - Fast all-in-one JavaScript runtime
- UI Support: React/JSX available for components
- Testing: Vitest (unit tests) + Playwright (E2E tests)
- Language: TypeScript with JSX support
- Linting: ESLint + Prettier
A GitHub Actions workflow is available for publishing releases to the Chrome Web Store using Google's official Chrome Web Store API.
- Go to Actions → Publish to Chrome Web Store
- Click Run workflow
- Enter the version to publish (e.g.,
0.0.4) - Click Run workflow
The workflow:
- Downloads the release artifact from GitHub Releases
- Authenticates with Google OAuth2
- Uploads the extension using the official Chrome Web Store API
- Publishes the extension for review
Configure these secrets in repository settings (Settings → Secrets and variables → Actions):
| Secret | Description |
|---|---|
CHROME_EXTENSION_ID |
Extension ID from Chrome Web Store |
CHROME_CLIENT_ID |
OAuth 2.0 client ID |
CHROME_CLIENT_SECRET |
OAuth 2.0 client secret |
CHROME_REFRESH_TOKEN |
OAuth 2.0 refresh token |
- Go to Google Cloud Console
- Create a project (or select existing)
- Enable the Chrome Web Store API
- Create OAuth 2.0 credentials (Web application type) with redirect URI
https://developers.google.com/oauthplayground - Use the OAuth Playground to obtain a refresh token with scope
https://www.googleapis.com/auth/chromewebstore
For detailed instructions, see the Chrome Web Store API documentation.
See PRIVACY.md for the privacy policy.
See LICENSE.