/webmcp-kit:connect-existing-tools [workspace path or site URL] [--non-interactive | --no-interactive-loop]from WebMCP Kit
Migrates existing WebMCP tools onto @nekuda/webmcp-sdk for AgentLane visibility without altering tool behavior. Supports SDK migration or tracking-only install.
Ships in WebMCP Kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
@nekuda/webmcp-sdk so they keep behaving exactly as they do today, and connects the site so their activity is visible in AgentLane.defineTool + registerTools — plus the single tracking field Connect writes at the entry-module seam and the one variable it sets in .env.local (the Development & Testing key; implement's connect.md step 4).references/detection.md), the fallback is a tracking-only install (references/tracking-only.md): the SDK goes in only for tool tracking, one setup call that reports every tool as it is. Tool code is unchanged; the page gains the SDK dependency, a setup module imported first and a trial script tag in the head. Both outcomes report every tool.references/tracking-only.md lists..webmcp/connect-existing-tools/baseline.json — agent state, never the developer's code, and never part of the migration commit (the same .webmcp/ carve-out the implement skill takes); and Phase B invokes tools to capture samples — read-only ones freely, state-changing ones only against a positively confirmed isolated environment, per references/inventory.md. Phase A's browser pass inspects and never invokes.references/tracking-only.md → Rollback).document.modelContext / navigator.modelContext registrations and @nekuda/webmcp-sdk — including its legacy aliases @agentlane/webmcp and @nekuda/webmcp, which are the same SDK. Any other SDK, and any tool whose defining source cannot be located, is inventoried and reported as needs manual migration. Never guess a rewrite. A tracking-only install still reports those tools: offer it for them in Phase C.stableKey already present in source is immutable — a re-run adopts what it finds and never renames it. A derived key follows references/stable-keys.md, and anything ambiguous is put to the developer as an explicit decision recorded in source, never silently picked.references/migration.md) cannot be stated without it; keep it out of progress messages and decision summaries. On a failure, say only that the connection did not finish, that the existing tools are unchanged, and that they may retry or skip. Beyond those words, lead with what the developer is trying to achieve, not implementation terms. Explain the SDK once as “the library that connects your tools to AgentLane.” Say “saved test results” for baseline, “checking that rerunning makes no extra changes” for idempotency, and “confirming activity appears in your account” for attribution. File paths, stableKey values, and other technical identifiers belong in the separate code-review details. Never expose sensitive values.Connect runs through the AgentLane MCP server that ships with this plugin (the agentlane
server), as the implement skill's connect.md describes: the developer signs in once through
the AI app, and the tools it names do the project, key and publish steps. This skill adds no
sign-in or provisioning of its own.
In the first user-facing message after reading this skill, show the goal, a short numbered journey, and what you are starting now. Do not leave the journey only in an internal plan or replace it with “I'll inspect and propose a migration.” Adapt the example to the actual request: omit completed or skipped work; for a local-only test, say once that AgentLane connection is being skipped.
The goal is to see your existing tools and their activity in AgentLane.
- Check your tools. Find them and test what they do today.
- Explain any changes. Show you what needs updating and why, before editing.
- Apply and test. Make the approved changes and check the tools again.
- Connect to AgentLane. Help you choose the account and project, if you want to connect.
- Check the result. Show what arrived and explain your next step.
Starting now: I'll inspect your site. You don't need to do anything yet.
Phase letters below organize the agent's work; do not announce “Phase A/B/C” to the developer. If no migration is needed, say so and skip those steps rather than narrating them as work. Do not front-load hypothetical approvals or a safety checklist. Explain a data-changing test only if one is actually needed, with its effect and required permission. Reuse existing authorization for the same concrete action; do not ask again just to advance a step.
At each transition, give the result, the next action, and the expected outcome in at most three short sentences. Example, only when observed: “Both tools work: searching for ‘lamp’ found Aurora task lamp, and the reservation list is empty. Next I'll show you the changes needed to connect them. You don't need to do anything until that review is ready.” Attribute browser-tool evidence as required by the host, after the plain explanation. Keep baseline paths, stable keys, and idempotency in technical details rather than narrating bookkeeping. If blocked, explain what prevents progress and recommend one next action.
During long work, report completed/total pages or tools when known and name the current check. Explicitly say when the developer needs to act; otherwise say you are continuing. Do not estimate a duration or invent a countdown. Measured elapsed time or actual counts are fine.
A — Detect. Load references/detection.md. Find every existing registration by source scan — native document.modelContext / navigator.modelContext calls, @nekuda/webmcp-sdk and its legacy aliases, and the recognizer list for known third-party SDK call shapes — then inspect the running site to catch anything registered dynamically. Classify each finding into one of four cases: already on this SDK, native, other SDK, or source unavailable. These sweeps are independent of each other: issue their Reads/Greps as one parallel batch, never one file per turn.
After detection, report the actual tool and page counts, whether changes are needed, and why. Keep the registration-scope count in the technical inventory. Example: “Found 9 tools across 4 pages. They already use the connection library, so I can check their AgentLane connection now.”
Connection-only fast path. Take this path only when at least one source-backed registration exists, every source-backed registration is case 1, and no case-2 migration is needed. Cases 3 or 4 remain in the report but can never trigger this path by themselves. Do not run the migration baseline/sample/diff cycle or Phase C's migration approval. Check the current source and configuration; record the relevant route × auth-state registration matrix and exact entry modules. Load references/migration.md, including its multi-scope amendment and the shared Connect reference it requires. If tracking needs an entry-module edit, name every current path before writing. Reuse an explicit choice from this session when it already covers those exact paths and the same tracking change; otherwise present the normal optional Connect decision. A saved connection file is configuration, not approval. A healthy connection whose current source needs no edit is reused without asking again. Then run Connect once per registration scope.
Verify every batch received the intended current configuration and observe one safe accepted call per recorded entry module. A healthy saved connection skips provisioning only: reload the recorded route/auth matrix, recheck the current configuration, and collect fresh runtime evidence. Prefer a read-only tool; use a state-changing tool only in a positively confirmed isolated environment. If no safe call exists, do not invoke one: keep the verified configuration, mark runtime attribution unverified, and report the limitation. Finish through the reporting rules below.
Tracking-only fast path. Take this path when detection found an existing trackTools setup module and the developer has not asked to rewrite the tools it reports. That earlier choice stands: do not offer the migration again, and never write a second setup module. Check the install against references/tracking-only.md (sections 1 to 3: placement, head tag, lists); a gap there is a change to name and approve as in Phase C, nothing else is proposed. A setup call that still carries debug is such a gap: the plan removes it, and Connect waits until it is gone, because debug mode sends nothing. Then run its debug check only when its lists or placement changed, and Connect with that setup module as the approved entry module, under the same reuse rules as the connection-only fast path. A case-1 batch beside it is its own registration scope on that fast path.
B — Inventory. Load references/inventory.md. Record, per tool: wire name, input schema, the pages and routes it is available on, the auth state it requires, and the handler's exact location. Browser-observed entries carry names and schemas only — a handler needs source. This inventory is the baseline Phase E diffs against, so it is captured before anything is written and never re-derived afterward from the migrated tree.
C — Propose (hard gate). Prepare the exact proposed diff before asking. Lead with four short numbered items, one sentence each: (1) what works today, (2) why this site needs a change, (3) what will change and its implications, and (4) how you will check it afterward. Explain migration as “updating how your existing tools connect.” Include relevant effects such as installing the library and its default anonymous reporting; connecting later associates activity with the chosen AgentLane project. Keep actual compatibility differences and unresolved choices in this plain summary: tools needing a developer decision are listed with the specific question and a stated default. Do not promise zero behavior changes before verification.
Keep the exact diff and file details in a separate Code review details section or a linked, readable review. Include which tools change, which are already fine, which cannot be migrated automatically and why, their stableKey values, and every affected file. Show each fact once: prefer the existing review link; otherwise show a focused diff in chat without also repeating it as replacement modules and multiple tables. The developer must be able to understand the decision from the short summary and inspect the exact changes before approving.
End with one concrete question such as “May I update these two tools to use the connection library, then test them again?”, not an unexplained “Approve migration?”. If a host requires the approval rule's source, link and quote it in one short separate paragraph after the question. Approval and those decisions are collected per the implement skill's decisions.md. Nothing is written until the developer approves. In --non-interactive mode, take the stated defaults and use the Degrade path below.
The fallback choice. The update is the recommended answer. Name the second choice in the same message, in plain words: “Or I can leave your tools exactly as they are and add one setup line that reports them,” and list which tools to report (default: all). Offer only that second choice, with the same four items, when nothing can be updated (every finding is case 3 or 4). It is a write too, so it waits for the same explicit yes; a decline of both ends the run with the inventory report. On that yes, follow references/tracking-only.md in place of Phases D and E. A mixed answer (update some tools, report others as they are) is two registration scopes, each on its own path.
D — Migrate. Load references/migration.md and references/stable-keys.md in one batch. Wrap each existing definition in defineTool with name set explicitly to the original wire name, move registration into registerTools batches at the entry-module seam, and leave the handler untouched. Tools already on this SDK need no code change at all — only the connection. Do not start optional Connect during this phase.
E — Verify migration before Connect. Load references/verify-connection.md. Re-run the inventory and diff it against the Phase-B baseline, then prove the run is idempotent by confirming a second pass proposes zero changes. If either check fails, restore every migration edit per the rollback rule before any optional Connect attempt. This check finishes before any connection configuration is written.
Optional Connect — only after Phase E. Connect itself is not re-specified here: it defers to the implement skill's Connect flow — sign-in check, project and key, readiness gate, seam edit, and the rule that a non-interactive run skips it — whose exact file references/migration.md names. That flow covers one entry module, so a site with more than one registration scope runs it once per recorded entry module, under the one per-scope amendment references/migration.md states. The same file's publish offer applies here unchanged, once per recorded entry module: the migrated tools' descriptions — never their handlers, and never a credential — become the site's catalog, so a tool is listed before anything calls it. After configuration, prove one safe real invocation per recorded entry module arrives attributed, not merely recorded. Every tool ends connected, failed, or needs manual migration, or, on a tracking-only install, in the states references/tracking-only.md names; when no safe call exists, keep it configured and out of connected. To read the developer's AgentLane account from the terminal (the Projects, agent calls), the nkd CLI also works, as the implement skill's nkd.md describes.
Finish. Give one short evidence-based report: what changed, what was verified locally, what remains unknown (especially production), and one next action. When Connect finished healthy, hand over the dashboard exactly as the implement skill's Connect flow's hand-over step says. Its View tools in AgentLane link is the dashboard_tools_url AgentLane answered, never copied from the browser's address bar: the dashboard drops ?domain= once it has selected the project, so a copied address opens whichever project the viewer last selected. If source changed, review/merge or deployment is a later action only when it fits the developer's goal; a disposable practice run ends with reviewing its test result, not a deployment instruction. Link an actual PR only when one exists. Never treat local registration, configuration, or an accepted transport call as proof that production is deployed or dashboard processing has completed.
PR, only when source changed. Branch webmcp/connect-existing-tools; conventional commit; open a PR (approved plan + per-tool result table as the body) via gh when available, else commit on the branch and hand over. Restate every needs-manual-migration tool and the reason in the summary, and — when Connect finished healthy — the dashboard links from the implement skill's Connect flow's hand-over step.
--non-interactive flag in the invocation, or an equally explicit standing instruction in the request text. Never infer it from the environment.--no-interactive-loop → human, chat-only: present the Phase-C plan in the conversation and collect approval per the implement skill's decisions.md.--non-interactive → skip the approval gate per the Degrade path, and skip Connect entirely.--non-interactive, nobody to answer the Phase-C gate → take every stated default, skip Connect, and list in the report each default that was taken and the question it stood in for. The gate is not silently satisfied; it is deferred to the PR, which is why the approved plan is the PR body.implement skill's job.--non-interactive run (whose defaults never choose it), → the inventory plus an honest needs manual migration report is a legitimate terminal outcome. Deliver it and say why; do not guess rewrites to have something to ship.references/tracking-only.md → Rollback).AGENTS.md or contributing guide, package scripts), with its own seeded test accounts; take machine facts, such as a browser this machine already runs, from its setup notes or the developer.verify skill states. A browser without it (stable Chrome with no flag) gives an empty Phase-B baseline, because a registration that checks for WebMCP once at load registers nothing there: that is no baseline, so switch to the verification browser instead of recording it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/build-webmcp-toolsDesigns, evaluates, audits, and implements WebMCP tools: client-side tools a web page exposes to in-browser AI agents on document.modelContext, via registerTool, declarative form attributes (toolname, tooldescription), React useWebMCP, or Angular provideExperimentalWebMcpTools. Use when a developer wants to make a website or web app agent-ready, analyze a site or URL for WebMCP user journeys, add or review tools for in-browser agents, write tool schemas, descriptions, annotations, or evals.json, audit existing WebMCP tools, or fix Lighthouse "Agentic browsing" and DevTools WebMCP findings. Not for backend MCP servers over stdio or SSE, or for standalone scraping scripts./implementAdd WebMCP tools to a website codebase so browser agents can act through the site's own logic instead of scraping the page. Covers the whole site in one run — every visitor journey planned together, one approval, code on @nekuda/webmcp-sdk, each tool proven in a browser. Use when asked to make a site agent-ready or WebMCP-ready, add WebMCP or document.modelContext tools to this codebase (the whole site, one flow or one tool), or implement site tools with @nekuda/webmcp-sdk. To design one tool in depth (role-play, schema.json, evals.json) or audit existing tools, use build-webmcp-tools.npx claudepluginhub nekuda-ai/webmcp-kit --plugin webmcp-kitOther plugins' skills for the same job