---
url: 'https://repomix.com/guide/custom-instructions.md'
description: >-
  Add project-specific instructions to Repomix output so AI assistants
  understand coding standards, architecture context, review goals, and response
  requirements.
---

# Custom Instructions

Repomix allows you to provide custom instructions that will be included in the output file. This can be useful for adding context or specific guidelines for AI systems processing the repository.

## Usage

To include a custom instruction, create a markdown file (e.g., `repomix-instruction.md`) in the root of your repository. Then, specify the path to this file in your `repomix.config.json`:

```json
{
  "output": {
    "instructionFilePath": "repomix-instruction.md"
  }
}
```

The content of this file will be included in the output under the "Instruction" section.

## Example

```markdown
# Repository Instructions

This repository contains the source code for the Repomix tool. Please follow these guidelines when analyzing the code:

1. Focus on the core functionality in the `src/core` directory.
2. Pay special attention to the security checks in `src/core/security`.
3. Ignore any files in the `tests` directory.
```

This will result in the following section in the output:

```xml
<instruction>
# Repository Instructions

This repository contains the source code for the Repomix tool. Please follow these guidelines when analyzing the code:

1. Focus on the core functionality in the `src/core` directory.
2. Pay special attention to the security checks in `src/core/security`.
3. Ignore any files in the `tests` directory.
</instruction>
```

## Related Resources

* [Configuration](/guide/configuration) - Set `output.instructionFilePath` in your config file
* [Output Formats](/guide/output) - Learn about the different output formats
* [Prompt Examples](/guide/prompt-examples) - Example prompts for AI analysis
* [Use Cases](/guide/use-cases) - Real-world examples of using Repomix with AI
