add-browser-tool
Skill4 starsChanged 4 months agoMITView on GitHub
Add a browser-native or cloud tool to ZeroAgent Studio. Use for file, network, speech, provider APIs, custom script capabilities, or manifest presets.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 27
Add a preset handler in the matching src/tools/engines/<engine>Runner.ts if needed
- Very specific: line 28
Add a row to MANIFEST_TOOLS in src/tools/manifests/index.ts:
- Very specific: line 36
Add engine fixture tests in tests/tools/engines/allRunners.test.ts
- Very specific: line 57
Do not: add a switch in dag.ts or hardcode tools in NodePalette.tsx — the registry drives palette, icons, inspector labels, and execution.
- Very specific: line 83
No backend — client-only APIs (fetch, File System Access, Web Speech, Web Worker for custom script)
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.
Files
Add Tool (registry)
Choose a path
| Path | When | Files |
| Manifest preset | Simple text/JSON transform, no UI, no side effects | One row in src/tools/manifests/index.ts + engine preset in src/tools/engines/*Runner.ts |
| Curated module | File picker, mic, fetch, cloud API, custom inspector | src/tools/<tool>.ts + entry in CURATED_TOOLS inside src/tools/registry.ts |
Most new utilities should be manifest presets — the palette has 180+ manifest entries backed by shared runner engines (stringRunner, encodingRunner, hashRunner, jsonRunner, listRunner, mathRunner, dateRunner, validateRunner, flowRunner, regexRunner, generateRunner, htmlRunner, markdownRunner, csvRunner, compareRunner). Use getSiteStats() for live counts — do not hardcode.
Manifest preset (preferred for transforms)
- Add a preset handler in the matching
src/tools/engines/<engine>Runner.tsif needed - Add a row to
MANIFEST_TOOLSinsrc/tools/manifests/index.ts:
textTool('my-tool-id', 'My Tool', 'Description', '🔧', 'string', 'trim', 'text')
// or custom entry with JSON_IN / JSON_OUT for json engine- Registry auto-merges manifests via
manifestToToolDefinitions()— no manualTOOL_REGISTRYpush - Add engine fixture tests in
tests/tools/engines/allRunners.test.ts catalog.test.tsenforces ≥100 tools, unique ids, and port defs
Manifest tools get default inputs/outputs (text → text or json → text). Inspector shows description + port legend + Test button only.
Curated module (file / network / cloud / sandbox)
src/tools/<tool>.ts— implementrunwith typed ports:
run: async (inputs, config, ctx) => {
const input = getPrimaryInput(inputs)
const result = await doWork(input, config, ctx)
return singleTextOutput(result)
}src/tools/registry.ts— add one entry toCURATED_TOOLSwithinputs,outputs,paletteGroup,browserSubcategory: 'curated',requirement,run(orwrapLegacyRunduring migration)src/components/inspector/ToolInspectorFields.tsx— config fields + optional Test buttontests/tools/<tool>.test.ts— permissions denied, empty input, network/API errors
Do not add a switch in dag.ts or hardcode tools in NodePalette.tsx — the registry drives palette, icons, inspector labels, and execution.
Registry entry checklist
id: kebab-case (e.g.text-transform) — becomesToolTypeinputs/outputs:PortDef[]fromsrc/lib/ports.ts(TEXT_IN,TEXT_OUT,JSON_IN, …)paletteDragType:tool-<id>(e.g.tool-text-transform)getPaletteTutorialTarget(dragType)— addpalette-<id>target (legacy aliases kept for quests)paletteGroup:browser|cloud|custombrowserSubcategory: for browser tools —curated|text|encoding|json|list|math|date|validate|flowrequirement:{ kind: 'none' }— always available{ kind: 'browser', feature: 'speechRecognition' | 'speechSynthesis' | 'clipboard' }{ kind: 'apiKey', provider: 'groq' | 'gemini' | 'openrouter' }
run:(inputs: Record<string, PortValue>, config, ctx) => Promise<Record<string, PortValue>>
Ports & connections
- Chat: output
message(text only) - Agent: input
context(text, multiple edges OK), outputout - Tools: from registry
inputs/outputs canConnect()insrc/lib/ports.ts— json→text OK; text→json blocked at connect time- Edges persist
sourceHandle/targetHandle; legacy workflows migrate on load (src/lib/workflowMigration.ts)
Constraints
- No backend — client-only APIs (
fetch, File System Access, Web Speech, Web Worker for custom script) - Permissions: mic/file/clipboard only on explicit run; graceful cancel messages
- Scraper: text extraction; never inject raw HTML into React DOM
- Custom script: Web Worker sandbox, no network in v1, 8 KB / 8 s limits
- Log via
ctx.log→ orchestrator →debugStore(Activity log)
Validate
npm run ciManual: wire tool node → agent → chat; run on canvas.
Docs sync (user-facing changes):
| Change type | Update |
| New tool / ports | GuidePage.tsx Tools section if notable; README.md tool table if essential |
| Quest step / tool | tutorialQuests.ts, tutorialValidators.ts, Guide quests section, README quest table |
| Port rules | Guide wiring section, README typed ports, this skill |
Rules: .cursor/rules/zeroagent-engineer.mdc · .cursor/rules/zeroagent-test-engineer.mdc
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/pre-commit-quality-gate.mdcCursor rule
- .cursor/rules/release-versioning.mdcCursor rule
- .cursor/rules/zeroagent-advisor.mdcCursor rule
- .cursor/rules/zeroagent-debugger.mdcCursor rule
- .cursor/rules/zeroagent-engineer.mdcCursor rule
- .cursor/rules/zeroagent-planner.mdcCursor rule
- .cursor/rules/zeroagent-reviewer.mdcCursor rule
- .cursor/rules/zeroagent-security-auditor.mdcCursor rule
- .cursor/rules/zeroagent-test-engineer.mdcCursor rule
- add-brain-providerSkill
- pre-commit-ciSkill
- release-versioningSkill
- review-before-mergeSkill
- ship-patchSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

