Home | Markdown | Gemini

Meta slash-commands to manage prompts, skills, and context for coding agents



Published at 2026-02-14T13:44:45+02:00, last updated Tue 17 Feb 14:00:00 EET 2026

I work on many small, repeatable tasks. Instead of retyping the same instructions every time, I want to turn successful prompts into reusable slash-commands and keep background knowledge in loadable context files. This post describes a set of *meta* slash-commands: commands that create, update, and delete other commands, context files, and skills. They live as markdown in a dotfiles repo and work with any coding agent that supports slash-commands—Claude Code CLI, Cursor Agent, OpenCode, Ampcode, and others.

Updated Tue 17 Feb: Added section about skill management commands and the differences between commands and skills

    ┌─────────────────────────────────────────────────────────────┐
    │  Cursor Agent                                    [~][□][X]  │
    ├─────────────────────────────────────────────────────────────┤
    │                                                             │
    │   → /load-context api-guidelines                            │
    │                                                             │
    │   Context loaded: api-guidelines.md                         │
    │   Ready. Ask me to implement something.                     │
    │                                                             │
    │   → /create-skill docker-compose                            │
    │                                                             │
    │   Analyzing "docker-compose"...                              │
    │   Generated: SKILL.md with frontmatter + instructions.      │
    │   Save to skills/docker-compose/ ? [Y]                      │
    │                                                             │
    │   ✓ Saved. Use /docker-compose anytime.                     │
    │                                                             │
    └─────────────────────────────────────────────────────────────┘
                          │
                          │  slash-commands & skills
                          ▼
    ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐
    │ /load-   │  │ /create- │  │ /create- │  │ /docker-  │
    │ context  │  │ command  │  │ skill    │  │ compose   │
    └──────────┘  └──────────┘  └──────────┘  └──────────┘
         │              │              │              │
         └──────────────┴──────────────┴──────────────┘
                              │
                    coding agent executes
                    your prompt library

Table of Contents




Motivation: collecting prompts for later re-use



When I use a coding agent, I often find myself repeating the same kind of request: "review this function," "explain this error," "add tests for this module," "format this as a blog post" and may other cases. Typing long prompts from scratch is tedious, and ad-hoc prompts are easy to forget. I'd rather capture what works and reuse it.

The solution is to treat prompts as first-class artefacts: store them as markdown files (one file per slash-command or per context), and use a small set of *meta* commands to manage them. The agent then creates, updates, or deletes these files through conversation—no hand-editing of markdowns. I can say /create-command review-code we just did a code review and the agent generates the command file based on the current agent's context, shows a preview, and saves it. Later I run /review-code and get a consistent workflow every time.

Because everything is just markdown in directories (commands/ for commands, skills/ for skills, and context/ for context), I can version it in git, sync it across machines, and gradually build a library of prompts. When a command grows too complex for a single file, I promote it to a skill—a structured directory with YAML frontmatter, a "When to Use" section, and detailed instructions.

Loading whole context before asking the agent to do something



A separate but related need is *context*: background information the agent should have before I ask it to do anything. For example, I might have a document describing our Kubernetes setup, API conventions, or the architecture of a specific service. If I ask "add a new endpoint for X" without that context, the agent guesses and without having a reference to an existing project with an AGENTS.md. If I first load the relevant context file, the agent knows the naming conventions, the existing patterns, and the infrastructure—and its edits are more accurate.

So I keep three kinds of artefacts:


The use case is: start a session, run /load-context api-guidelines (or whatever context name), then ask the agent to implement a feature or fix a bug. The agent already knows the guidelines. No need to paste a wall of text every time; the context is on demand.

Works with any coding agent that supports slash-commands



I use different agents depending on the task: Claude Code CLI, Cursor Agent (CLI), OpenCode, Ampcode and others. What they have in common is support for custom slash-commands (or the ability to read prompt files). My meta-commands, skills, and context files are just markdown; there is no lock-in. Point your agent at the same directories and you get the same prompts, skills, and context. I don't need an MCP server returning prompts right now—the files on disk are enough.

Commands that manage slash-commands



These meta-commands create, update, and delete other slash-commands. The target files live in ~/Notes/Prompts/commands/ (or your chosen path). Each command is one .md file. You can see the commands (and the context files) here:

https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/

/create-command



Creates a new slash-command by inferring its purpose from the name you give.


Example usage:

/create-command review-code
/create-command explain-error

/update-command



Updates an existing slash-command step by step.


Example usage:

/update-command create-command
/update-command review-code

/delete-command



Removes a slash-command by deleting its definition file.


Example usage:

/delete-command testing
/delete-command review-code

Commands vs skills: when to use which



Commands and skills both produce reusable slash-commands, but they differ in structure and intent:

| Aspect          | Command                        | Skill                                  |
|-----------------|--------------------------------|----------------------------------------|
| File layout     | Single .md file in commands/   | Directory with SKILL.md in skills/     |
| Metadata        | Markdown heading + description | YAML frontmatter (name, description)   |
| Structure       | Free-form prompt text          | "When to Use" + structured instructions|
| Complexity      | Simple, single-purpose prompts | Multi-step workflows, domain knowledge |
| Extra files     | No                             | Yes (can include supporting files)     |
| Best for        | Quick one-shot tasks           | Rich, repeatable processes             |

Use a **command** when you need a quick, single-purpose prompt—something like "review this PR" or "explain this error." Use a **skill** when the workflow is more involved: it needs structured instructions, domain-specific knowledge, or multiple steps that the agent should follow in order. For example, my go-best-practices skill contains detailed conventions for project structure, naming, error handling, and testing—far more than would fit comfortably in a flat command file.

The YAML frontmatter in skills (name and description between --- fences at the top of the file) is what makes skills discoverable by the coding agent. When the agent starts a session, it scans the skills directory and reads the frontmatter to build a list of available skills—without having to parse the entire file. The name field gives the skill its slash-command name, and the description tells the agent (and the user) what the skill does, so the agent can suggest the right skill for a given task. Commands don't need this metadata because they are simpler: the filename *is* the command name, and the first heading serves as the description.

In practice, I start with a command and promote it to a skill once it grows beyond a simple prompt.

Commands that manage skills



These meta-commands create, update, and delete skills. Skills live in ~/Notes/Prompts/skills/, each in its own directory containing a SKILL.md file with YAML frontmatter.

/create-skill



Creates a new skill by inferring its purpose from the name you give.


Example usage:

/create-skill docker-compose
/create-skill rust-conventions

/update-skill



Updates an existing skill step by step.


Example usage:

/update-skill go-best-practices
/update-skill compose-blog-post

/delete-skill



Removes a skill by deleting its entire directory.


Example usage:

/delete-skill docker-compose
/delete-skill rust-conventions

Commands that manage context files



These meta-commands create, update, delete, and *load* context files. Context files live in ~/Notes/Prompts/context/. Loading a context injects its content into the conversation so the agent can use it for subsequent requests.

/create-context



Creates a new context file.


Example usage:

/create-context epimetheus
/create-context api-guidelines

/update-context



Updates an existing context file by adding, modifying, or removing content.


Example usage:

/update-context epimetheus
/update-context api-guidelines
/update-context

/delete-context



Deletes a context file after confirmation.


Example usage:

/delete-context epimetheus
/delete-context old-api-guidelines
/delete-context

/load-context



Loads a context file into the conversation so the agent has that background for subsequent requests.


Example usage:

/load-context epimetheus
/load-context api-guidelines
/load-context

Summary



| Meta-command       | Purpose                                      | Good for                                          |
|--------------------|----------------------------------------------|---------------------------------------------------|
| /create-command    | Create new slash-command from name           | Turning current or recurring tasks into commands  |
| /update-command    | Edit existing slash-command                  | Refining commands over time                       |
| /delete-command    | Remove slash-command file                    | Cleaning up unused commands                       |
| /create-skill      | Create new skill with structured instructions| Building rich, multi-step workflows               |
| /update-skill      | Edit existing skill                          | Refining skills as conventions evolve             |
| /delete-skill      | Remove skill directory                       | Cleaning up experimental or unused skills         |
| /create-context    | Create new context file                      | Capturing project/infra knowledge once            |
| /update-context    | Edit existing context file                   | Keeping context up to date                        |
| /delete-context    | Remove context file                          | Removing outdated context                         |
| /load-context      | Load context into conversation               | Giving the agent background before tasks          |

Context is what the agent *knows*; commands and skills are what the agent *does*—commands for simple prompts, skills for structured multi-step workflows. All three are markdown files you can create, update, and delete on the fly through the same coding agent—Claude Code CLI, Cursor Agent, OpenCode, Ampcode, or any other that supports slash-commands or prompt files. Start with commands for quick tasks, promote to skills when complexity grows, and load context when the agent needs background knowledge.

Other related posts:

2026-02-14 Meta slash-commands to manage prompts, skills, and context for coding agents (You are currently reading this)
2026-02-02 A tmux popup editor for Cursor Agent CLI prompts

E-Mail your comments to paul@nospam.buetow.org :-)

Back to the main site