Skip to content

fix(skills): run the skills in the conversation of the agent, not in a forked context - #285

Merged
nucliweb merged 1 commit into
mainfrom
fix/skills-no-fork
Oct 19, 2026
Merged

nucliweb merged 1 commit into
mainfrom
fix/skills-no-fork

Conversation

@nucliweb

Copy link
Copy Markdown
Owner

Summary

The generated skills (skills/, .claude/skills/) carried context: fork. A forked skill runs in a subagent that does not receive the conversation: it has no URL and no open page, so it cannot measure anything. In the chapter 6 measurement (#284) the forked skill failed 3 of 3 invocations ("no page to measure", "the task gave no URL").

  • scripts/generate-skills.js stops writing context: fork in the category skills and in the webperf router (dist/ never had it).
  • scripts/skill-guidance.test.js fails if any generated SKILL.md carries context: fork.
  • Skills regenerated.

Measurement

npm run eval:mcp -- --arm devtools-skill --repeat 3, medians, before (with fork) and after:

Case Fork Diagnosis Input Turns Skill invoked Runs with a published script
LCP yes 3/3 89.8k 7 2/3, subagent without URL 0/3
LCP no 3/3 87.6k 5 1/3 1/3 (LCP-Subparts via sourcePath)
INP yes 3/3 104.3k 9 1/3, subagent without URL 0/3
INP no 3/3 125.4k 10 3/3 0/3

Without the fork the skill works: it sees the page and the URL, and in one LCP run it executed the published LCP-Subparts by sourcePath. Cost does not change in a meaningful way; this fixes a failure, it does not make the runs cheaper. The agent still often prefers the trace or its own observer, which is left for phase 8b (pushing the skill instructions towards running the published scripts).

Test plan

  • npm run test:skills: 179/179, locally; the new test failed 12/12 before the change in the generator
  • npm run generate-skills: regenerates only the 12 SKILL.md files of this diff, locally
  • npm run eval:mcp -- --arm devtools-skill --repeat 3 before and after, locally (results above)
  • CI

…a forked context

A skill with context: fork runs in a subagent that does not get the conversation, so it does not know the URL the user gave or the page the agent opened. In the MCP evals (npm run eval:mcp, devtools-skill) the forked skill failed every time it was invoked, answering "no page to measure" or "the task gave no URL", and the agent went on by itself with more turns and tokens.

The generator no longer writes context: fork in the category skills or the webperf router, and a test fails if a generated SKILL.md carries it.
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webperf-snippets Ready Ready Preview Oct 19, 2026 11:22am UTC

@nucliweb
nucliweb merged commit 0ab0d22 into main Oct 19, 2026
3 checks passed
@nucliweb
nucliweb deleted the fix/skills-no-fork branch October 19, 2026 22:36
@nucliweb nucliweb mentioned this pull request Oct 21, 2026
4 of 5 tasks

This branch was successfully deployed

1 active deployment
Preview — c1c7282b Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant