Skip to content

Instructions

/instructions are reusable prompts. They can accept dynamic input using $arguments and reference shared @knowledge. This page explains how arguments work and how to reference knowledge in them.

Instructions work well for repeated workflows like code review (brand compliance, style checks, security review against a checklist), generating code or tests from specs or guidelines, refactoring and formatting with style guides, and producing documentation or summaries from codebases or knowledge. They also support dynamic $arguments for user input and @references to pull in static knowledge, and keep prompts in one place so your assistant always runs the latest version once published.

An instruction that gives the assistant a clear task and references shared context. When the user runs it with a code snippet, the model gets this prompt plus the content of @brand-guidelines:

Title: review-brand-compliance.md
Description: Reviews code snippets for compliance with brand guidelines.
Your review MUST be based exclusively on @brand-guidelines. Do not use other design knowledge.
When the user provides a code snippet:
1. Analyze colors, typography, and styling in the code.
2. Compare against the palettes and fonts in @brand-guidelines.
3. Report: Pass, or list issues with location and suggested fix.
Code to review: $codeSnippet

Here $codeSnippet is an argument (the user supplies the code when they run the instruction) and @brand-guidelines is referenced knowledge. To reference knowledge in an instruction, use @fileName (see Referencing knowledge in instructions).

Type $ in the editor, then the argument name, then Enter. A popover opens next to the argument.

Name: Pre-filled; edit to change the $name in the prompt.

Description: Optional; shown when the user runs the instruction.

Required: Toggle; defaults to optional. Tells MCP whether the argument must be supplied.

One instruction can cover many use cases without rewriting the prompt.

When you run an instruction that has a required argument, the assistant prompts for it before calling the model. Example: /review-brand-compliance asks for $codeSnippet, you paste the code, then the assistant loads @brand-guidelines and returns a compliance check.

In your prompt content, reference a knowledge file by name:

@fileName
Examples:
• Base your review on @brand-guidelines
• Generate this route based on @api-schema
• Use @frontend-style-guide for naming

Reference names must match the knowledge file name exactly (use @fileName syntax), including casing, and the referenced file must be published. See Knowledge for how to create and publish knowledge files.