Skip to content

Commit 43fc2ff

Browse files
kurtstohrerclaude
andcommitted
Add MCP preference directions to annotask-apply skill, v0.0.29
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 298ff9c commit 43fc2ff

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "annotask",
3-
"version": "0.0.28",
3+
"version": "0.0.29",
44
"description": "Visual UI design tool for web apps. Make changes in the browser and generate structured reports that AI agents can apply to source code. Works with Vue, React, Svelte, and plain HTML via Vite or Webpack.",
55
"license": "MIT",
66
"type": "module",

skills/annotask-apply/SKILL.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ Use this skill when the user says:
1414

1515
Annotask is a visual markup tool that integrates with Vite and Webpack. The user annotates the page with pins, sticky notes, arrows, text highlights, and drawn sections. These become **tasks** stored in `.annotask/tasks.json` and served via API. This skill fetches pending tasks, applies them, and marks them for review.
1616

17+
## MCP preference
18+
19+
If you have `annotask_*` MCP tools available, prefer them over CLI commands — they return structured data directly, are faster, and avoid shell/npx issues. If MCP tools are not available, use the CLI commands shown below.
20+
1721
## Steps
1822

1923
### 0. Check server status
2024

25+
**MCP:** If you have MCP tools, the server is already running — skip this step.
26+
2127
```bash
2228
npx annotask status
2329
```
@@ -26,6 +32,8 @@ If this fails, the Annotask dev server isn't running. Ask the user to start it.
2632

2733
### 1. Fetch pending tasks
2834

35+
**MCP:** `annotask_get_tasks(status: "pending")` — returns compact summaries. Use `detail: true` for full objects.
36+
2937
```bash
3038
npx annotask tasks
3139
```
@@ -37,12 +45,14 @@ Response (compact task summaries):
3745

3846
Each task summary has: `id`, `type`, `status`, `description`, `file`, `line`, and optionally `component`, `action`, `screenshot`, `feedback` (on denied tasks), `blocked_reason`, `resolution`.
3947

40-
For full task details (context, element_context, viewport, interaction_history, agent_feedback), use the `annotask_get_task` MCP tool with a specific task ID. Only fetch full details when the summary doesn't provide enough context to apply the change.
48+
For full task details (context, element_context, viewport, interaction_history, agent_feedback), use `annotask_get_task` MCP tool or `npx annotask tasks --pretty`. Only fetch full details when the summary doesn't provide enough context to apply the change.
4149

4250
### Screenshot reference
4351

4452
Some tasks include a `screenshot` field. The screenshot shows exactly what the user sees in the browser. To view it:
4553

54+
**MCP:** `annotask_get_screenshot(task_id: "TASK_ID")` — returns base64-encoded PNG directly.
55+
4656
```bash
4757
npx annotask screenshot TASK_ID
4858
```
@@ -57,6 +67,8 @@ Filter for `status: "pending"` and `status: "denied"` (with `feedback`) tasks. A
5767

5868
Mark it `in_progress` so the user sees you're working on it:
5969

70+
**MCP:** `annotask_update_task(task_id: "TASK_ID", status: "in_progress")`
71+
6072
```bash
6173
npx annotask update-task TASK_ID --status=in_progress
6274
```
@@ -97,6 +109,8 @@ Read the task type and apply accordingly:
97109

98110
If you are **genuinely stuck** — missing API context, unclear library usage, ambiguous intent that could lead to a wrong implementation — ask the user for clarification instead of guessing:
99111

112+
**MCP:** `annotask_update_task(task_id: "TASK_ID", questions: [{"id":"q1","text":"Which auth library should I use?","type":"choice","options":["NextAuth","Clerk","Custom"]},{"id":"q2","text":"Where is the session config located?","type":"text"}])`
113+
100114
```bash
101115
npx annotask update-task TASK_ID --ask='{"message":"Optional markdown context","questions":[{"id":"q1","text":"Which auth library should I use?","type":"choice","options":["NextAuth","Clerk","Custom"]},{"id":"q2","text":"Where is the session config located?","type":"text"}]}'
102116
```
@@ -111,12 +125,14 @@ This sets the task to `needs_info` status. The user sees your questions in the A
111125
- Only ask when you truly cannot proceed — do not ask for confirmation on straightforward tasks
112126
- Be specific: "Which CSS framework should I use for the grid?" is better than "How should I do this?"
113127
- Combine related questions into a single ask rather than multiple rounds
114-
- After asking, move on to the next task. Come back to check answers later via `npx annotask tasks`
128+
- After asking, move on to the next task. Come back to check answers later via `annotask_get_tasks` MCP tool or `npx annotask tasks`
115129

116130
#### d. Mark as blocked (when the task can't be done)
117131

118132
If the task is **fundamentally outside your control** — a performance issue in a third-party library, an accessibility bug in a dependency, a config change that requires infrastructure access, etc. — mark it as blocked with an explanation:
119133

134+
**MCP:** `annotask_update_task(task_id: "TASK_ID", blocked_reason: "This layout shift is caused by vue-router v4's async route loading. Needs upstream fix or a loading skeleton wrapper — cannot be resolved by editing component code alone.")`
135+
120136
```bash
121137
npx annotask update-task TASK_ID --blocked-reason="This layout shift is caused by vue-router v4's async route loading. Needs upstream fix or a loading skeleton wrapper — cannot be resolved by editing component code alone."
122138
```
@@ -131,6 +147,8 @@ This sets the task to `blocked` status automatically. The user sees your explana
131147

132148
As soon as you finish applying **this** task, mark it for review with a brief resolution note:
133149

150+
**MCP:** `annotask_update_task(task_id: "TASK_ID", status: "review", resolution: "Swapped grid to flexbox, added gap-4 for spacing")`
151+
134152
```bash
135153
npx annotask update-task TASK_ID --status=review --resolution="Swapped grid to flexbox, added gap-4 for spacing"
136154
```

src/mcp/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function stripVisual(task: unknown): Record<string, unknown> {
5555
}
5656

5757
const PROTOCOL_VERSION = '2025-03-26'
58-
const SERVER_INFO = { name: 'annotask', version: '0.0.28' }
58+
const SERVER_INFO = { name: 'annotask', version: '0.0.29' }
5959

6060
const VALID_TRANSITIONS: Record<string, Set<string>> = {
6161
pending: new Set(['in_progress', 'denied']),

0 commit comments

Comments
 (0)