todo
The todo slash command automatically inserts TODO comments into code files with language-appropriate syntax. It detects priority levels from prefixes (exclamation mark for HIGH, question mark for DISCUSS) and formats comments correctly for JavaScript, Python, HTML, CSS, Shell, and other languages, positioning them logically near related code or at block starts.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/huangjia2019/claude-code-engineering/HEAD/05-Commands/projects/01-basic-commands/.claude/commands/todo.md -o ~/.claude/commands/todo.mdtodo.md
Add a TODO comment based on: $ARGUMENTS ## Priority Detection - `!` at start → HIGH priority: `// TODO [HIGH]: message` - `?` at start → DISCUSS: `// TODO [DISCUSS]: message` - No marker → Normal: `// TODO: message` ## Comment Format by Language Detect the file type and use appropriate comment syntax: - JavaScript/TypeScript: `// TODO: message` - Python: `# TODO: message` - HTML: `<!-- TODO: message -->` - CSS: `/* TODO: message */` - Shell: `# TODO: message` ## Steps 1. Identify the file context (currently open or recently edited) 2. Parse the message and detect priority 3. Format the TODO comment appropriately 4. Add at a logical location: - Near related code if context is clear - At the top of the function/block otherwise 5. Confirm the addition ## Examples Input: `/todo fix null check` Output: `// TODO: fix null check` Input: `/todo ! critical security fix` Output: `// TODO [HIGH]: critical security fix` Input: `/todo ? should we use async here` Output: `// TODO [DISCUSS]: should we use async here` ## Output Confirm briefly: ``` ✓ Added TODO at [file]:[line] ```
Review code changes for quality, security, and best practices. Proactively use this after code modifications.
Run tests and report results concisely. Use this after code changes to verify everything works.
Analyze log files and extract actionable insights. Use when troubleshooting issues or investigating incidents.
Explore and analyze API-related code. Use when investigating endpoints, routing, or HTTP handling.
Explore and analyze authentication-related code. Use when investigating auth flows, session management, or security.
Explore and analyze database-related code. Use when investigating data models, queries, or persistence.
Analyze root cause of bugs after location is identified. Second step in bug investigation.
Implement bug fixes after analysis is complete. Third step in bug fix pipeline.