# The role of commands/

The **commands/** folder is useful for reusable prompt workflows.

These are not automatic like hooks. Instead, they package tasks you or your team run repeatedly, such as:

* Reviewing a pull request
* Writing missing tests
* Summarizing changes for release notes
* Debugging a reported issue
* Drafting migration steps

The value of **commands/** is that it reduces repeated prompting. Instead of rewriting the same instruction every time, you store that workflow once in a clear place.

For example:

```
.claude/
└── commands/
    ├── review-pr.md
    ├── fix-bug.md
    ├── write-tests.md
    └── prepare-release-notes.md
```

Each file should have one obvious purpose. That is the key to efficiency.

#### A practical command example <a href="#fe15" id="fe15"></a>

Suppose your team often asks Claude to review backend changes before merging. Instead of writing a fresh prompt each time, you create:

```
# review-pr

Review the current changes with a focus on:
- correctness
- missing edge cases
- API contract changes
- test coverage gaps
Summarize:
1. critical issues
2. medium-risk issues
3. suggested improvements
```

Saved as:

```
.claude/
└── commands/
    └── review-pr.md
```

That immediately makes the workflow easier to reuse and easier to improve over time.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sumontas-organization.gitbook.io/claude-code-handbook-sumonta056/basics/.claude-folder/the-role-of-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
