MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getPromptForCommand

Function getPromptForCommand

src/commands/init-verifiers.ts:11–259  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 progressMessage: 'analyzing your project and creating verifier skills',
10 source: 'builtin',
11 async getPromptForCommand() {
12 return [
13 {
14 type: 'text',
15 text: `Use the TodoWrite tool to track your progress through this multi-step task.
16
17## Goal
18
19Create one or more verifier skills that can be used by the Verify agent to automatically verify code changes in this project or folder. You may create multiple verifiers if the project has different verification needs (e.g., both web UI and API endpoints).
20
21**Do NOT create verifiers for unit tests or typechecking.** Those are already handled by the standard build/test workflow and don't need dedicated verifier skills. Focus on functional verification: web UI (Playwright), CLI (Tmux), and API (HTTP) verifiers.
22
23## Phase 1: Auto-Detection
24
25Analyze the project to detect what's in different subdirectories. The project may contain multiple sub-projects or areas that need different verification approaches (e.g., a web frontend, an API backend, and shared libraries all in one repo).
26
271. **Scan top-level directories** to identify distinct project areas:
28 - Look for separate package.json, Cargo.toml, pyproject.toml, go.mod in subdirectories
29 - Identify distinct application types in different folders
30
312. **For each area, detect:**
32
33 a. **Project type and stack**
34 - Primary language(s) and frameworks
35 - Package managers (npm, yarn, pnpm, pip, cargo, etc.)
36
37 b. **Application type**
38 - Web app (React, Next.js, Vue, etc.) → suggest Playwright-based verifier
39 - CLI tool → suggest Tmux-based verifier
40 - API service (Express, FastAPI, etc.) → suggest HTTP-based verifier
41
42 c. **Existing verification tools**
43 - Test frameworks (Jest, Vitest, pytest, etc.)
44 - E2E tools (Playwright, Cypress, etc.)
45 - Dev server scripts in package.json
46
47 d. **Dev server configuration**
48 - How to start the dev server
49 - What URL it runs on
50 - What text indicates it's ready
51
523. **Installed verification packages** (for web apps)
53 - Check if Playwright is installed (look in package.json dependencies/devDependencies)
54 - Check MCP configuration (.mcp.json) for browser automation tools:
55 - Playwright MCP server
56 - Chrome DevTools MCP server
57 - Claude Chrome Extension MCP (browser-use via Claude's Chrome extension)
58 - For Python projects, check for playwright, pytest-playwright
59
60## Phase 2: Verification Tool Setup
61
62Based on what was detected in Phase 1, help the user set up appropriate verification tools.
63
64### For Web Applications
65
661. **If browser automation tools are already installed/configured**, ask the user which one they want to use:
67 - Use AskUserQuestion to present the detected options
68 - Example: "I found Playwright and Chrome DevTools MCP configured. Which would you like to use for verification?"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected