Skip to content

Commit 104da7f

Browse files
authored
Add prompt-snippets plugin with /ps command (#7)
* Add prompt-snippets plugin with /ps command New plugin provides quick behavioral mode switches via a single dispatcher skill. /ps noaction, /ps brief, /ps go, etc. inject short directives that persist for the conversation. Snippets are composable (/ps noaction brief) and isolated from skill-engine auto-suggestion. * Fix 3 issues from CodeRabbit review - Add prompt-snippets to Plugins list in CLAUDE.md - Add `text` language specifier to fenced code blocks (MD040) in README.md and SKILL.md --------- Co-authored-by: AnExiledDev <AnExiledDev@users.noreply.github.com>
1 parent e6c7843 commit 104da7f

File tree

7 files changed

+113
-1
lines changed

7 files changed

+113
-1
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@
7171

7272
## [v1.14.2] - 2026-02-24
7373

74+
### Added
75+
76+
#### Prompt Snippets Plugin
77+
- **New plugin: `prompt-snippets`** — single `/ps` slash command for quick behavioral mode switches (noaction, brief, plan, go, review, ship, deep, hold, recall, wait)
78+
- Snippets inject short directives that persist for the conversation (e.g., `/ps noaction` → "Investigate and report only. Take no action.")
79+
- Composable: `/ps noaction brief` applies multiple snippets at once
80+
- Isolated from skill-engine auto-suggestion (`disable-model-invocation: true`) and independently toggleable via `enabledPlugins`
81+
7482
### Changed
7583

7684
#### Docs

.devcontainer/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
9191
- **ticket-workflow** — EARS ticket workflow + auto-linking
9292
- **notify-hook** — Desktop notifications on completion
9393
- **frontend-design** (Anthropic official) — UI/frontend design skill
94+
- **prompt-snippets** — Quick behavioral mode switches via /ps command
9495

9596
## Rules System
9697

.devcontainer/config/defaults/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"spec-workflow@devs-marketplace": true,
6565
"session-context@devs-marketplace": true,
6666
"auto-code-quality@devs-marketplace": true,
67-
"workspace-scope-guard@devs-marketplace": true
67+
"workspace-scope-guard@devs-marketplace": true,
68+
"prompt-snippets@devs-marketplace": true
6869
},
6970
"autoUpdatesChannel": "latest"
7071
}

.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@
9797
"source": "./plugins/workspace-scope-guard",
9898
"category": "safety",
9999
"keywords": ["safety", "scope", "workspace"]
100+
},
101+
{
102+
"name": "prompt-snippets",
103+
"description": "Quick behavioral mode switches via /ps command",
104+
"version": "1.0.0",
105+
"source": "./plugins/prompt-snippets",
106+
"category": "productivity",
107+
"keywords": ["snippets", "prompts", "modes", "shortcuts"]
100108
}
101109
]
102110
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "prompt-snippets",
3+
"description": "Quick behavioral mode switches via /ps command.",
4+
"author": { "name": "AnExiledDev" }
5+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Prompt Snippets Plugin
2+
3+
Quick behavioral mode switches via a single `/ps` slash command.
4+
5+
## Usage
6+
7+
```text
8+
/ps [snippet-name]
9+
```
10+
11+
Type `/ps` followed by a snippet name to inject a behavioral directive for the remainder of the conversation.
12+
13+
### Available Snippets
14+
15+
| Snippet | What it does |
16+
|---------|-------------|
17+
| `noaction` | Investigate and report only — no edits, no commands |
18+
| `brief` | Concise answers, no filler |
19+
| `plan` | Plan first, don't implement until approved |
20+
| `go` | Proceed without confirmation prompts |
21+
| `review` | Audit only — report findings, don't modify |
22+
| `ship` | Commit, push, and create a PR |
23+
| `deep` | Thorough investigation, leave no stone unturned |
24+
| `hold` | Do the work but don't commit or push |
25+
| `recall` | Search session history with ccms for prior context |
26+
| `wait` | When done, stop — no suggestions or follow-ups |
27+
28+
### Composing
29+
30+
Combine snippets by listing multiple names:
31+
32+
```text
33+
/ps noaction brief
34+
```
35+
36+
## Design
37+
38+
This plugin contains a single skill (`/ps`) that uses `$ARGUMENTS` as a lookup key into a snippet table. It is:
39+
40+
- **Not auto-suggested**`disable-model-invocation: true` keeps it out of the skill engine's auto-suggestion system
41+
- **Independently toggleable** — disable via `enabledPlugins` in `settings.json` without affecting other skills
42+
- **Extensible** — add a row to the table in `skills/ps/SKILL.md` to create new snippets
43+
44+
## Adding Custom Snippets
45+
46+
Edit `skills/ps/SKILL.md` and add a row to the "Available Snippets" table:
47+
48+
```markdown
49+
| `mysnippet` | Your custom instruction here. |
50+
```
51+
52+
No other files need to change.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: ps
3+
description: Inject a behavioral prompt snippet by name.
4+
disable-model-invocation: true
5+
argument-hint: "[snippet-name]"
6+
---
7+
8+
# /ps — Prompt Snippets
9+
10+
Apply the prompt snippet matching `$ARGUMENTS` from the table below. Follow its instruction for the **remainder of this conversation** unless the user explicitly overrides it.
11+
12+
If `$ARGUMENTS` does not match any snippet name, list all available snippets and ask the user to pick one.
13+
14+
## Available Snippets
15+
16+
| Snippet | Instruction |
17+
|---------|-------------|
18+
| `noaction` | Investigate and report only. Take no action — no edits, no commands, no file writes. |
19+
| `brief` | Be concise. Short answers, no filler, no preamble. Answer the question and stop. |
20+
| `plan` | Build a plan before taking any action. Do not implement until the plan is explicitly approved. |
21+
| `go` | Proceed without asking for confirmation. Use your best judgment on all decisions. |
22+
| `review` | Review and audit only. Report findings with specific file paths and line numbers. Do not modify anything. |
23+
| `ship` | Commit all staged changes, push to remote, and create a pull request. |
24+
| `deep` | Be thorough and comprehensive. Investigate in depth, consider edge cases, leave no stone unturned. |
25+
| `hold` | Complete the current task but do not commit, push, or publish. Await my review before any git operations. |
26+
| `recall` | Search past session history with `ccms --no-color --project "$(pwd)"` to find prior decisions, discussions, and context relevant to the current task. Summarize what you find before proceeding. |
27+
| `wait` | When done, stop. Do not suggest next steps, ask follow-up questions, or continue with related work. Await further instructions. |
28+
29+
## Composing Snippets
30+
31+
Multiple snippets can be applied in one invocation by separating names with spaces:
32+
33+
```text
34+
/ps noaction brief
35+
```
36+
37+
Apply all matching snippets. If instructions conflict, the **last snippet wins** for that specific behavior.

0 commit comments

Comments
 (0)