agentleFS
advenimusadvenimus/conduit-desktop/.claude/skills/verify-mcp/SKILL.md

verify-mcp

Skill13 starsChanged 2 months agoApache-2.0View on GitHub

Run only the live MCP suite (tool list, no daily quota, MCP writes that sync to a second device, has_conflict, locked and open_elsewhere errors, two agents side by side, audit log) against the real Conduit app, its MCP server and a local Supabase. Use after changing mcp/src/, electron/ipc-server/, the MCP gatekeeper, agent session ownership, tier or quota handling, or vault lock errors, or when asked to verify MCP live. Fully isolated; takes about 1 minute.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. illinigirl/claude-code-toolkit★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If public.tiers is missing it restores the newest ~/conduit-backups/conduit-preview-*.sql (auth schema errors during that restore are …

    line 33
  2. Very specific:

    Read the failing scenario's steps, error, <device>.mcp.log and <device>.main.log.

    line 77
  3. Distinctive:

    Never make it pass by weakening an assertion, removing a check, skipping a scenario, lowering the call count or raising a timeout without a …

    line 83
  4. Very specific:

    Only the local stack on 127.0.0.1.

    line 122
  5. Very specific:

    Never touch the user's dev profile (~/Library/Application Support/conduit/conduit-dev, "Conduit Dev"), their running dev app or port 1420, …

    line 124
  6. Distinctive:

    Never answer a macOS keychain prompt.

    line 127
  7. Very specific:

    Never run supabase db reset.

    line 128

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/verify-mcp: MCP suite

Runs npm run verify:mcp (node scripts/verify/run.mjs mcp). Real Electron devices unlock vaults on a local Supabase, and a real MCP client (the built mcp/dist server over stdio) connects to each device's own socket. The harness reference is scripts/verify/README.md. Every suite at once is the verify skill.

What it proves

ScenarioIn plain words
tools-listA Free user with an unlocked vault: tools/list has the vault tools (entry_list, entry_info, entry_search, entry_update_notes, document_create, document_update, credential_list) and entry_list works.
no-daily-quotaA Free user makes 60 tool calls (the old daily cap was 50), spaced under the per-minute rate limit; none is refused and no mcp-quota.json exists in the device's HOME, app data or the cloud folder.
writes-syncOn Pro, entry_update_notes, document_create and document_update show on the device (IPC and the entry tree) and reach a second device.
has-conflictA same-field edit on two Pro devices makes entry_info return has_conflict: true; after it is resolved in the review panel it is false on both devices.
locked-and-elsewhereA manually locked vault returns code: VAULT_LOCKED with no reason; after a Free take-over from another device it returns reason: open_elsewhere and the device shows the locked-out dialog.
two-agentsTwo MCP clients on one device are two agents. Each runs commands in its own local shell; the other is refused with SESSION_IN_USE in it but can still read it; connection_list shows owner you, other_agent and free (a shell the user opened); once agent A's MCP process exits, B can use A's old shell.
auditEvery MCP call of the run is in <HOME>/.config/conduit/audit.log in order with the right outcome, an api_key argument is logged as [REDACTED], and failed calls are logged as errors. It also passes alone (--only audit).

Prerequisites (the harness checks or fixes these itself)

  • macOS or Linux, Node 20+, Docker running, mcp/ dependencies installed (preflight fails fast with the fix otherwise). The build phase compiles mcp/ into mcp/dist each run.
  • Local Supabase on 127.0.0.1:54321 (API) and :54322 (DB). A running stack with project_id conduit is reused; otherwise the harness starts one with the pinned CLI npx -y supabase@2.109.1 start --workdir ~/.cache/conduit-verify/supabase (a Homebrew supabase binary can be broken, so it is not used; SUPABASE_CLI overrides).
  • If public.tiers is missing it restores the newest ~/conduit-backups/conduit-preview-*.sql (auth schema errors during that restore are expected). It applies the sync migrations every run and checks tiers (free vault_max_open_devices=1, pro and team -1, mcp_daily_quota=-1).
  • Isolation: its own Vite on a free port (never 1420); each device in /tmp/cv-<id>/<name>/ with its own HOME (so its own audit log), app data, Chromium profile and MCP socket, --use-mock-keychain. The MCP client never touches ~/.claude.json or the user's MCP config. Test users are verify-<runId>-<n>@conduit.local.

Run it

npm run verify:mcp
node scripts/verify/run.mjs mcp --only locked-and-elsewhere            # one scenario
node scripts/verify/run.mjs mcp --only tools-list --only audit
node scripts/verify/run.mjs mcp --only audit --keep                    # keep /tmp/cv-<id> to read the audit logs

Exit code 0 means all passed including cleanup, 1 means a failure, 2 means bad arguments. Test windows appear on screen: leave them alone.

How long

About 1 minute (setup about 8 s, scenarios about 47 s; no-daily-quota alone is about 17 s because its calls are spaced for the rate limiter). Use a 10 minute timeout. A cold Supabase start can add several minutes the first time.

Read the results

The output ends with a table and RESULT: PASS|FAIL in <time> (.verify/<runId>/results.json). In .verify/<runId>/:

  • results.json: phases[], scenarios[] (status, timestamped steps, error, failure[] with per device screenshot and log tails), cleanup.
  • logs/<device>.mcp.log: the MCP server's stderr for that device; <device>.main.log shows the app side (IPC server, gatekeeper, vault guard).
  • shots/: numbered PNGs; <n>-<device>-FAIL-mcp-<scenario>.png on failure.
  • A tool error body looks like {"error":"VAULT_LOCKED: ...","code":"VAULT_LOCKED","reason":"open_elsewhere"} (built in mcp/src/tool-error.ts).
  • /tmp/cv-<id>: <id> is the last six characters of the run id (run 20260926-164136-eebd6b uses /tmp/cv-eebd6b); after --keep, results.json cleanup.keptRoots holds the exact path.

When something fails

  1. Read the failing scenario's steps, error, <device>.mcp.log and <device>.main.log. Decide: app bug, harness bug or environment (see Troubleshooting).
  2. Re-run only it: node scripts/verify/run.mjs mcp --only <scenario> (add --keep to read /tmp/cv-<id>/<device>/home/.config/conduit/audit.log).
  3. Fix the root cause and add a unit test (mcp/src/__tests__/, electron/ipc-server/__tests__/) where the code allows.
  4. Never make it pass by weakening an assertion, removing a check, skipping a scenario, lowering the call count or raising a timeout without a measured reason.
  5. A scenario that passes only sometimes is a real race: report it.
  6. Finish with the full npm run verify:mcp. Run every suite (npm run verify) only when the user asks for it or for a release candidate.

Cleanup guarantees

On pass, fail or Ctrl+C (once; twice aborts cleanup) the run closes every MCP client, quits every device, stops its Vite, deletes its test users, removes /tmp/cv-<id>/ and .verify/<runId>/dist-electron/, then kills and reports any process still mentioning the run; any leftover makes the run FAIL. Stale verify-* users older than 6 hours are deleted at the start, and .verify/ is pruned to the 20 newest run folders before the new one is made (21 after a run). Local Supabase keeps running. The build rewrites the gitignored mcp/dist/; that is expected. --keep keeps only the device roots and dist-electron/ (test users are still deleted); afterwards delete /tmp/cv-<id> and .verify/<runId>/dist-electron yourself.

Quick check afterwards: find /tmp/ -maxdepth 1 -name 'cv-*' (the trailing slash matters on macOS, where /tmp is a symlink) and ps ax | grep -F /tmp/cv- | grep -v grep both print nothing, unless another run is going.

Troubleshooting

SymptomCauseFix
Docker is not runningDocker Desktop is offStart it, wait for docker info, rerun.
supabase phase fails or the API does not answerBroken Homebrew CLI or a half-started stackKeep the pinned npx CLI. Check curl -s http://127.0.0.1:54321/auth/v1/health and docker ps --filter name=supabase_; if unhealthy, npx -y supabase@2.109.1 stop --workdir ~/.cache/conduit-verify/supabase and rerun. See logs/supabase-start.log.
public.tiers is missing and no ~/conduit-backups/conduit-preview-*.sql backup existsFresh database, no dumpAsk the user for a preview backup in ~/conduit-backups/ (docs/LOCAL_SUPABASE.md). Never create one from production.
Local Supabase schema check failedTier values wrong (for example mcp_daily_quota not -1)Read logs/supabase-migrate.log; fix the migration, not the check.
Ports 54321 or 54322 busyAnother Supabase projectlsof -nP -iTCP:54321 -sTCP:LISTEN; ask the user before stopping it.
EINVAL or connect ENOENT on the MCP socket, or too long for the MCP socket pathSocket path over 104 bytes, or the device's app is not up yetDevice names 1 to 12 characters, roots stay at /tmp/cv-<id>/<name>. Call ctx.connectMcp(device) only after launchDevice returns: the MCP server connects to the app once at startup and keeps saying "Not connected" if the app was not there.
Rate limit exceeded in a scenario that did not expect itCalls faster than mcp/src/rate-limiter.ts allowsSpace the calls; do not raise the limiter to pass.
Audit lines missingThe audit log is per HOME, written by the MCP processRead the device's home/.config/conduit/audit.log with --keep; check mcp/src/audit.ts.
Page call timeout or a macOS keychain promptA code path reached the real keychainNever answer it. Let cleanup kill the device or SIGKILL only that device's pid; fix the isolation in scripts/verify/lib/launcher.mjs.
Dependencies or psql missingInstall step skippednpm install, (cd mcp && npm install), brew install libpq or PSQL=/path/to/psql.
[cleanup] FAIL or leftover process killedA device or MCP client did not shut downRead logs/cleanup.log; fix the quit path.

Safety rules

  • Only the local stack on 127.0.0.1; never production Supabase or any cloud project; never CONDUIT_ENV=production.
  • Never touch the user's dev profile (~/Library/Application Support/conduit/conduit-dev, "Conduit Dev"), their running dev app or port 1420, ~/.claude.json, or the Conduit MCP server registered in the user's own Claude Code setup. Only the MCP clients the harness starts are used.
  • Never answer a macOS keychain prompt; only kill processes that belong to the run.
  • Never run supabase db reset; never print the service-role key or tokens.

Report back

One line with the result and time, then passed / total, then each failure with its root cause and the fix or open question, and the run folder. Quote the RESULT: line as printed; never claim a pass you did not run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.