원클릭으로
worker-cli
Implements Rust CLI changes (MCP tools, transports, auth commands, tests)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Implements Rust CLI changes (MCP tools, transports, auth commands, tests)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Implements widget behavior changes (config, error handling, visual indicators) and syncs all widget copies
Implements Cloudflare Worker backend changes (security, validation, auth, Stripe, rate limiting, API keys, metered billing)
Implements changes spanning both repos (widget, CI/CD, documentation, dependency cleanup)
| name | worker-cli |
| description | Implements Rust CLI changes (MCP tools, transports, auth commands, tests) |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features that modify the Rust CLI at ./cli/. This includes:
./ and ./docs/tuistory — REQUIRED when implementing or verifying any interactive CLI prompt (stdin TTY). Invoke before driving prompts like spikes init's hosted/self-host selection or spikes deploy cloudflare's hosted-warning confirmation. Each tuistory session counts as one interactiveChecks entry in the handoff. Evidence requirement: for any feature that adds or modifies an interactive prompt, your handoff's verification.interactiveChecks MUST contain at least one entry per prompt branch (e.g., both the default and non-default answers) with the full action transcript. A handoff that lacks tuistory evidence for a prompt feature will be flagged as incomplete by scrutiny.agent-browser — REQUIRED when the feature includes an end-to-end widget-in-page flow (e.g., golden-path spikes init → spikes inject → widget POST to https://spikes.sh/spikes served via widget-test-server). Use it to click the widget button, submit a test spike, and capture network logs for the live POST response. Do not substitute with curl when an assertion calls for a real browser interaction.Read the feature description thoroughly. Understand preconditions, expected behavior, and verification steps.
Understand current code. Read relevant source files in ./cli/src/. Key files:
main.rs — Command routing (clap derive). MCP already wired.commands/mcp.rs — MCP server (SpikesService, DataSource, TransportMode, all 9 tools)commands/export.rs — Export formats (EXTEND with new variants)spike.rs — Data models (Spike, Rating, SpikeType, is_resolved())storage.rs — load_spikes() reads .spikes/feedback.jsonlerror.rs — Error typesCargo.toml — DependenciesWrite tests FIRST (TDD).
#[cfg(test)] mod tests { ... } in the same file as the code being tested../cli/tests/ using assert_cmd and predicates.cd cli && cargo test — new tests MUST fail (red phase).Add dependencies if needed.
Implement the feature. Make the tests pass (green phase).
Run all tests. cd cli && cargo test — ALL tests must pass (existing + new).
Build check. cd cli && cargo build — must succeed with zero errors.
Manually verify. Run the command directly:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}\n{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}\n' | cargo run -- mcp serve 2>/dev/nullSPIKES_TOKEN=test cargo run -- mcp serve --remote 2>/dev/null (verify starts)cargo run -- mcp serve --transport http --port 3848 & then curlcargo run -- auth create-key --help (verify subcommand exists)Commit with descriptive message.
{
"salientSummary": "Rewrote MCP server using rmcp 0.17 SDK with #[tool_router] macro. Exposes get_spikes (page/rating/unresolved filters), get_element_feedback (selector), get_hotspots (limit). Added 10 unit tests for tool logic and 2 integration tests piping JSON-RPC to binary. All 172 tests pass.",
"whatWasImplemented": "Complete MCP server rewrite in cli/src/commands/mcp.rs using rmcp SDK. SpikesService struct with 3 tools via #[tool_router]. Async stdio transport. Added rmcp 0.17 and schemars 1.0 to Cargo.toml. Replaced hand-rolled JSON-RPC with SDK macros. Server info: spikes-mcp, protocol 2024-11-05.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cd cli && cargo test", "exitCode": 0, "observation": "172 tests pass including 12 new MCP tests" },
{ "command": "cd cli && cargo build", "exitCode": 0, "observation": "No errors" },
{ "command": "echo '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{}}' | cargo run -- mcp serve 2>/dev/null", "exitCode": 0, "observation": "Response contains protocolVersion, capabilities.tools, serverInfo.name=spikes-mcp" },
{ "command": "printf '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{}}\\n{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}\\n' | cargo run -- mcp serve 2>/dev/null", "exitCode": 0, "observation": "Two valid JSON responses, tools/list shows 3 tools" }
],
"interactiveChecks": []
},
"tests": {
"added": [
{
"file": "cli/src/commands/mcp.rs",
"cases": [
{ "name": "test_get_spikes_no_filter", "verifies": "returns all spikes" },
{ "name": "test_get_spikes_filter_page", "verifies": "page filter works" },
{ "name": "test_get_spikes_filter_rating", "verifies": "rating filter works" },
{ "name": "test_get_spikes_unresolved_only", "verifies": "unresolved filter works" },
{ "name": "test_get_element_feedback_by_selector", "verifies": "selector matching" },
{ "name": "test_get_element_feedback_missing_selector", "verifies": "error on missing required param" },
{ "name": "test_get_hotspots_default_limit", "verifies": "returns top 10 sorted desc" },
{ "name": "test_get_hotspots_custom_limit", "verifies": "limit parameter respected" },
{ "name": "test_get_hotspots_empty", "verifies": "no element feedback message" },
{ "name": "test_tools_list", "verifies": "3 tools returned with schemas" }
]
},
{
"file": "cli/tests/mcp_integration.rs",
"cases": [
{ "name": "test_mcp_initialize", "verifies": "JSON-RPC initialize handshake" },
{ "name": "test_mcp_sequential_requests", "verifies": "multiple requests on same connection" }
]
}
]
},
"discoveredIssues": []
}
For any CLI feature that integrates with --remote or the hosted API, you MUST verify the actual API contract before implementation:
../spikes-hosted/worker/src/index.ts to see which routes exist and their HTTP methods../spikes-hosted/worker/src/handlers/ to see request/response shapes../spikes-hosted/worker/src/schema.ts for Zod validation requirements