Skip to content

Instantly share code, notes, and snippets.

@jstockdi
Created February 5, 2026 15:53
Show Gist options
  • Select an option

  • Save jstockdi/df0b89045b529f5214c563b7a2e06603 to your computer and use it in GitHub Desktop.

Select an option

Save jstockdi/df0b89045b529f5214c563b7a2e06603 to your computer and use it in GitHub Desktop.
Claude Commands Reference

Claude Commands Reference

Core Principles

1. Structured Workflows

Skills provide consistent, repeatable processes.

  • Same steps every time for predictable outcomes
  • Clear audit trail of actions taken
  • User can follow along and intervene

2. User Interaction

Skills can pause for input at decision points.

  • Use AskUserQuestion mid-flow for approvals
  • Present options when multiple paths are valid
  • Keep user in control of critical decisions

3. Autonomous Exploration

Agents work independently and return results.

  • Run in isolated context, preserve main conversation
  • Best for exploration, analysis, synthesis
  • Return structured output when complete

4. Simplicity

Prefer simple, focused commands over complex automation.

  • Each command does one thing well
  • Subcommands for variations of the same task
  • Easy to understand, debug, and modify

Skills Overview

Section Name Purpose
Environment /env Manage dev environment
Monitoring /secops Security operations dashboard
Monitoring /costs Infrastructure cost reports
Monitoring /health Infrastructure health checks
Monitoring /smoke Run smoke tests
Documentation /research Extract and publish findings
Testing /test Create test data/scans
Testing /e2e E2E UI testing

Environment

/env start|stop|status

Manage development environment.

Subcommand Action
start Stop other containers, start services, run initialization
stop Stop all project containers
status Check service health

When to use: Beginning of work session, troubleshooting.


Monitoring

/secops

Security operations dashboard.

Subcommand Purpose
threats GuardDuty threat detection findings
access IAM permission issues
audit CloudTrail suspicious activity
(default) Combined security report

When to use: Security reviews, incident response.


/costs daily|monthly|forecast

Infrastructure cost reports.

Subcommand Purpose
daily Past 3 days breakdown
monthly Month-over-month comparison
forecast Projected monthly cost

When to use: Budget reviews, cost monitoring.


/health

Infrastructure health dashboard.

Subcommand Checks
api Response times, error rates
db Query performance, connections
cache Hit rates, memory
workers Queue depth, failures
(default) Full system check

When to use: System monitoring, pre-deployment checks.


/smoke <env>

Run smoke tests against specified environment.

Environments: prod, preprod, preprod18, preprod22

When to use: Post-deployment verification.


Documentation

/research extract|publish

Extract information from documents and publish findings.

Subcommand Purpose
extract <topic> Extract and reconcile from sources
publish <topic> Publish findings to wiki

When to use: Research tasks, knowledge synthesis.


Testing

/test <name> in <environment>

Create test data or scans for development.

Default environment: preprod

When to use: QA, development testing.


/e2e <spec>

E2E UI testing with Playwright.

When to use: UI regression testing, feature verification.


Agents

Agents run autonomously in isolated context and return structured results.

Agents Overview

Section Name Purpose
Development feature Implement feature, create PR/MR
Development review Code review with structured disposition
Development fix Fix specific issues from review
Development integration Push, fix failures, resolve conflicts, merge
Monitoring triage Application error triage
Documentation discuss Explore topics, write docs

Development

feature <issue>

Analyze issue, explore codebase, implement changes, create PR/MR.

Invocation:

Task(subagent_type="feature", prompt="Implement issue #123")

Returns:

Implemented issue #123: Add validation for user input

Changes:
- Updated api/serializers.py: Added field validation
- Updated tests/test_api.py: Added validation tests

MR created: !456
URL: https://gitlab.com/org/project/-/merge_requests/456

When to use: New features, bug fixes, any issue-driven work.


review

Code review with structured disposition output.

Invocation:

Task(subagent_type="review", prompt="Review MR 456")

Returns:

Disposition: REQUEST_CHANGES

Issues:
- Missing error handling in api/views.py:142
- Test coverage incomplete for edge case

Suggestions:
- Consider extracting duplicate logic into helper

When to use: Before merging, after feature agent completes.


fix

Fix specific issues identified during review.

Invocation:

Task(subagent_type="fix", prompt="Fix the following issues in MR 456:
1. Add error handling in api/views.py:142
2. Add test for edge case")

Returns:

Fixed 2 issues:

1. Added try/except block in api/views.py:142-148
2. Added test_edge_case_empty_response in tests/test_api.py

Committed: "Fix review issues (#123)"

When to use: After review agent returns REQUEST_CHANGES.


integration

Push changes, monitor CI, fix failures, resolve conflicts, merge when ready.

Invocation:

Task(subagent_type="integration", prompt="Push and merge MR 456")

Returns:

Integration complete for MR !456

Timeline:
- Pushed to origin/123-add-user-validation
- Pipeline started: #1001
- Pipeline failed: test_api.py::test_validation
- Fixed: Updated assertion for new validation
- Re-pushed, pipeline #1002 started
- Conflict detected with main
- Resolved: Accepted both changes in api/serializers.py
- Re-pushed, pipeline #1003 passed
- MR ready to merge

URL: https://gitlab.com/org/project/-/merge_requests/456

When to use: After code is reviewed and approved.


Monitoring

triage

Application error triage with multiple data sources.

Invocation:

Task(subagent_type="triage", prompt="Triage Sentry alerts in the last 24 hours")

Returns:

## Triage Report - 2026-02-05

### New Issues (3)
- PROJECT-4521: NoneType in process_request (47 events)
- PROJECT-4519: Timeout in external_api_call (23 events)
- PROJECT-4518: KeyError in data_transform (15 events)

### Known Issues (2)
- PROJECT-4412: Rate limit exceeded (112 events) - tracked in #358
- PROJECT-4401: Connection reset (34 events) - tracked in #352
Variant Prompt
alerts "Triage Sentry alerts with >10 occurrences in 24h"
logs "Search CloudWatch logs for error patterns"
<topic> "Investigate authentication errors"

When to use: Daily triage, incident investigation.


Documentation

discuss

Explore topics and synthesize findings.

Invocation:

Task(subagent_type="discuss", prompt="Explore retry handling patterns in the codebase")

Returns:

## Retry Patterns in Codebase

### Patterns Found
1. Exponential backoff in services/api_client.py (Celery retry)
2. Fixed retry in services/scraper.py (requests retry)
3. No retry in services/external.py (potential gap)

### Inconsistencies
- Different max_retries values (3, 5, 10)
- Some use tenacity, some use native Celery

### Recommendations
- Standardize on tenacity for non-Celery retries
- Create shared retry configuration
Variant Prompt
explore <topic> "Explore how authentication works in the codebase"
adr <title> "Draft ADR for switching to PostgreSQL connection pooling"
doc <path> "Document the risk scoring module"

When to use: Before major decisions, understanding codebase, documenting architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment