Skip to content

Commit 1af11c3

Browse files
idoubiclaude
andcommitted
feat: 78 slash commands — bughunter, commit-push-pr, keybindings, thinkback, privacy, and more
New commands: - /bughunter: deep systematic bug investigation - /commit-push-pr: commit + push + create PR in one step - /pr-comments: review PR comments and suggest responses - /keybindings: show all keyboard shortcuts - /release-notes: show version history - /reload-plugins: reload plugins from disk - /thinkback: reflect on completed work - /statusline: status line info - /privacy: privacy information (local-only, no telemetry) - /issue: report bugs with guided template - /upgrade: alias for codeany update 78 slash commands total, 6776 lines Go code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 23e8452 commit 1af11c3

2 files changed

Lines changed: 124 additions & 0 deletions

File tree

internal/slash/commands.go

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,95 @@ func (h *Handler) colorCmd(args []string) Result {
15391539
return Result{Message: "Color settings:\n\n Current: dark (default)\n\n Use /theme dark or /theme light to switch themes.\n Custom colors are not yet supported."}
15401540
}
15411541

1542+
// ─── /bughunter ───────────────────────────────────
1543+
1544+
func (h *Handler) bughunterCmd(args []string) Result {
1545+
target := strings.Join(args, " ")
1546+
if target == "" {
1547+
return Result{Message: "Usage: /bughunter <description or file>\n\nDeep investigation mode: systematically hunt for bugs."}
1548+
}
1549+
return Result{
1550+
SkillPrompt: fmt.Sprintf("Deep bug investigation for: %s\n\n1. Read relevant code thoroughly\n2. Trace the execution path\n3. Check edge cases and error handling\n4. Look for race conditions, null checks, off-by-ones\n5. Verify assumptions in tests\n6. Report ALL bugs found with severity and fix suggestions", target),
1551+
}
1552+
}
1553+
1554+
// ─── /commit-push-pr ──────────────────────────────
1555+
1556+
func (h *Handler) commitPushPrCmd(args []string) Result {
1557+
desc := strings.Join(args, " ")
1558+
prompt := "Do all of these in sequence:\n1. Review git diff, stage changes, create a commit with good message\n2. Push the branch to remote\n3. Create a pull request using `gh pr create`"
1559+
if desc != "" {
1560+
prompt += fmt.Sprintf("\n\nContext: %s", desc)
1561+
}
1562+
return Result{SkillPrompt: prompt}
1563+
}
1564+
1565+
// ─── /pr-comments ─────────────────────────────────
1566+
1567+
func (h *Handler) prCommentsCmd(args []string) Result {
1568+
prNum := ""
1569+
if len(args) > 0 {
1570+
prNum = args[0]
1571+
}
1572+
prompt := "Review the comments on the current pull request."
1573+
if prNum != "" {
1574+
prompt = fmt.Sprintf("Review comments on PR #%s.", prNum)
1575+
}
1576+
prompt += "\nSummarize the feedback and suggest responses or code changes."
1577+
return Result{SkillPrompt: prompt}
1578+
}
1579+
1580+
// ─── /keybindings ─────────────────────────────────
1581+
1582+
func (h *Handler) keybindingsCmd(args []string) Result {
1583+
return Result{Message: "Keybindings:\n\n Enter Send message\n Shift+Enter New line\n Ctrl+C Cancel / Exit\n Ctrl+D Exit (empty input)\n Ctrl+L Clear conversation\n Ctrl+O Toggle expand tool output\n Up/Down History / Scroll\n PgUp/PgDown Scroll viewport\n Tab Complete slash command\n Esc Clear input / cancel\n ! <cmd> Run shell command\n\nDuring query:\n Enter Queue message (btw)\n j/k Scroll up/down\n g/G Top/bottom\n\nCustom keybindings coming in a future version.\nConfig: ~/.codeany/keybindings.json (not yet supported)"}
1584+
}
1585+
1586+
// ─── /release-notes ───────────────────────────────
1587+
1588+
func (h *Handler) releaseNotesCmd(args []string) Result {
1589+
return Result{Message: "Codeany Release Notes\n\nv0.8.0 — 66 commands, SDK v0.5.0\n - /agents /tasks /rewind /brief /share /insights /passes\n - Turn completion verbs, effort control\n - 30+ new built-in tools from SDK\n\nv0.7.0 — SDK v0.5.0 upgrade\n - EnterPlanMode, TeamCreate, Worktree, Cron, LSP tools\n - Effort levels, fallback model, file checkpointing\n\nv0.6.0 — OpenAI model support\n - GPT, DeepSeek, Ollama, OpenRouter, custom providers\n - Interactive /login wizard\n\nv0.5.0 — /btw, plan mode, plugins\nv0.4.0 — Teams, worktrees, subagents\nv0.3.0 — Permissions, hooks, session persistence\n\nFull changelog: https://github.com/codeany-ai/codeany/releases"}
1590+
}
1591+
1592+
// ─── /reload-plugins ──────────────────────────────
1593+
1594+
func (h *Handler) reloadPluginsCmd(args []string) Result {
1595+
allPlugins := plugins.LoadAll(config.GlobalConfigDir())
1596+
return Result{Message: fmt.Sprintf("✓ Reloaded %d plugins", len(allPlugins))}
1597+
}
1598+
1599+
// ─── /thinkback ───────────────────────────────────
1600+
1601+
func (h *Handler) thinkbackCmd(args []string) Result {
1602+
return Result{
1603+
SkillPrompt: "Reflect on what was just accomplished in this session:\n1. What tasks were completed?\n2. What approach was taken?\n3. Were there any issues or trade-offs?\n4. What could be improved?\n5. Any follow-up tasks needed?\n\nBe concise and actionable.",
1604+
}
1605+
}
1606+
1607+
// ─── /statusline ──────────────────────────────────
1608+
1609+
func (h *Handler) statuslineCmd(args []string) Result {
1610+
return Result{Message: "Status line shows:\n Model · Permission mode · Cost · Tokens ↑↓ · MCP connections · Scroll %\n\nThe header shows: codeany · model · session duration\n\nCustomization not yet available. Coming soon."}
1611+
}
1612+
1613+
// ─── /privacy ─────────────────────────────────────
1614+
1615+
func (h *Handler) privacyCmd(args []string) Result {
1616+
return Result{Message: "Privacy:\n\n • Conversations are stored locally in ~/.codeany/sessions/\n • API calls go directly to your configured provider\n • No telemetry or analytics are collected\n • No data is shared with third parties\n • API keys are stored in ~/.codeany/settings.json (0600 permissions)\n • Session data never leaves your machine\n\nClear all data: rm -rf ~/.codeany/"}
1617+
}
1618+
1619+
// ─── /issue ───────────────────────────────────────
1620+
1621+
func (h *Handler) issueCmd(args []string) Result {
1622+
desc := strings.Join(args, " ")
1623+
if desc == "" {
1624+
return Result{Message: "Report issues at: https://github.com/codeany-ai/codeany/issues\n\nOr use: /issue <description> to pre-fill"}
1625+
}
1626+
return Result{
1627+
SkillPrompt: fmt.Sprintf("The user wants to report this issue: %s\n\nHelp them draft a good bug report with:\n1. Steps to reproduce\n2. Expected vs actual behavior\n3. Environment info (run codeany version)\n4. Suggest opening at https://github.com/codeany-ai/codeany/issues", desc),
1628+
}
1629+
}
1630+
15421631
// ─── helpers ──────────────────────────────────────
15431632

15441633
func min(a, b int) int {

internal/slash/slash.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,19 @@ func AllCommands() []CommandDef {
134134
{Name: "/onboarding", Description: "First-time project setup"},
135135
// Analysis
136136
{Name: "/insights", Description: "Code insights and analysis", HasArgs: true},
137+
// More Git
138+
{Name: "/bughunter", Description: "Deep bug investigation", HasArgs: true},
139+
{Name: "/commit-push-pr", Description: "Commit + push + create PR", HasArgs: true},
140+
{Name: "/pr-comments", Description: "Review PR comments", HasArgs: true},
141+
// Info
142+
{Name: "/keybindings", Description: "Show keyboard shortcuts"},
143+
{Name: "/release-notes", Description: "Show release notes"},
144+
{Name: "/reload-plugins", Description: "Reload all plugins"},
145+
{Name: "/thinkback", Description: "Reflect on completed work"},
146+
{Name: "/statusline", Description: "Status line info"},
147+
{Name: "/privacy", Description: "Privacy information"},
148+
{Name: "/issue", Description: "Report a bug/issue", HasArgs: true},
149+
{Name: "/upgrade", Description: "Alias for update"},
137150
}
138151
}
139152

@@ -311,6 +324,28 @@ func (h *Handler) Handle(input string) Result {
311324
return h.onboardingCmd(args)
312325
case "/insights":
313326
return h.insightsCmd(args)
327+
case "/bughunter":
328+
return h.bughunterCmd(args)
329+
case "/commit-push-pr":
330+
return h.commitPushPrCmd(args)
331+
case "/pr-comments":
332+
return h.prCommentsCmd(args)
333+
case "/keybindings":
334+
return h.keybindingsCmd(args)
335+
case "/release-notes":
336+
return h.releaseNotesCmd(args)
337+
case "/reload-plugins":
338+
return h.reloadPluginsCmd(args)
339+
case "/thinkback":
340+
return h.thinkbackCmd(args)
341+
case "/statusline":
342+
return h.statuslineCmd(args)
343+
case "/privacy", "/privacy-settings":
344+
return h.privacyCmd(args)
345+
case "/issue":
346+
return h.issueCmd(args)
347+
case "/upgrade":
348+
return Result{Message: "Run `codeany update` from the command line to upgrade."}
314349
default:
315350
// Try skill invocation
316351
if result, ok := h.HandleSkillInvocation(cmd, args); ok {

0 commit comments

Comments
 (0)