diff options
| -rw-r--r-- | gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi | 121 | ||||
| -rw-r--r-- | gemfeed/atom.xml | 132 | ||||
| -rw-r--r-- | gemfeed/index.gmi | 2 | ||||
| -rw-r--r-- | index.gmi | 2 |
4 files changed, 211 insertions, 46 deletions
diff --git a/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi b/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi index 0c088f04..179c263e 100644 --- a/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi +++ b/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi @@ -1,8 +1,10 @@ -# Meta slash-commands to manage prompts and context for coding agents +# Meta slash-commands to manage prompts, skills, and context for coding agents -> Published at 2026-02-14T13:44:45+02:00 +> 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 and context files. 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. +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 ``` ┌─────────────────────────────────────────────────────────────┐ @@ -14,31 +16,32 @@ I work on many small, repeatable tasks. Instead of retyping the same instruction │ Context loaded: api-guidelines.md │ │ Ready. Ask me to implement something. │ │ │ - │ → /create-command review-pr │ + │ → /create-skill docker-compose │ │ │ - │ Analyzing "review-pr"... │ - │ Generated: description + prompt. Save to commands/ ? [Y] │ + │ Analyzing "docker-compose"... │ + │ Generated: SKILL.md with frontmatter + instructions. │ + │ Save to skills/docker-compose/ ? [Y] │ │ │ - │ ✓ Saved. Use /review-pr anytime. │ + │ ✓ Saved. Use /docker-compose anytime. │ │ │ └─────────────────────────────────────────────────────────────┘ │ - │ slash-commands + │ slash-commands & skills ▼ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ - │ /load- │ │ /create- │ │ /update- │ │ /review- │ - │ context │ │ command │ │ command │ │ pr │ + │ /load- │ │ /create- │ │ /create- │ │ /docker- │ + │ context │ │ command │ │ skill │ │ compose │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ └──────────────┴──────────────┴──────────────┘ │ coding agent executes - your prompt library + your prompt library ``` ## Table of Contents -* ⇢ Meta slash-commands to manage prompts and context for coding agents +* ⇢ Meta slash-commands to manage prompts, skills, and context for coding agents * ⇢ ⇢ Motivation: collecting prompts for later re-use * ⇢ ⇢ Loading whole context before asking the agent to do something * ⇢ ⇢ Works with any coding agent that supports slash-commands @@ -46,6 +49,11 @@ I work on many small, repeatable tasks. Instead of retyping the same instruction * ⇢ ⇢ ⇢ `/create-command` * ⇢ ⇢ ⇢ `/update-command` * ⇢ ⇢ ⇢ `/delete-command` +* ⇢ ⇢ Commands vs skills: when to use which +* ⇢ ⇢ Commands that manage skills +* ⇢ ⇢ ⇢ `/create-skill` +* ⇢ ⇢ ⇢ `/update-skill` +* ⇢ ⇢ ⇢ `/delete-skill` * ⇢ ⇢ Commands that manage context files * ⇢ ⇢ ⇢ `/create-context` * ⇢ ⇢ ⇢ `/update-context` @@ -59,29 +67,29 @@ When I use a coding agent, I often find myself repeating the same kind of reques 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 a directory (e.g. `~/Notes/Prompts/commands/` for commands and `~/Notes/Prompts/context/` for context), I can version it in git, sync it across machines, and gradually build a library of prompts. If the number of commands grows too large, I might later split them into skills or expose them via a searchable MCP server—but for now, a flat directory of `.md` files is enough. +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 two kinds of artefacts: +So I keep three kinds of artefacts: -* Commands — Reusable workflows (e.g. "review code", "explain error"). They live as `.md` files in a `commands/` directory. Meta-commands create, update, and delete them. +* Commands — Reusable workflows (e.g. "review code", "explain error"). They live as single `.md` files in a `commands/` directory. Meta-commands create, update, and delete them. Commands are simple: one file, one prompt. They work with any coding agent. +* Skills — Richer, more structured artefacts than commands. Each skill lives in its own directory (e.g. `skills/go-best-practices/SKILL.md`) and includes YAML frontmatter with metadata (name, description), a "When to Use" section, and detailed multi-step instructions. Skills can include additional files alongside the `SKILL.md`. They are the right choice when a workflow needs more structure, domain knowledge, or multiple steps. * Context — Reusable background (project rules, API notes, infrastructure docs, personas). They live as `.md` files in a `context/` directory. I can create, update, delete, and—importantly—*load* them. Loading a context file injects that content into the conversation so the agent has it in mind for subsequent requests. -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 (not implicit like with skills). +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 and context files are just markdown; there is no lock-in. Point your agent at the same directories and you get the same prompts and context. I don't need an MCP server returning prompts right now—the files on disk are enough. If slash-commands ever become too many to manage in a flat list, I may later introduce an MCP server to expose them as skills or searchable prompts. +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/commands -=> https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/context +=> https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/ ### `/create-command` @@ -128,6 +136,76 @@ Example usage: /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. + +* Parameter: `skill_name` (e.g. `docker-compose`, `rust-conventions`) +* What it does: The agent analyses the name, infers intent, creates a directory `skills/{{skill_name}}/`, generates a `SKILL.md` with YAML frontmatter (`name`, `description`), a "When to Use" section, and detailed instructions. Shows a preview before saving. +* Good for: Creating structured, multi-step workflows that need more organisation than a simple command. + +Example usage: + +``` +/create-skill docker-compose +/create-skill rust-conventions +``` + +### `/update-skill` + +Updates an existing skill step by step. + +* Parameter: `skill_name` (e.g. `go-best-practices`, `compose-blog-post`) +* What it does: Reads the existing `SKILL.md`, shows its current content, asks what to change (description, "When to Use" section, instructions), applies edits, shows a preview, and saves. +* Good for: Refining a skill after real-world usage or when conventions evolve. + +Example usage: + +``` +/update-skill go-best-practices +/update-skill compose-blog-post +``` + +### `/delete-skill` + +Removes a skill by deleting its entire directory. + +* Parameter: `skill_name` (e.g. `docker-compose`, `rust-conventions`) +* What it does: Verifies the skill exists, shows what will be deleted, asks for confirmation, then removes the `skills/{{skill_name}}/` directory. +* Good for: Cleaning up experimental or unused skills. + +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. @@ -203,13 +281,16 @@ Example usage: | /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 are what the agent *does*. Both 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. That's why these meta-commands are useful for ad-hoc creation, updating, and deleting of prompts and context without leaving the conversation. +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: diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index e9917473..a339fed4 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <updated>2026-02-15T14:11:06+02:00</updated> + <updated>2026-02-17T08:41:08+02:00</updated> <title>foo.zone feed</title> <subtitle>To be in the .zone!</subtitle> <link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" /> @@ -253,22 +253,24 @@ mage test </content> </entry> <entry> - <title>Meta slash-commands to manage prompts and context for coding agents</title> + <title>Meta slash-commands to manage prompts, skills, and context for coding agents</title> <link href="gemini://foo.zone/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi" /> <id>gemini://foo.zone/gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi</id> - <updated>2026-02-14T13:44:45+02:00</updated> + <updated>2026-02-14T13:44:45+02:00, last updated Tue 17 Feb 14:00:00 EET 2026</updated> <author> <name>Paul Buetow aka snonux</name> <email>paul@dev.buetow.org</email> </author> - <summary>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 and context files. 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.</summary> + <summary>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.</summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> - <h1 style='display: inline' id='meta-slash-commands-to-manage-prompts-and-context-for-coding-agents'>Meta slash-commands to manage prompts and context for coding agents</h1><br /> + <h1 style='display: inline' id='meta-slash-commands-to-manage-prompts-skills-and-context-for-coding-agents'>Meta slash-commands to manage prompts, skills, and context for coding agents</h1><br /> <br /> -<span class='quote'>Published at 2026-02-14T13:44:45+02:00</span><br /> +<span class='quote'>Published at 2026-02-14T13:44:45+02:00, last updated Tue 17 Feb 14:00:00 EET 2026</span><br /> <br /> -<span>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 and context files. 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.</span><br /> +<span>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.</span><br /> +<br /> +<span class='quote'>Updated Tue 17 Feb: Added section about skill management commands and the differences between commands and skills</span><br /> <br /> <pre> ┌─────────────────────────────────────────────────────────────┐ @@ -280,32 +282,33 @@ mage test │ Context loaded: api-guidelines.md │ │ Ready. Ask me to implement something. │ │ │ - │ → /create-command review-pr │ + │ → /create-skill docker-compose │ │ │ - │ Analyzing "review-pr"... │ - │ Generated: description + prompt. Save to commands/ ? [Y] │ + │ Analyzing "docker-compose"... │ + │ Generated: SKILL.md with frontmatter + instructions. │ + │ Save to skills/docker-compose/ ? [Y] │ │ │ - │ ✓ Saved. Use /review-pr anytime. │ + │ ✓ Saved. Use /docker-compose anytime. │ │ │ └─────────────────────────────────────────────────────────────┘ │ - │ slash-commands + │ slash-commands & skills ▼ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ - │ /load- │ │ /create- │ │ /update- │ │ /review- │ - │ context │ │ command │ │ command │ │ pr │ + │ /load- │ │ /create- │ │ /create- │ │ /docker- │ + │ context │ │ command │ │ skill │ │ compose │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ └──────────────┴──────────────┴──────────────┘ │ coding agent executes - your prompt library + your prompt library </pre> <br /> <h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br /> <br /> <ul> -<li><a href='#meta-slash-commands-to-manage-prompts-and-context-for-coding-agents'>Meta slash-commands to manage prompts and context for coding agents</a></li> +<li><a href='#meta-slash-commands-to-manage-prompts-skills-and-context-for-coding-agents'>Meta slash-commands to manage prompts, skills, and context for coding agents</a></li> <li>⇢ <a href='#motivation-collecting-prompts-for-later-re-use'>Motivation: collecting prompts for later re-use</a></li> <li>⇢ <a href='#loading-whole-context-before-asking-the-agent-to-do-something'>Loading whole context before asking the agent to do something</a></li> <li>⇢ <a href='#works-with-any-coding-agent-that-supports-slash-commands'>Works with any coding agent that supports slash-commands</a></li> @@ -313,6 +316,11 @@ mage test <li>⇢ ⇢ <a href='#create-command'><span class='inlinecode'>/create-command</span></a></li> <li>⇢ ⇢ <a href='#update-command'><span class='inlinecode'>/update-command</span></a></li> <li>⇢ ⇢ <a href='#delete-command'><span class='inlinecode'>/delete-command</span></a></li> +<li>⇢ <a href='#commands-vs-skills-when-to-use-which'>Commands vs skills: when to use which</a></li> +<li>⇢ <a href='#commands-that-manage-skills'>Commands that manage skills</a></li> +<li>⇢ ⇢ <a href='#create-skill'><span class='inlinecode'>/create-skill</span></a></li> +<li>⇢ ⇢ <a href='#update-skill'><span class='inlinecode'>/update-skill</span></a></li> +<li>⇢ ⇢ <a href='#delete-skill'><span class='inlinecode'>/delete-skill</span></a></li> <li>⇢ <a href='#commands-that-manage-context-files'>Commands that manage context files</a></li> <li>⇢ ⇢ <a href='#create-context'><span class='inlinecode'>/create-context</span></a></li> <li>⇢ ⇢ <a href='#update-context'><span class='inlinecode'>/update-context</span></a></li> @@ -326,30 +334,30 @@ mage test <br /> <span>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 <span class='inlinecode'>/create-command review-code we just did a code review</span> and the agent generates the command file based on the current agent's context, shows a preview, and saves it. Later I run <span class='inlinecode'>/review-code</span> and get a consistent workflow every time.</span><br /> <br /> -<span>Because everything is just markdown in a directory (e.g. <span class='inlinecode'>~/Notes/Prompts/commands/</span> for commands and <span class='inlinecode'>~/Notes/Prompts/context/</span> for context), I can version it in git, sync it across machines, and gradually build a library of prompts. If the number of commands grows too large, I might later split them into skills or expose them via a searchable MCP server—but for now, a flat directory of <span class='inlinecode'>.md</span> files is enough.</span><br /> +<span>Because everything is just markdown in directories (<span class='inlinecode'>commands/</span> for commands, <span class='inlinecode'>skills/</span> for skills, and <span class='inlinecode'>context/</span> 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.</span><br /> <br /> <h2 style='display: inline' id='loading-whole-context-before-asking-the-agent-to-do-something'>Loading whole context before asking the agent to do something</h2><br /> <br /> <span>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 <span class='inlinecode'>AGENTS.md</span>. 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.</span><br /> <br /> -<span>So I keep two kinds of artefacts:</span><br /> +<span>So I keep three kinds of artefacts:</span><br /> <br /> <ul> -<li>Commands — Reusable workflows (e.g. "review code", "explain error"). They live as <span class='inlinecode'>.md</span> files in a <span class='inlinecode'>commands/</span> directory. Meta-commands create, update, and delete them.</li> +<li>Commands — Reusable workflows (e.g. "review code", "explain error"). They live as single <span class='inlinecode'>.md</span> files in a <span class='inlinecode'>commands/</span> directory. Meta-commands create, update, and delete them. Commands are simple: one file, one prompt. They work with any coding agent.</li> +<li>Skills — Richer, more structured artefacts than commands. Each skill lives in its own directory (e.g. <span class='inlinecode'>skills/go-best-practices/SKILL.md</span>) and includes YAML frontmatter with metadata (name, description), a "When to Use" section, and detailed multi-step instructions. Skills can include additional files alongside the <span class='inlinecode'>SKILL.md</span>. They are the right choice when a workflow needs more structure, domain knowledge, or multiple steps.</li> <li>Context — Reusable background (project rules, API notes, infrastructure docs, personas). They live as <span class='inlinecode'>.md</span> files in a <span class='inlinecode'>context/</span> directory. I can create, update, delete, and—importantly—*load* them. Loading a context file injects that content into the conversation so the agent has it in mind for subsequent requests.</li> </ul><br /> -<span>The use case is: start a session, run <span class='inlinecode'>/load-context api-guidelines</span> (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 (not implicit like with skills).</span><br /> +<span>The use case is: start a session, run <span class='inlinecode'>/load-context api-guidelines</span> (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.</span><br /> <br /> <h2 style='display: inline' id='works-with-any-coding-agent-that-supports-slash-commands'>Works with any coding agent that supports slash-commands</h2><br /> <br /> -<span>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 and context files are just markdown; there is no lock-in. Point your agent at the same directories and you get the same prompts and context. I don't need an MCP server returning prompts right now—the files on disk are enough. If slash-commands ever become too many to manage in a flat list, I may later introduce an MCP server to expose them as skills or searchable prompts.</span><br /> +<span>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.</span><br /> <br /> <h2 style='display: inline' id='commands-that-manage-slash-commands'>Commands that manage slash-commands</h2><br /> <br /> <span>These meta-commands create, update, and delete other slash-commands. The target files live in <span class='inlinecode'>~/Notes/Prompts/commands/</span> (or your chosen path). Each command is one <span class='inlinecode'>.md</span> file. You can see the commands (and the context files) here:</span><br /> <br /> -<a class='textlink' href='https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/commands'>https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/commands</a><br /> -<a class='textlink' href='https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/context'>https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/context</a><br /> +<a class='textlink' href='https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/'>https://codeberg.org/snonux/dotfiles/src/branch/master/prompts/</a><br /> <br /> <h3 style='display: inline' id='create-command'><span class='inlinecode'>/create-command</span></h3><br /> <br /> @@ -399,6 +407,79 @@ mage test /delete-command review-code </pre> <br /> +<h2 style='display: inline' id='commands-vs-skills-when-to-use-which'>Commands vs skills: when to use which</h2><br /> +<br /> +<span>Commands and skills both produce reusable slash-commands, but they differ in structure and intent:</span><br /> +<br /> +<pre> +| 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 | +</pre> +<br /> +<span>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 <span class='inlinecode'>go-best-practices</span> skill contains detailed conventions for project structure, naming, error handling, and testing—far more than would fit comfortably in a flat command file.</span><br /> +<br /> +<span>The YAML frontmatter in skills (<span class='inlinecode'>name</span> and <span class='inlinecode'>description</span> between <span class='inlinecode'>---</span> 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 <span class='inlinecode'>name</span> field gives the skill its slash-command name, and the <span class='inlinecode'>description</span> 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.</span><br /> +<br /> +<span>In practice, I start with a command and promote it to a skill once it grows beyond a simple prompt.</span><br /> +<br /> +<h2 style='display: inline' id='commands-that-manage-skills'>Commands that manage skills</h2><br /> +<br /> +<span>These meta-commands create, update, and delete skills. Skills live in <span class='inlinecode'>~/Notes/Prompts/skills/</span>, each in its own directory containing a <span class='inlinecode'>SKILL.md</span> file with YAML frontmatter.</span><br /> +<br /> +<h3 style='display: inline' id='create-skill'><span class='inlinecode'>/create-skill</span></h3><br /> +<br /> +<span>Creates a new skill by inferring its purpose from the name you give.</span><br /> +<br /> +<ul> +<li>Parameter: <span class='inlinecode'>skill_name</span> (e.g. <span class='inlinecode'>docker-compose</span>, <span class='inlinecode'>rust-conventions</span>)</li> +<li>What it does: The agent analyses the name, infers intent, creates a directory <span class='inlinecode'>skills/{{skill_name}}/</span>, generates a <span class='inlinecode'>SKILL.md</span> with YAML frontmatter (<span class='inlinecode'>name</span>, <span class='inlinecode'>description</span>), a "When to Use" section, and detailed instructions. Shows a preview before saving.</li> +<li>Good for: Creating structured, multi-step workflows that need more organisation than a simple command.</li> +</ul><br /> +<span>Example usage:</span><br /> +<br /> +<pre> +/create-skill docker-compose +/create-skill rust-conventions +</pre> +<br /> +<h3 style='display: inline' id='update-skill'><span class='inlinecode'>/update-skill</span></h3><br /> +<br /> +<span>Updates an existing skill step by step.</span><br /> +<br /> +<ul> +<li>Parameter: <span class='inlinecode'>skill_name</span> (e.g. <span class='inlinecode'>go-best-practices</span>, <span class='inlinecode'>compose-blog-post</span>)</li> +<li>What it does: Reads the existing <span class='inlinecode'>SKILL.md</span>, shows its current content, asks what to change (description, "When to Use" section, instructions), applies edits, shows a preview, and saves.</li> +<li>Good for: Refining a skill after real-world usage or when conventions evolve.</li> +</ul><br /> +<span>Example usage:</span><br /> +<br /> +<pre> +/update-skill go-best-practices +/update-skill compose-blog-post +</pre> +<br /> +<h3 style='display: inline' id='delete-skill'><span class='inlinecode'>/delete-skill</span></h3><br /> +<br /> +<span>Removes a skill by deleting its entire directory.</span><br /> +<br /> +<ul> +<li>Parameter: <span class='inlinecode'>skill_name</span> (e.g. <span class='inlinecode'>docker-compose</span>, <span class='inlinecode'>rust-conventions</span>)</li> +<li>What it does: Verifies the skill exists, shows what will be deleted, asks for confirmation, then removes the <span class='inlinecode'>skills/{{skill_name}}/</span> directory.</li> +<li>Good for: Cleaning up experimental or unused skills.</li> +</ul><br /> +<span>Example usage:</span><br /> +<br /> +<pre> +/delete-skill docker-compose +/delete-skill rust-conventions +</pre> +<br /> <h2 style='display: inline' id='commands-that-manage-context-files'>Commands that manage context files</h2><br /> <br /> <span>These meta-commands create, update, delete, and *load* context files. Context files live in <span class='inlinecode'>~/Notes/Prompts/context/</span>. Loading a context injects its content into the conversation so the agent can use it for subsequent requests.</span><br /> @@ -478,13 +559,16 @@ mage test | /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 | </pre> <br /> -<span>Context is what the agent *knows*; commands are what the agent *does*. Both 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. That's why these meta-commands are useful for ad-hoc creation, updating, and deleting of prompts and context without leaving the conversation.</span><br /> +<span>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.</span><br /> <br /> <span>Other related posts:</span><br /> <br /> diff --git a/gemfeed/index.gmi b/gemfeed/index.gmi index 4bb03eed..c9eb415d 100644 --- a/gemfeed/index.gmi +++ b/gemfeed/index.gmi @@ -3,7 +3,7 @@ ## To be in the .zone! => ./2026-02-15-loadbars-resurrected-from-perl-to-go.gmi 2026-02-15 - Loadbars resurrected: From Perl to Go after 15 years -=> ./2026-02-14-meta-slash-commands-for-prompts-and-context.gmi 2026-02-14 - Meta slash-commands to manage prompts and context for coding agents +=> ./2026-02-14-meta-slash-commands-for-prompts-and-context.gmi 2026-02-14 - Meta slash-commands to manage prompts, skills, and context for coding agents => ./2026-02-02-tmux-popup-editor-for-cursor-agent-prompts.gmi 2026-02-02 - A tmux popup editor for Cursor Agent CLI prompts => ./2026-01-01-using-supernote-nomad-offline.gmi 2026-01-01 - Using Supernote Nomad offline => ./2026-01-01-posts-from-july-to-december-2025.gmi 2026-01-01 - Posts from July to December 2025 @@ -31,7 +31,7 @@ Everything you read on this site is my personal opinion and experience. You can ### Posts => ./gemfeed/2026-02-15-loadbars-resurrected-from-perl-to-go.gmi 2026-02-15 - Loadbars resurrected: From Perl to Go after 15 years -=> ./gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi 2026-02-14 - Meta slash-commands to manage prompts and context for coding agents +=> ./gemfeed/2026-02-14-meta-slash-commands-for-prompts-and-context.gmi 2026-02-14 - Meta slash-commands to manage prompts, skills, and context for coding agents => ./gemfeed/2026-02-02-tmux-popup-editor-for-cursor-agent-prompts.gmi 2026-02-02 - A tmux popup editor for Cursor Agent CLI prompts => ./gemfeed/2026-01-01-using-supernote-nomad-offline.gmi 2026-01-01 - Using Supernote Nomad offline => ./gemfeed/2026-01-01-posts-from-july-to-december-2025.gmi 2026-01-01 - Posts from July to December 2025 |
