github/awesome-copilot / skills/webmcpify
webmcpify
VerifiedWebMCP agent skill for curated core coverage or route-by-route parity — inventory an existing web app, integrate approved tools, then inspect, verify and heal them in a real browser. Use for "webmcpify", "add WebMCP", or "expose app actions to AI agents".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 31.3 KB |
| references/discovery.md | markdown | 8.5 KB |
| references/heal.md | markdown | 8.3 KB |
| references/integrate.md | markdown | 10.7 KB |
| references/inventory.md | markdown | 9.9 KB |
| references/native-compatibility.md | markdown | 5.3 KB |
| references/reverify.md | markdown | 11.3 KB |
| references/runtime.md | markdown | 8.7 KB |
| references/security.md | markdown | 5.0 KB |
| references/verify.md | markdown | 15.4 KB |
| references/workbench.md | markdown | 5.0 KB |
| scripts/workbench.mjs | script | 5.6 KB |
| templates/mutation-journal.js | script | 22.3 KB |
| templates/mutation-journal.ts | script | 25.8 KB |
| templates/webmcp-compat.js | script | 2.5 KB |
| templates/webmcp-jsx.d.ts | script | 2.3 KB |
| templates/webmcp-workbench.js | script | 37.9 KB |
| templates/webmcp.d.ts | script | 6.1 KB |
| templates/webmcp.spec.ts | script | 18.9 KB |
| templates/webmcpify.js | script | 12.0 KB |
| templates/webmcpify.ts | script | 12.5 KB |
| templates/well-known-webmcp.json | config | 1.2 KB |
| tests/README.md | markdown | 1.3 KB |
| tests/workbench-cli.test.mjs | script | 4.5 KB |
| tests/workbench.test.mjs | script | 5.4 KB |
tests/workbench.test.mjs
View on GitHubimport { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const { JSDOM } = require('jsdom');
const original = await readFile(new URL('../templates/webmcp-workbench.js', import.meta.url), 'utf8');
// Expose the private dispatch boundary only in the test copy, to verify that a
// forged UI event or direct dispatch cannot bypass the disabled button.
const source = original.replace(' element: host,', ' testExecute: execute,\n element: host,');
for (const transport of ['native', 'simulated']) {
for (const surface of ['imperative', 'declarative']) {
test(`${transport} ${surface}: read-only dispatch and fail-closed mutation boundary`, async () => {
const dom = new JSDOM('<!doctype html><body></body>', { url: 'https://app.example.test', runScripts: 'outside-only', pretendToBeVisual: true });
const evaluate = (fn, args) => dom.window.eval(`(${fn.toString()})(${JSON.stringify(args) ?? ''})`);
try {
await evaluate(({ transport, surface }) => {
window.calls = []; window.events = []; window.probes = 0;
const classes = ['read', 'client', 'server', 'unknown', 'undeclared', 'denied', 'skipped'];
window.entries = classes.map(name => ({ id: name, status: name === 'denied' ? 'rejected' : name === 'skipped' ? 'skipped' : 'integrated', ...(name === 'unknown' || name === 'undeclared' ? {} : { mutating: ['read', 'denied', 'skipped'].includes(name) ? false : name }), inputSchema: { type: 'object', properties: { q: { type: 'string' } } }, examples: { valid: { q: 'hello' } } }));
window.entries.push({ id: 'absent', status: 'integrated', mutating: false });
if (surface === 'declarative') {
for (const name of classes) {
const form = document.createElement('form'); form.setAttribute('toolname', name);
form.innerHTML = '<input name="q"><button type="submit">Submit</button>';
form.addEventListener('submit', e => { e.preventDefault(); calls.push(name); });
for (const type of ['input', 'change']) form.addEventListener(type, () => events.push(name));
document.body.append(form);
}
}
if (transport === 'native') {
const registry = new Map();
document.modelContext = {
async registerTool(tool, options = {}) { if (tool.name.startsWith('webmcpify_input_probe_')) probes++; registry.set(tool.name, tool); options.signal?.addEventListener('abort', () => registry.delete(tool.name)); },
async getTools() { return [...registry.values()]; },
async executeTool(tool, args) { return registry.get(tool.name).execute(args); },
};
}
}, { transport, surface });
dom.window.eval(source);
await evaluate(async ({ transport, surface }) => {
window.instance = WebMCPifyWorkbench.start({ manifest: { tools: entries.filter(e => e.id !== 'undeclared') }, open: true });
if (surface === 'imperative' || transport === 'native') {
for (const entry of entries.filter(e => e.id !== 'absent')) {
await document.modelContext.registerTool({ name: entry.id, inputSchema: entry.inputSchema,
...(surface === 'declarative' ? { _declarativeForm: document.querySelector(`form[toolname="${entry.id}"]`) } : {}),
execute: args => { calls.push(entry.id); return { ok: true, args }; } });
}
}
// An observed tool absent from the manifest must also fail closed.
await document.modelContext.registerTool({ name: 'outsider', annotations: { readOnlyHint: true }, execute: () => calls.push('outsider') });
await instance.refresh();
}, { transport, surface });
const root = dom.window.document.querySelector('#webmcpify-workbench').shadowRoot;
for (const name of ['client', 'server', 'unknown', 'undeclared', 'denied', 'skipped', 'absent', 'outsider']) {
root.querySelector(`.tool-row[data-name="${name}"]`).click();
assert.equal(root.querySelector('.run').disabled, true, name);
await evaluate(async () => {
const run = instance.element.shadowRoot.querySelector('.run');
run.disabled = false; run.dispatchEvent(new Event('click'));
await instance.testExecute();
});
assert.deepEqual(JSON.parse(JSON.stringify(await evaluate(() => ({ calls, events })))), { calls: [], events: [] }, name);
}
assert.equal(await evaluate(() => probes), 0, 'blocked tools must not reach input-contract probing');
root.querySelector('.tool-row[data-name="read"]').click();
assert.equal(root.querySelector('.run').disabled, false);
root.querySelector('.run').click();
for (let i = 0; i < 50 && !root.querySelector('.result-meta').textContent.includes('Succeeded'); i++) await new Promise(resolve => setTimeout(resolve, 10));
assert.match(root.querySelector('.result-meta').textContent, /Succeeded/);
assert.deepEqual(Array.from(await evaluate(() => calls)), ['read']);
if (surface === 'declarative') assert.deepEqual(Array.from(await evaluate(() => events)), ['read', 'read']);
assert.equal(root.querySelectorAll('dialog').length, 0);
await evaluate(() => instance.destroy());
} finally { dom.window.close(); }
});
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |