Skip to content

Instructions

/instructions are reusable prompts that help teams standardise how they interact with connected tools and apply consistent guidelines. They can be simple static prompts, dynamic prompts that accept user input, or prompts that reference @knowledge.

Common uses for /instructions include:

Code generation

  • Generate API endpoints, components, or routes using @knowledge schemas and $arguments for customisation

Code review and refactoring

  • Review code against style guides, refactor using @knowledge standards, or validate against domain rules

Documentation and explanation

  • Explain API behaviour or clarify system architecture using @knowledge references

Specification and planning

  • Create feature specifications, plan implementations, or define requirements using team standards and @knowledge workflows

How /instructions help in context engineering

Section titled “How /instructions help in context engineering”

Selecting a published /instruction applies your team’s guidelines, workflows, and best practices automatically. No more typing the same prompts over and over.

  • Consistency - Uniform output quality across the team
  • Efficiency - No need to remember or retype complex prompts
  • Maintainability - Update once in Sokket, changes propagate to all connected tools
  • Discoverability - Browse available /instructions in your tools

Arguments make /instructions dynamic by accepting user input. Type $variableName in your /instruction content to create arguments. The Properties panel updates automatically. You can’t manually create arguments from the panel.

e.g.

  • Generate a component called $componentName
  • Review this code: $codeSnippet
  • Create an API endpoint for $resourceType

Users are prompted for argument values before the /instruction runs, making prompts reusable across different scenarios.

References pull @knowledge files into your /instructions, giving the AI access to static reference material like API schemas, style guides, or documentation.

Type @knowledgeFileName in your /instruction content to reference @knowledge files.

e.g.

  • Refactor this code using @frontend-style-guide
  • Generate a new API route based on @api-schema
  • Draft an error message for $errorCode using @standard-api-error-codes

Reference names must match the @knowledge file name exactly, including spelling and casing.

References are optional. /instructions can work as standalone prompts, use only arguments, use only references, or combine both. Referenced @knowledge files must be published.

/instructions must provide metadata to the tool, as defined by the Model Context Protocol (MCP) standard. This metadata is managed in the Properties panel of the /instruction editor.

  1. From a library, add + Instruction
  2. Give it a file name (e.g., build-route.md)
  3. In the editor, write your prompt
    • Type $variableName to create arguments (optional)
    • Type @knowledgeFile to reference @knowledge files (optional)
  4. Fill out the Properties panel: Description is required. If you use arguments, each argument’s Description and Required? toggle are required
  5. Select Publish to make it available in connected tools

As you type in the editor, this panel updates automatically. Published /instructions are sent to the MCP endpoint and visible in connected tools. Drafts are visible only in the Sokket web app.

Details

  • Name: The Instruction name
  • Description: (MCP Requirement) Required. The human-readable description your team will see in their tool. The /instruction cannot be published without it.

Arguments (only appears if you type $variableName in your content)

  • Typing $variableName in the editor automatically adds an entry in the Properties panel.
  • Description: (MCP Requirement) Required for each argument before publishing. Tells the user what to type (e.g., “The name of the component to create”). Without this, you cannot publish the /instruction and users will see a blank prompt.
  • Required? (toggle): (MCP Requirement) Must be set for each argument. Choose Required to force the tool to prompt the user for this value, or Optional to make it optional. The /instruction cannot be published until this toggle is set for all arguments.

References (only appears if you type @knowledgeFile in your content)

  • Typing @knowledgeFile in the editor creates a reference (e.g., @frontend-style-guide).
  • All @references must resolve to existing, published @knowledge files. The /instruction cannot be published with broken references.
  • Description: (Optional) Explain why this @knowledge file is being referenced.

The Publish button is disabled when mandatory fields are missing. Check the Properties panel: all /instructions must have a Description, all Arguments must have their own Description and Required? toggle set, and all @references must resolve to existing, published @knowledge files.

A new /instruction is not appearing in a connected tool. The /instruction is likely still a Draft. Only Published items are sent to the MCP endpoint.

A /instruction runs, but the tool doesn’t ask for an argument. The Required? toggle for that argument is likely set to Optional. Set it to Required to mark it as mandatory.

An @knowledge file reference fails. The referenced @knowledge file is not published, or the reference name doesn’t match the filename exactly (check spelling and casing). Publish the @knowledge file or fix the reference name, then republish the /instruction.

Learn more about @knowledge, context engineering, or connect tools.