[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-browserbase-optimize-agent-prompt":3,"mdc--uie6fu-key":34,"related-repo-browserbase-optimize-agent-prompt":891,"related-org-browserbase-optimize-agent-prompt":1011},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"optimize-agent-prompt","optimize Browserbase agent system prompts","Builds and improves Browserbase Agent API demos through an Autobrowse-style outer loop: run a fixed task, collect Agent messages and session logs, score the result, revise one system-prompt heuristic, and confirm convergence. Use when creating a Browserbase Agents demo or POC, optimizing an Agent system prompt, diagnosing flaky Agent runs, or applying auto-research\u002Fautobrowse to the Browserbase Agents API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"browserbase","Browserbase","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fbrowserbase.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Prompt Engineering","prompt-engineering","tag",{"name":17,"slug":18,"type":15},"Automation","automation",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Agents","agents",3649,"https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills","2026-08-19T03:58:55.207379","MIT",232,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"Browserbase's official collection of agent skills to access the web.","https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Foptimize-agent-prompt","---\nname: optimize-agent-prompt\ndescription: \"Builds and improves Browserbase Agent API demos through an Autobrowse-style outer loop: run a fixed task, collect Agent messages and session logs, score the result, revise one system-prompt heuristic, and confirm convergence. Use when creating a Browserbase Agents demo or POC, optimizing an Agent system prompt, diagnosing flaky Agent runs, or applying auto-research\u002Fautobrowse to the Browserbase Agents API.\"\nlicense: MIT\nallowed-tools: Bash Read Write Edit Grep Glob\n---\n\n# Optimize Agent Prompt\n\nOptimize a Browserbase Agent's `systemPrompt` while holding its task, result schema, variables, and evaluation criteria fixed. Treat the outer agent as the teacher and each Browserbase Agent run as an inner-agent rollout.\n\nUse Node.js 18 or later and set `BROWSERBASE_API_KEY`. The harness uses only Node.js built-in modules.\n\n## Set up the experiment\n\nChoose a short experiment name and create an isolated workspace inside the demo or POC repository:\n\n```bash\nnode \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs init \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --name \u003Cexperiment-name>\n```\n\nEdit the generated files:\n\n- `task.json`: keep `task`, `resultSchema`, variables, browser settings, and evaluation oracle stable across iterations.\n- `prompts\u002Fiteration-001.md`: write the minimal baseline system prompt. Include irreversible-action guardrails when applicable.\n\nUse concrete success criteria. Prefer a strict JSON Schema with required fields and `null` for unavailable facts. Add known-field regexes and factuality-warning regexes under `evaluation` when a truth oracle exists. Read [references\u002Fevaluation.md](references\u002Fevaluation.md) when designing the task or score.\n\n## Run the baseline\n\n```bash\nnode \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs run \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --prompt prompts\u002Fiteration-001.md \\\n  --label iteration-001\n```\n\nThe harness creates one reusable Browserbase Agent, updates its `systemPrompt` on later iterations, starts the run, polls messages and status, and writes:\n\n```text\nruns\u002F\u003Clabel>\u002F\n├── system-prompt.md\n├── created-run.json\n├── run.json\n├── messages.json\n├── session-logs.json\n└── summary.json\n```\n\nIt stops a run after the configured message budget instead of paying for an unproductive spiral. Use `--max-messages`, `--timeout-ms`, `--proxies`, or `--verified` only when the task needs different values from `task.json`.\n\n## Diagnose from observable evidence\n\nStart with the compact trajectory:\n\n```bash\nnode \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs inspect \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --label iteration-001\n```\n\nThen read `summary.json` and drill into `messages.json` at the first wrong or wasted turn. Agent messages expose ordered tool calls, tool results, errors, and final output. A `reasoning` part may contain no readable text; never require hidden chain-of-thought for the teacher loop.\n\nRead `session-logs.json` only when browser-level evidence can distinguish the cause—for example, a redirect, 403, failed request, console error, or hidden endpoint. Empty session logs can mean the Agent completed with search\u002Ffetch tools and never drove its browser.\n\nSee [references\u002Fapi.md](references\u002Fapi.md) for endpoint shapes, pagination, result normalization, and trace caveats.\n\n## Improve one heuristic\n\nFind the earliest consequential failure and state one counterfactual:\n\n> If the system prompt had instructed X, the Agent would have avoided Y, as shown by tool result Z.\n\nCopy the current prompt to `prompts\u002Fiteration-NNN.md` and make one attributable change. Typical improvements are:\n\n- cap retries after a repeated block or identical error;\n- distinguish public identifiers from private\u002Finternal IDs;\n- prefer search\u002Ffetch before launching a browser when interaction is unnecessary;\n- separate current snapshots from dated historical events;\n- define when a qualified fallback counts as completed;\n- require `null` instead of guessed values;\n- add a tool-call or evidence budget.\n\nKeep wins. If the new run regresses, restore the previous prompt and test a different hypothesis rather than stacking more rules.\n\n## Judge and converge\n\nGenerate the comparison table after each run:\n\n```bash\nnode \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs report \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name>\n```\n\nJudge more than field completeness. Require:\n\n- terminal status `COMPLETED`;\n- required fields populated or explicitly nullable;\n- known-fact checks passing when available;\n- no factuality-warning match;\n- provenance and safety constraints preserved;\n- fewer messages or lower duration without quality loss.\n\nOnce a prompt wins, run it again unchanged with a new label. Converge only after it passes at least two of the last three runs and one pass is an unchanged confirmation. Do not call a prompt globally optimal from one task; describe it as the best prompt for the tested task distribution.\n\n## Graduate into the demo\n\nUse the confirmed prompt as the Agent's production `systemPrompt`. Keep the strict result schema and per-run variables. Preserve the experiment workspace or its report so reviewers can audit why each instruction exists.\n\nIn the final handoff, report:\n\n- baseline versus winning score, duration, and message count;\n- the first wrong turn each prompt change fixed;\n- whether session logs added evidence;\n- the winning prompt path;\n- confirmation-run results;\n- limitations and the next holdout matrix.\n",{"data":35,"body":37},{"name":4,"description":6,"license":26,"allowed-tools":36},"Bash Read Write Edit Grep Glob",{"type":38,"children":39},"root",[40,48,63,76,83,88,212,217,260,289,295,400,412,422,464,470,475,560,589,602,614,620,625,634,647,692,697,703,708,778,783,824,829,835,847,852,885],{"type":41,"tag":42,"props":43,"children":44},"element","h1",{"id":4},[45],{"type":46,"value":47},"text","Optimize Agent Prompt",{"type":41,"tag":49,"props":50,"children":51},"p",{},[52,54,61],{"type":46,"value":53},"Optimize a Browserbase Agent's ",{"type":41,"tag":55,"props":56,"children":58},"code",{"className":57},[],[59],{"type":46,"value":60},"systemPrompt",{"type":46,"value":62}," while holding its task, result schema, variables, and evaluation criteria fixed. Treat the outer agent as the teacher and each Browserbase Agent run as an inner-agent rollout.",{"type":41,"tag":49,"props":64,"children":65},{},[66,68,74],{"type":46,"value":67},"Use Node.js 18 or later and set ",{"type":41,"tag":55,"props":69,"children":71},{"className":70},[],[72],{"type":46,"value":73},"BROWSERBASE_API_KEY",{"type":46,"value":75},". The harness uses only Node.js built-in modules.",{"type":41,"tag":77,"props":78,"children":80},"h2",{"id":79},"set-up-the-experiment",[81],{"type":46,"value":82},"Set up the experiment",{"type":41,"tag":49,"props":84,"children":85},{},[86],{"type":46,"value":87},"Choose a short experiment name and create an isolated workspace inside the demo or POC repository:",{"type":41,"tag":89,"props":90,"children":95},"pre",{"className":91,"code":92,"language":93,"meta":94,"style":94},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","node \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs init \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --name \u003Cexperiment-name>\n","bash","",[96],{"type":41,"tag":55,"props":97,"children":98},{"__ignoreMap":94},[99,149,186],{"type":41,"tag":100,"props":101,"children":104},"span",{"class":102,"line":103},"line",1,[105,111,117,123,129,134,139,144],{"type":41,"tag":100,"props":106,"children":108},{"style":107},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[109],{"type":46,"value":110},"node",{"type":41,"tag":100,"props":112,"children":114},{"style":113},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[115],{"type":46,"value":116}," \u003C",{"type":41,"tag":100,"props":118,"children":120},{"style":119},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[121],{"type":46,"value":122},"skill-di",{"type":41,"tag":100,"props":124,"children":126},{"style":125},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[127],{"type":46,"value":128},"r",{"type":41,"tag":100,"props":130,"children":131},{"style":113},[132],{"type":46,"value":133},">",{"type":41,"tag":100,"props":135,"children":136},{"style":119},[137],{"type":46,"value":138},"\u002Fscripts\u002Foptimize_agent_prompt.mjs",{"type":41,"tag":100,"props":140,"children":141},{"style":119},[142],{"type":46,"value":143}," init",{"type":41,"tag":100,"props":145,"children":146},{"style":125},[147],{"type":46,"value":148}," \\\n",{"type":41,"tag":100,"props":150,"children":152},{"class":102,"line":151},2,[153,158,163,168,173,178,182],{"type":41,"tag":100,"props":154,"children":155},{"style":119},[156],{"type":46,"value":157},"  --workspace",{"type":41,"tag":100,"props":159,"children":160},{"style":119},[161],{"type":46,"value":162}," .\u002Fagent-prompt-optimization\u002F",{"type":41,"tag":100,"props":164,"children":165},{"style":113},[166],{"type":46,"value":167},"\u003C",{"type":41,"tag":100,"props":169,"children":170},{"style":119},[171],{"type":46,"value":172},"experiment-nam",{"type":41,"tag":100,"props":174,"children":175},{"style":125},[176],{"type":46,"value":177},"e",{"type":41,"tag":100,"props":179,"children":180},{"style":113},[181],{"type":46,"value":133},{"type":41,"tag":100,"props":183,"children":184},{"style":125},[185],{"type":46,"value":148},{"type":41,"tag":100,"props":187,"children":189},{"class":102,"line":188},3,[190,195,199,203,207],{"type":41,"tag":100,"props":191,"children":192},{"style":119},[193],{"type":46,"value":194},"  --name",{"type":41,"tag":100,"props":196,"children":197},{"style":113},[198],{"type":46,"value":116},{"type":41,"tag":100,"props":200,"children":201},{"style":119},[202],{"type":46,"value":172},{"type":41,"tag":100,"props":204,"children":205},{"style":125},[206],{"type":46,"value":177},{"type":41,"tag":100,"props":208,"children":209},{"style":113},[210],{"type":46,"value":211},">\n",{"type":41,"tag":49,"props":213,"children":214},{},[215],{"type":46,"value":216},"Edit the generated files:",{"type":41,"tag":218,"props":219,"children":220},"ul",{},[221,249],{"type":41,"tag":222,"props":223,"children":224},"li",{},[225,231,233,239,241,247],{"type":41,"tag":55,"props":226,"children":228},{"className":227},[],[229],{"type":46,"value":230},"task.json",{"type":46,"value":232},": keep ",{"type":41,"tag":55,"props":234,"children":236},{"className":235},[],[237],{"type":46,"value":238},"task",{"type":46,"value":240},", ",{"type":41,"tag":55,"props":242,"children":244},{"className":243},[],[245],{"type":46,"value":246},"resultSchema",{"type":46,"value":248},", variables, browser settings, and evaluation oracle stable across iterations.",{"type":41,"tag":222,"props":250,"children":251},{},[252,258],{"type":41,"tag":55,"props":253,"children":255},{"className":254},[],[256],{"type":46,"value":257},"prompts\u002Fiteration-001.md",{"type":46,"value":259},": write the minimal baseline system prompt. Include irreversible-action guardrails when applicable.",{"type":41,"tag":49,"props":261,"children":262},{},[263,265,271,273,279,281,287],{"type":46,"value":264},"Use concrete success criteria. Prefer a strict JSON Schema with required fields and ",{"type":41,"tag":55,"props":266,"children":268},{"className":267},[],[269],{"type":46,"value":270},"null",{"type":46,"value":272}," for unavailable facts. Add known-field regexes and factuality-warning regexes under ",{"type":41,"tag":55,"props":274,"children":276},{"className":275},[],[277],{"type":46,"value":278},"evaluation",{"type":46,"value":280}," when a truth oracle exists. Read ",{"type":41,"tag":282,"props":283,"children":285},"a",{"href":284},"references\u002Fevaluation.md",[286],{"type":46,"value":284},{"type":46,"value":288}," when designing the task or score.",{"type":41,"tag":77,"props":290,"children":292},{"id":291},"run-the-baseline",[293],{"type":46,"value":294},"Run the baseline",{"type":41,"tag":89,"props":296,"children":298},{"className":91,"code":297,"language":93,"meta":94,"style":94},"node \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs run \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --prompt prompts\u002Fiteration-001.md \\\n  --label iteration-001\n",[299],{"type":41,"tag":55,"props":300,"children":301},{"__ignoreMap":94},[302,338,369,386],{"type":41,"tag":100,"props":303,"children":304},{"class":102,"line":103},[305,309,313,317,321,325,329,334],{"type":41,"tag":100,"props":306,"children":307},{"style":107},[308],{"type":46,"value":110},{"type":41,"tag":100,"props":310,"children":311},{"style":113},[312],{"type":46,"value":116},{"type":41,"tag":100,"props":314,"children":315},{"style":119},[316],{"type":46,"value":122},{"type":41,"tag":100,"props":318,"children":319},{"style":125},[320],{"type":46,"value":128},{"type":41,"tag":100,"props":322,"children":323},{"style":113},[324],{"type":46,"value":133},{"type":41,"tag":100,"props":326,"children":327},{"style":119},[328],{"type":46,"value":138},{"type":41,"tag":100,"props":330,"children":331},{"style":119},[332],{"type":46,"value":333}," run",{"type":41,"tag":100,"props":335,"children":336},{"style":125},[337],{"type":46,"value":148},{"type":41,"tag":100,"props":339,"children":340},{"class":102,"line":151},[341,345,349,353,357,361,365],{"type":41,"tag":100,"props":342,"children":343},{"style":119},[344],{"type":46,"value":157},{"type":41,"tag":100,"props":346,"children":347},{"style":119},[348],{"type":46,"value":162},{"type":41,"tag":100,"props":350,"children":351},{"style":113},[352],{"type":46,"value":167},{"type":41,"tag":100,"props":354,"children":355},{"style":119},[356],{"type":46,"value":172},{"type":41,"tag":100,"props":358,"children":359},{"style":125},[360],{"type":46,"value":177},{"type":41,"tag":100,"props":362,"children":363},{"style":113},[364],{"type":46,"value":133},{"type":41,"tag":100,"props":366,"children":367},{"style":125},[368],{"type":46,"value":148},{"type":41,"tag":100,"props":370,"children":371},{"class":102,"line":188},[372,377,382],{"type":41,"tag":100,"props":373,"children":374},{"style":119},[375],{"type":46,"value":376},"  --prompt",{"type":41,"tag":100,"props":378,"children":379},{"style":119},[380],{"type":46,"value":381}," prompts\u002Fiteration-001.md",{"type":41,"tag":100,"props":383,"children":384},{"style":125},[385],{"type":46,"value":148},{"type":41,"tag":100,"props":387,"children":389},{"class":102,"line":388},4,[390,395],{"type":41,"tag":100,"props":391,"children":392},{"style":119},[393],{"type":46,"value":394},"  --label",{"type":41,"tag":100,"props":396,"children":397},{"style":119},[398],{"type":46,"value":399}," iteration-001\n",{"type":41,"tag":49,"props":401,"children":402},{},[403,405,410],{"type":46,"value":404},"The harness creates one reusable Browserbase Agent, updates its ",{"type":41,"tag":55,"props":406,"children":408},{"className":407},[],[409],{"type":46,"value":60},{"type":46,"value":411}," on later iterations, starts the run, polls messages and status, and writes:",{"type":41,"tag":89,"props":413,"children":417},{"className":414,"code":416,"language":46,"meta":94},[415],"language-text","runs\u002F\u003Clabel>\u002F\n├── system-prompt.md\n├── created-run.json\n├── run.json\n├── messages.json\n├── session-logs.json\n└── summary.json\n",[418],{"type":41,"tag":55,"props":419,"children":420},{"__ignoreMap":94},[421],{"type":46,"value":416},{"type":41,"tag":49,"props":423,"children":424},{},[425,427,433,434,440,441,447,449,455,457,462],{"type":46,"value":426},"It stops a run after the configured message budget instead of paying for an unproductive spiral. Use ",{"type":41,"tag":55,"props":428,"children":430},{"className":429},[],[431],{"type":46,"value":432},"--max-messages",{"type":46,"value":240},{"type":41,"tag":55,"props":435,"children":437},{"className":436},[],[438],{"type":46,"value":439},"--timeout-ms",{"type":46,"value":240},{"type":41,"tag":55,"props":442,"children":444},{"className":443},[],[445],{"type":46,"value":446},"--proxies",{"type":46,"value":448},", or ",{"type":41,"tag":55,"props":450,"children":452},{"className":451},[],[453],{"type":46,"value":454},"--verified",{"type":46,"value":456}," only when the task needs different values from ",{"type":41,"tag":55,"props":458,"children":460},{"className":459},[],[461],{"type":46,"value":230},{"type":46,"value":463},".",{"type":41,"tag":77,"props":465,"children":467},{"id":466},"diagnose-from-observable-evidence",[468],{"type":46,"value":469},"Diagnose from observable evidence",{"type":41,"tag":49,"props":471,"children":472},{},[473],{"type":46,"value":474},"Start with the compact trajectory:",{"type":41,"tag":89,"props":476,"children":478},{"className":91,"code":477,"language":93,"meta":94,"style":94},"node \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs inspect \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name> \\\n  --label iteration-001\n",[479],{"type":41,"tag":55,"props":480,"children":481},{"__ignoreMap":94},[482,518,549],{"type":41,"tag":100,"props":483,"children":484},{"class":102,"line":103},[485,489,493,497,501,505,509,514],{"type":41,"tag":100,"props":486,"children":487},{"style":107},[488],{"type":46,"value":110},{"type":41,"tag":100,"props":490,"children":491},{"style":113},[492],{"type":46,"value":116},{"type":41,"tag":100,"props":494,"children":495},{"style":119},[496],{"type":46,"value":122},{"type":41,"tag":100,"props":498,"children":499},{"style":125},[500],{"type":46,"value":128},{"type":41,"tag":100,"props":502,"children":503},{"style":113},[504],{"type":46,"value":133},{"type":41,"tag":100,"props":506,"children":507},{"style":119},[508],{"type":46,"value":138},{"type":41,"tag":100,"props":510,"children":511},{"style":119},[512],{"type":46,"value":513}," inspect",{"type":41,"tag":100,"props":515,"children":516},{"style":125},[517],{"type":46,"value":148},{"type":41,"tag":100,"props":519,"children":520},{"class":102,"line":151},[521,525,529,533,537,541,545],{"type":41,"tag":100,"props":522,"children":523},{"style":119},[524],{"type":46,"value":157},{"type":41,"tag":100,"props":526,"children":527},{"style":119},[528],{"type":46,"value":162},{"type":41,"tag":100,"props":530,"children":531},{"style":113},[532],{"type":46,"value":167},{"type":41,"tag":100,"props":534,"children":535},{"style":119},[536],{"type":46,"value":172},{"type":41,"tag":100,"props":538,"children":539},{"style":125},[540],{"type":46,"value":177},{"type":41,"tag":100,"props":542,"children":543},{"style":113},[544],{"type":46,"value":133},{"type":41,"tag":100,"props":546,"children":547},{"style":125},[548],{"type":46,"value":148},{"type":41,"tag":100,"props":550,"children":551},{"class":102,"line":188},[552,556],{"type":41,"tag":100,"props":553,"children":554},{"style":119},[555],{"type":46,"value":394},{"type":41,"tag":100,"props":557,"children":558},{"style":119},[559],{"type":46,"value":399},{"type":41,"tag":49,"props":561,"children":562},{},[563,565,571,573,579,581,587],{"type":46,"value":564},"Then read ",{"type":41,"tag":55,"props":566,"children":568},{"className":567},[],[569],{"type":46,"value":570},"summary.json",{"type":46,"value":572}," and drill into ",{"type":41,"tag":55,"props":574,"children":576},{"className":575},[],[577],{"type":46,"value":578},"messages.json",{"type":46,"value":580}," at the first wrong or wasted turn. Agent messages expose ordered tool calls, tool results, errors, and final output. A ",{"type":41,"tag":55,"props":582,"children":584},{"className":583},[],[585],{"type":46,"value":586},"reasoning",{"type":46,"value":588}," part may contain no readable text; never require hidden chain-of-thought for the teacher loop.",{"type":41,"tag":49,"props":590,"children":591},{},[592,594,600],{"type":46,"value":593},"Read ",{"type":41,"tag":55,"props":595,"children":597},{"className":596},[],[598],{"type":46,"value":599},"session-logs.json",{"type":46,"value":601}," only when browser-level evidence can distinguish the cause—for example, a redirect, 403, failed request, console error, or hidden endpoint. Empty session logs can mean the Agent completed with search\u002Ffetch tools and never drove its browser.",{"type":41,"tag":49,"props":603,"children":604},{},[605,607,612],{"type":46,"value":606},"See ",{"type":41,"tag":282,"props":608,"children":610},{"href":609},"references\u002Fapi.md",[611],{"type":46,"value":609},{"type":46,"value":613}," for endpoint shapes, pagination, result normalization, and trace caveats.",{"type":41,"tag":77,"props":615,"children":617},{"id":616},"improve-one-heuristic",[618],{"type":46,"value":619},"Improve one heuristic",{"type":41,"tag":49,"props":621,"children":622},{},[623],{"type":46,"value":624},"Find the earliest consequential failure and state one counterfactual:",{"type":41,"tag":626,"props":627,"children":628},"blockquote",{},[629],{"type":41,"tag":49,"props":630,"children":631},{},[632],{"type":46,"value":633},"If the system prompt had instructed X, the Agent would have avoided Y, as shown by tool result Z.",{"type":41,"tag":49,"props":635,"children":636},{},[637,639,645],{"type":46,"value":638},"Copy the current prompt to ",{"type":41,"tag":55,"props":640,"children":642},{"className":641},[],[643],{"type":46,"value":644},"prompts\u002Fiteration-NNN.md",{"type":46,"value":646}," and make one attributable change. Typical improvements are:",{"type":41,"tag":218,"props":648,"children":649},{},[650,655,660,665,670,675,687],{"type":41,"tag":222,"props":651,"children":652},{},[653],{"type":46,"value":654},"cap retries after a repeated block or identical error;",{"type":41,"tag":222,"props":656,"children":657},{},[658],{"type":46,"value":659},"distinguish public identifiers from private\u002Finternal IDs;",{"type":41,"tag":222,"props":661,"children":662},{},[663],{"type":46,"value":664},"prefer search\u002Ffetch before launching a browser when interaction is unnecessary;",{"type":41,"tag":222,"props":666,"children":667},{},[668],{"type":46,"value":669},"separate current snapshots from dated historical events;",{"type":41,"tag":222,"props":671,"children":672},{},[673],{"type":46,"value":674},"define when a qualified fallback counts as completed;",{"type":41,"tag":222,"props":676,"children":677},{},[678,680,685],{"type":46,"value":679},"require ",{"type":41,"tag":55,"props":681,"children":683},{"className":682},[],[684],{"type":46,"value":270},{"type":46,"value":686}," instead of guessed values;",{"type":41,"tag":222,"props":688,"children":689},{},[690],{"type":46,"value":691},"add a tool-call or evidence budget.",{"type":41,"tag":49,"props":693,"children":694},{},[695],{"type":46,"value":696},"Keep wins. If the new run regresses, restore the previous prompt and test a different hypothesis rather than stacking more rules.",{"type":41,"tag":77,"props":698,"children":700},{"id":699},"judge-and-converge",[701],{"type":46,"value":702},"Judge and converge",{"type":41,"tag":49,"props":704,"children":705},{},[706],{"type":46,"value":707},"Generate the comparison table after each run:",{"type":41,"tag":89,"props":709,"children":711},{"className":91,"code":710,"language":93,"meta":94,"style":94},"node \u003Cskill-dir>\u002Fscripts\u002Foptimize_agent_prompt.mjs report \\\n  --workspace .\u002Fagent-prompt-optimization\u002F\u003Cexperiment-name>\n",[712],{"type":41,"tag":55,"props":713,"children":714},{"__ignoreMap":94},[715,751],{"type":41,"tag":100,"props":716,"children":717},{"class":102,"line":103},[718,722,726,730,734,738,742,747],{"type":41,"tag":100,"props":719,"children":720},{"style":107},[721],{"type":46,"value":110},{"type":41,"tag":100,"props":723,"children":724},{"style":113},[725],{"type":46,"value":116},{"type":41,"tag":100,"props":727,"children":728},{"style":119},[729],{"type":46,"value":122},{"type":41,"tag":100,"props":731,"children":732},{"style":125},[733],{"type":46,"value":128},{"type":41,"tag":100,"props":735,"children":736},{"style":113},[737],{"type":46,"value":133},{"type":41,"tag":100,"props":739,"children":740},{"style":119},[741],{"type":46,"value":138},{"type":41,"tag":100,"props":743,"children":744},{"style":119},[745],{"type":46,"value":746}," report",{"type":41,"tag":100,"props":748,"children":749},{"style":125},[750],{"type":46,"value":148},{"type":41,"tag":100,"props":752,"children":753},{"class":102,"line":151},[754,758,762,766,770,774],{"type":41,"tag":100,"props":755,"children":756},{"style":119},[757],{"type":46,"value":157},{"type":41,"tag":100,"props":759,"children":760},{"style":119},[761],{"type":46,"value":162},{"type":41,"tag":100,"props":763,"children":764},{"style":113},[765],{"type":46,"value":167},{"type":41,"tag":100,"props":767,"children":768},{"style":119},[769],{"type":46,"value":172},{"type":41,"tag":100,"props":771,"children":772},{"style":125},[773],{"type":46,"value":177},{"type":41,"tag":100,"props":775,"children":776},{"style":113},[777],{"type":46,"value":211},{"type":41,"tag":49,"props":779,"children":780},{},[781],{"type":46,"value":782},"Judge more than field completeness. Require:",{"type":41,"tag":218,"props":784,"children":785},{},[786,799,804,809,814,819],{"type":41,"tag":222,"props":787,"children":788},{},[789,791,797],{"type":46,"value":790},"terminal status ",{"type":41,"tag":55,"props":792,"children":794},{"className":793},[],[795],{"type":46,"value":796},"COMPLETED",{"type":46,"value":798},";",{"type":41,"tag":222,"props":800,"children":801},{},[802],{"type":46,"value":803},"required fields populated or explicitly nullable;",{"type":41,"tag":222,"props":805,"children":806},{},[807],{"type":46,"value":808},"known-fact checks passing when available;",{"type":41,"tag":222,"props":810,"children":811},{},[812],{"type":46,"value":813},"no factuality-warning match;",{"type":41,"tag":222,"props":815,"children":816},{},[817],{"type":46,"value":818},"provenance and safety constraints preserved;",{"type":41,"tag":222,"props":820,"children":821},{},[822],{"type":46,"value":823},"fewer messages or lower duration without quality loss.",{"type":41,"tag":49,"props":825,"children":826},{},[827],{"type":46,"value":828},"Once a prompt wins, run it again unchanged with a new label. Converge only after it passes at least two of the last three runs and one pass is an unchanged confirmation. Do not call a prompt globally optimal from one task; describe it as the best prompt for the tested task distribution.",{"type":41,"tag":77,"props":830,"children":832},{"id":831},"graduate-into-the-demo",[833],{"type":46,"value":834},"Graduate into the demo",{"type":41,"tag":49,"props":836,"children":837},{},[838,840,845],{"type":46,"value":839},"Use the confirmed prompt as the Agent's production ",{"type":41,"tag":55,"props":841,"children":843},{"className":842},[],[844],{"type":46,"value":60},{"type":46,"value":846},". Keep the strict result schema and per-run variables. Preserve the experiment workspace or its report so reviewers can audit why each instruction exists.",{"type":41,"tag":49,"props":848,"children":849},{},[850],{"type":46,"value":851},"In the final handoff, report:",{"type":41,"tag":218,"props":853,"children":854},{},[855,860,865,870,875,880],{"type":41,"tag":222,"props":856,"children":857},{},[858],{"type":46,"value":859},"baseline versus winning score, duration, and message count;",{"type":41,"tag":222,"props":861,"children":862},{},[863],{"type":46,"value":864},"the first wrong turn each prompt change fixed;",{"type":41,"tag":222,"props":866,"children":867},{},[868],{"type":46,"value":869},"whether session logs added evidence;",{"type":41,"tag":222,"props":871,"children":872},{},[873],{"type":46,"value":874},"the winning prompt path;",{"type":41,"tag":222,"props":876,"children":877},{},[878],{"type":46,"value":879},"confirmation-run results;",{"type":41,"tag":222,"props":881,"children":882},{},[883],{"type":46,"value":884},"limitations and the next holdout matrix.",{"type":41,"tag":886,"props":887,"children":888},"style",{},[889],{"type":46,"value":890},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":892,"total":1010},[893,914,927,939,957,972,990],{"slug":894,"name":894,"fn":895,"description":896,"org":897,"tags":898,"stars":23,"repoUrl":24,"updatedAt":913},"agent-experience","audit developer experience with AI agents","Audit the developer experience of a product, SDK, docs site, or SKILL.md by dropping multiple Claude subagents at it with only a tiny task prompt and real tools (WebFetch, Bash, Write). Agents must discover the docs themselves, install deps, ask for credentials if needed, and attempt real execution. The skill captures each agent's trace — tool calls, retries, wall time, errors — and scores on Setup Friction, Speed, Efficiency, Error Recovery, and Doc Quality, then emits an HTML report with an A–F grade and concrete fixes. Use when the user asks to audit agent experience, test a skill, audit docs for agents, check if a SDK is agent-friendly, validate a SKILL.md, measure agent DX, or benchmark how painful onboarding is for an AI agent. Triggers: 'audit agent experience', 'test this skill', 'audit docs for agents', 'is my SDK agent-friendly', 'run a DX audit', 'agent experience test', 'test my docs', 'how do agents do with my product'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[899,900,903,904,907,910],{"name":21,"slug":22,"type":15},{"name":901,"slug":902,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},{"name":905,"slug":906,"type":15},"Engineering","engineering",{"name":908,"slug":909,"type":15},"Multi-Agent","multi-agent",{"name":911,"slug":912,"type":15},"QA","qa","2026-05-29T06:58:56.259807",{"slug":915,"name":915,"fn":916,"description":917,"org":918,"tags":919,"stars":23,"repoUrl":24,"updatedAt":926},"autobrowse","run self-improving browser automation","Self-improving browser automation via the auto-research loop. Iteratively runs a browsing task, reads the trace, and improves the navigation skill (strategy.md) until it reliably passes. Supports parallel runs across multiple tasks using sub-agents. Use when you want to build or improve browser automation skills for specific website tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[920,921,922,925],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":923,"slug":924,"type":15},"Browser Automation","browser-automation",{"name":9,"slug":8,"type":15},"2026-04-23T05:00:30.528336",{"slug":928,"name":928,"fn":929,"description":930,"org":931,"tags":932,"stars":23,"repoUrl":24,"updatedAt":938},"browser","automate browser interactions via CLI","Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Supports remote Browserbase sessions with Browserbase Identity, Verified browsers, automatic CAPTCHA solving, and residential proxies — ideal for protected websites and JavaScript-heavy pages.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[933,934,935],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":936,"slug":937,"type":15},"CLI","cli","2026-04-06T18:06:22.005051",{"slug":940,"name":940,"fn":941,"description":942,"org":943,"tags":944,"stars":23,"repoUrl":24,"updatedAt":956},"browser-to-api","generate OpenAPI specs from browser traffic","Turn a website's observable HTTP traffic into a best-effort OpenAPI 3.1 spec by analyzing a `browser-trace` capture. Use when the user wants to discover\u002Fextract API endpoints from a browser session, build an OpenAPI doc from network traffic, or document a third-party site's XHR\u002Ffetch surface for client integration.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[945,948,949,950,953],{"name":946,"slug":947,"type":15},"API Development","api-development",{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":951,"slug":952,"type":15},"HTTP","http",{"name":954,"slug":955,"type":15},"OpenAPI","openapi","2026-05-14T06:07:27.298495",{"slug":958,"name":958,"fn":959,"description":960,"org":961,"tags":962,"stars":23,"repoUrl":24,"updatedAt":971},"browser-trace","capture and debug browser automation traces","Capture a full DevTools-protocol trace of any browser automation — CDP firehose, screenshots, and DOM dumps — then bisect the stream into per-page searchable buckets. Use when the user wants to debug a failed run, audit network\u002Fconsole\u002FDOM activity, attach a trace to an in-progress session, or feed structured per-page summaries back into an agent loop so its next iteration learns from the last one.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[963,964,965,968],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":966,"slug":967,"type":15},"Debugging","debugging",{"name":969,"slug":970,"type":15},"Observability","observability","2026-04-28T05:41:33.024656",{"slug":973,"name":973,"fn":974,"description":975,"org":976,"tags":977,"stars":23,"repoUrl":24,"updatedAt":989},"browser-use-to-stagehand","migrate browser-use scripts to Stagehand","Migrate browser-use (Python) browser-automation scripts to Stagehand v3 (TypeScript) on Browserbase. Use when the user wants to convert, port, rewrite, or migrate a browser-use Agent script to Stagehand, map browser-use features\u002FAPIs to Stagehand primitives (act\u002Fextract\u002Fobserve\u002Fagent), or move agentic browser automation onto Browserbase with more determinism. Triggers on \"browser-use\", \"browser_use\", or \"Agent(task=...)\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[978,979,980,983,986],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":981,"slug":982,"type":15},"Migration","migration",{"name":984,"slug":985,"type":15},"Python","python",{"name":987,"slug":988,"type":15},"TypeScript","typescript","2026-06-26T07:57:47.428249",{"slug":991,"name":991,"fn":992,"description":993,"org":994,"tags":995,"stars":23,"repoUrl":24,"updatedAt":1009},"company-research","conduct deep company and product research","Company discovery and deep research skill. Researches a company's product and ICP,\ndiscovers target companies to sell to using Browserbase Search API, deeply researches\neach using a Plan→Research→Synthesize pattern, and scores ICP fit — compiled into\na scored research report and CSV. Supports depth modes (quick\u002Fdeep\u002Fdeeper) for\nbalancing scale vs intelligence.\nUse when the user wants to: (1) find companies to sell to, (2) research potential\ncustomers, (3) discover companies matching an ICP, (4) build a target company list,\n(5) do market research on prospects. Triggers: \"find companies to sell to\",\n\"company research\", \"find prospects\", \"ICP research\", \"target companies\",\n\"who should we sell to\", \"market research\", \"lead research\", \"prospect list\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[996,997,1000,1003,1006],{"name":9,"slug":8,"type":15},{"name":998,"slug":999,"type":15},"Competitive Intelligence","competitive-intelligence",{"name":1001,"slug":1002,"type":15},"Marketing","marketing",{"name":1004,"slug":1005,"type":15},"Research","research",{"name":1007,"slug":1008,"type":15},"Sales","sales","2026-04-27T05:34:56.172569",17,{"items":1012,"total":1010},[1013,1022,1029,1035,1043,1050,1058,1066,1080,1092,1105,1116],{"slug":894,"name":894,"fn":895,"description":896,"org":1014,"tags":1015,"stars":23,"repoUrl":24,"updatedAt":913},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1016,1017,1018,1019,1020,1021],{"name":21,"slug":22,"type":15},{"name":901,"slug":902,"type":15},{"name":9,"slug":8,"type":15},{"name":905,"slug":906,"type":15},{"name":908,"slug":909,"type":15},{"name":911,"slug":912,"type":15},{"slug":915,"name":915,"fn":916,"description":917,"org":1023,"tags":1024,"stars":23,"repoUrl":24,"updatedAt":926},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1025,1026,1027,1028],{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"slug":928,"name":928,"fn":929,"description":930,"org":1030,"tags":1031,"stars":23,"repoUrl":24,"updatedAt":938},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1032,1033,1034],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":936,"slug":937,"type":15},{"slug":940,"name":940,"fn":941,"description":942,"org":1036,"tags":1037,"stars":23,"repoUrl":24,"updatedAt":956},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1038,1039,1040,1041,1042],{"name":946,"slug":947,"type":15},{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":951,"slug":952,"type":15},{"name":954,"slug":955,"type":15},{"slug":958,"name":958,"fn":959,"description":960,"org":1044,"tags":1045,"stars":23,"repoUrl":24,"updatedAt":971},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1046,1047,1048,1049],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":966,"slug":967,"type":15},{"name":969,"slug":970,"type":15},{"slug":973,"name":973,"fn":974,"description":975,"org":1051,"tags":1052,"stars":23,"repoUrl":24,"updatedAt":989},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1053,1054,1055,1056,1057],{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":981,"slug":982,"type":15},{"name":984,"slug":985,"type":15},{"name":987,"slug":988,"type":15},{"slug":991,"name":991,"fn":992,"description":993,"org":1059,"tags":1060,"stars":23,"repoUrl":24,"updatedAt":1009},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1061,1062,1063,1064,1065],{"name":9,"slug":8,"type":15},{"name":998,"slug":999,"type":15},{"name":1001,"slug":1002,"type":15},{"name":1004,"slug":1005,"type":15},{"name":1007,"slug":1008,"type":15},{"slug":1067,"name":1067,"fn":1068,"description":1069,"org":1070,"tags":1071,"stars":23,"repoUrl":24,"updatedAt":1079},"competitor-analysis","analyze competitors across features and pricing","Competitor research and intelligence skill. Takes a user's company (with optional\nseed competitor URLs), auto-discovers additional competitors via Browserbase Search API,\ndeeply researches each using a 4-lane pattern (marketing surface, external signal,\npublic benchmarks, strategic diff vs the user's company), and compiles the results\ninto an HTML report with four views: overview, per-competitor deep dive, side-by-side\nfeature\u002Fpricing matrix, and a chronological mentions feed (news, reviews,\nsocial, comparison pages, and public benchmarks).\nUse when the user wants to: (1) analyze competitors, (2) build a competitive matrix,\n(3) extract competitor pricing \u002F features, (4) find comparison pages and online\nmentions of competitors, (5) surface public benchmarks. Triggers: \"competitor analysis\",\n\"analyze competitors\", \"competitive intel\", \"competitor research\", \"competitor pricing\",\n\"feature comparison\", \"price comparison\", \"find comparisons\", \"who's comparing us\",\n\"competitor mentions\", \"competitor benchmarks\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1072,1073,1074,1075,1076],{"name":9,"slug":8,"type":15},{"name":998,"slug":999,"type":15},{"name":1001,"slug":1002,"type":15},{"name":1004,"slug":1005,"type":15},{"name":1077,"slug":1078,"type":15},"Strategy","strategy","2026-06-19T09:41:33.392499",{"slug":1081,"name":1081,"fn":1082,"description":1083,"org":1084,"tags":1085,"stars":23,"repoUrl":24,"updatedAt":1091},"cookie-sync","sync Chrome cookies to a Browserbase context","Sync cookies from local Chrome to a Browserbase persistent context so the browse CLI can access authenticated sites. Use when the user wants to browse as themselves, sync cookies, or log into sites via Browserbase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1086,1089,1090],{"name":1087,"slug":1088,"type":15},"Auth","auth",{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},"2026-04-06T18:06:23.3251",{"slug":1093,"name":1093,"fn":1094,"description":1095,"org":1096,"tags":1097,"stars":23,"repoUrl":24,"updatedAt":1104},"event-prospecting","research event speakers for sales prospecting","Event prospecting skill. Takes a conference \u002F event speakers URL,\nextracts the people, filters their companies against the user's\nICP, then deep-researches only the speakers at ICP-fit companies.\nOutputs a person-first HTML report where each card answers \"why\nshould the AE talk to this person?\" with all public links and a\none-click DM opener.\nUse when the user wants to: (1) find leads at a specific\nconference, (2) prep for an event, (3) research event speakers,\n(4) build a target list from a sponsor\u002Fexhibitor page,\n(5) scrape conference speakers and rank by ICP fit.\nTriggers: \"find leads at {event}\", \"research speakers at\",\n\"prospect this conference\", \"stripe sessions leads\",\n\"ai engineer summit prospects\", \"event prospecting\",\n\"scrape conference speakers\", \"who should I meet at\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1098,1099,1102,1103],{"name":9,"slug":8,"type":15},{"name":1100,"slug":1101,"type":15},"Prospecting","prospecting",{"name":1004,"slug":1005,"type":15},{"name":1007,"slug":1008,"type":15},"2026-04-28T05:41:31.770467",{"slug":1106,"name":1106,"fn":1107,"description":1108,"org":1109,"tags":1110,"stars":23,"repoUrl":24,"updatedAt":1115},"fetch","fetch URLs without a browser session","Use this skill when the user wants to retrieve a URL without a full browser session: fetch HTML or JSON from static pages, inspect status codes or headers, follow redirects, or get page source for simple scraping. Prefer it over a browser when JavaScript rendering and page interaction are not needed. Supports proxies and redirect control.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1111,1112],{"name":951,"slug":952,"type":15},{"name":1113,"slug":1114,"type":15},"Web Scraping","web-scraping","2026-04-06T18:06:19.462477",{"slug":1117,"name":1117,"fn":1118,"description":1119,"org":1120,"tags":1121,"stars":23,"repoUrl":24,"updatedAt":1128},"functions","deploy serverless browser automation","Deploy serverless browser automation as cloud functions using Browserbase. Use when the user wants to deploy browser automation to run on a schedule or cron, create a webhook endpoint for browser tasks, run automation in the cloud instead of locally, or asks about Browserbase Functions.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1122,1123,1124,1125],{"name":17,"slug":18,"type":15},{"name":923,"slug":924,"type":15},{"name":9,"slug":8,"type":15},{"name":1126,"slug":1127,"type":15},"Serverless","serverless","2026-04-06T18:06:20.773436"]