Knowledges 10 min

VB-05 Level Up Your Productivity with “Commands & Hooks”!

Commands & Hooks in Claude Code: package your go-to prompts into / commands, and set up hooks so CC pings you on Telegram or literally talks when it's done. Plus the full list of commands I use every day 😁

Also in: Tiếng Việt · 中文 · 한국어 · 日本語

Here's post #05 in the “Vibe Coding with Claude Code” series! Honestly, I got a bit lazy with this one, so I'm just going to list the commands & hooks I use most 😅

(That said, at the end there are a few repos I've collected that are super handy for anyone using Claude Code, go check them out!)

VB-05 Level Up Your Productivity with “Commands & Hooks”!

What are Commands?

They're a quick way to send your own pre-made prompt templates.

Unlike CLAUDE.md or agents/*.md, which are “System Prompts”, commands are “User Prompts” — they carry a lot more “weight” and get prioritized.

For example, if there are prompts you keep typing over and over while working, you can now package them into a command and call it with / in no time.

How to create Commands

Super simple: create a Markdown file in the ~/.claude/commands folder with this structure:

markdown---
description: Describe this command
---

Write your prompt here

$ARGUMENTS

$ARGUMENTS is whatever you type after the command, inserted right at that spot (e.g. /fix Wrong default language).

There are 2 command scopes

Scope.md file locationWhere it works
Project commandsThe project's .claude/commandsOnly in that project
Global commands~/.claude/commandsEverywhere!

Pro tip: use Commands to summon Subagents

In the first “Subagents” post I mentioned that “Commands” are the best way to summon Subagents when needed. So we can build detailed, explicit workflows into each command and tailor them to our own needs and to each type of task.

Example: fix-ci.md

markdown---
description: Read, analyze, debug and fix failed Github Actions tests
---

Read, analyze, debug and fix failed Github Actions tests:

$ARGUMENTS

Workflow:
- Use the "debugger" agent to read and analyze the Github Actions logs
- Use the "planner" agent to plan the fixes
- Use the "tester" agent to test the fixes and make sure all test suites pass

The commands I use

I'm a bit lazy this time, and there isn't much more to say about “Commands” anyway, so I'll just share the list of commands I've built for Claude Code.

I've also put all the command files in this repo, together with my whole optimized Subagents setup that I'm currently using — feel free to grab whatever you need.

(If you have feedback or ideas to improve it, just contribute directly to the repo!)

Truth is, I was also “inspired” (the fancy way of saying “borrowed”) by other people's repos. One that I find really useful for Claude Code users is https://github.com/mrgoonie/claude-code-setup — give it a look!

CommandUsed forEdits code itself?
/askAsk anything about the codebase or architectureNo
/planDetailed planning with planner-researcherNo, report only
/cookImplement features / fix complex bugs with the whole agent teamYes
/fixQuick fixes for small bugsYes
/fix-testRun tests locally, fix until they passYes
/fix-ciRead Github Actions logs, plan the fixAsks for confirmation first
/testRun tests locally and reportNo
/refactorPlanned, constrained refactoringAsks for confirmation first
/debugFind the root cause of a bugNo
/watzupSummarize recent changesNo

/ask

Use this command to ask anything about the codebase.

View the /ask command
markdown---
description: Answer technical and architectural questions.
---
## Context
- Technical question or architecture challenge: $ARGUMENTS
- Relevant system documentation and design artifacts will be referenced using @ file syntax.
- Current system constraints, scale requirements, and business context will be considered.

## Your Role
You are a Senior Systems Architect providing expert consultation and architectural guidance. You focus on high-level design, strategic decisions, and architectural patterns rather than implementation details. You orchestrate four specialized architectural advisors:
1. **Systems Designer** – evaluates system boundaries, interfaces, and component interactions.
2. **Technology Strategist** – recommends technology stacks, frameworks, and architectural patterns.
3. **Scalability Consultant** – assesses performance, reliability, and growth considerations.
4. **Risk Analyst** – identifies potential issues, trade-offs, and mitigation strategies.

## Process
1. **Problem Understanding**: Analyze the technical question and gather architectural context.
2. **Expert Consultation**:
   - Systems Designer: Define system boundaries, data flows, and component relationships
   - Technology Strategist: Evaluate technology choices, patterns, and industry best practices
   - Scalability Consultant: Assess non-functional requirements and scalability implications
   - Risk Analyst: Identify architectural risks, dependencies, and decision trade-offs
3. **Architecture Synthesis**: Combine insights to provide comprehensive architectural guidance.
4. **Strategic Validation**: Ensure recommendations align with business goals and technical constraints.

## Output Format
1. **Architecture Analysis** – comprehensive breakdown of the technical challenge and context.
2. **Design Recommendations** – high-level architectural solutions with rationale and alternatives.
3. **Technology Guidance** – strategic technology choices with pros/cons analysis.
4. **Implementation Strategy** – phased approach and architectural decision framework.
5. **Next Actions** – strategic next steps, proof-of-concepts, and architectural validation points.

## Important
This command focuses on architectural consultation and strategic guidance. Do not start implementing anything.

/plan

Summons the “planner-researcher” subagent to draw up a detailed plan for implementing a feature or fixing a complex bug. REPORT only, NO execution.

markdown---
description: Research, analyze, and create implementation plans
---
Use the `planner-researcher` subagent to plan for this task: 
 $ARGUMENTS

REMEMBER: **Do not** start implementing.

Locked section: /cook

Locked section: /fix

Locked section: /fix-test

Locked section: /fix-ci

Locked section: /test

Locked section: /refactor

Locked section: /debug

Locked section: /watzup

Locked section: Hooks — what are they & what are they for?

Locked section: 1. UserPromptSubmit

Locked section: 2. PreToolUse

Locked section: 3. PostToolUse

Locked section: 4. Notification

Locked section: 5. Stop

Locked section: 6. SubagentStop

Locked section: 7. PreCompact

Locked section: 8. SessionStart

Locked section: Case 1: Get a Telegram ping when the job is done

Locked section: Case 2: TTS + Hook = Voice Assistant!

Locked section: Secret move: “Fight fire with fire”

Locked section: Sneaky trick!

Locked section: More references

Locked section: That's a wrap!

The rest is for Knowledges members

Plus 23 more sections (about 6 min) for members

You are reading roughly the first third. Knowledges, Combo and Community plans unlock paid articles in full; the Zuey AI plan reads previews only.