Skip to content

Instructions

Instructions are reusable prompt templates stored in Sokket. They can take input with $variableName and load shared documentation with @knowledge-file. This page explains how to create an Instruction, how parameters and knowledge references work, how metadata is applied, and how your AI-assistant runs the final prompt.

A simple /instruction that generates unit tests based on a function definition and shared testing guidelines.

Title: generate-tests.md
Description: Generate unit tests for the following function.
Follow the principles defined in @testing-guidelines.
Tests should include:
- expected inputs
- edge cases
- error handling
Function:
$functionCodeName

This demonstrates:

  • $functionCodeName as an input parameter
  • @testing-guidelines as referenced knowledge
  • Everything else is prompt content your AI-assistant sends to the model.
  1. In a library, select + /instruction
  2. Name the file (for example generate-tests.md)
  3. Add your content
    • Use $variableName for input parameters
    • Use @fileName for knowledge references
  4. Open the Properties panel
    • Add a description
    • Add descriptions for each parameter
    • Mark parameters as required or optional
  5. Select Publish to expose the /instruction to AI-assistants
  • You create and publish /instructions
  • Sokket exposes them using MCP prompts/list and prompts/get
  • Parameters and references are stored as metadata
  • Knowledge files must be published before referencing them

When you run an /instruction, the assistant:

  1. Lists Instructions from your MCP server
  2. Fetches the selected Instruction and metadata
  3. Prompts the user for required parameters
  4. Loads referenced knowledge via resources/read
  5. Builds the final resolved prompt
  6. Sends the prompt to the model and returns the output

Visit FAQs.

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