Show HN: Get your coding agent off ~2019 JavaScript, onto modern web primitives
TL;DR Highlight
Skills that feed modern web guidance to coding agents steer them away from legacy JavaScript.
Who Should Read
A frontend developer frustrated that AI coding agents write outdated JS/CSS patterns and heavy polyfills.
Core Mechanics
- LLMs learned too much old code
- Training data contains lots of legacy code, so agents default to old patterns.
- They write bloated JavaScript for tasks native features now handle.
- Knowing an API isn't using it well
- Models may know an API exists but lack production-grade modern implementation patterns.
- The tool injects curated guidance directly into the agent's context window.
- A CLI searches and injects guides
- search finds relevant guides and retrieve fetches one by ID.
- legacy-scan scans a codebase for patterns worth modernizing.
- Guides skip what models already know
- Evals are run to prune lowest-common-denominator content models already know.
- Guides are designed to be token-efficient.
- It covers 250 web features
- 140 CSS & layout, 36 HTML & DOM, and 74 JavaScript & API features.
- 203 real-world use-case guides cover accessibility, forms, web components, built-in AI and more.
- Light fallbacks over polyfills
- It steers models to lightweight fallbacks instead of heavy polyfills or legacy libraries.
- It is stewarded by the Chrome, Edge, Firefox and MDN teams plus the community.
Community Reactions
- Many features are Chrome-only, commenters noted
- A commenter listed recommended features unsupported in Firefox and Safari, such as @function, calc-size() and focusgroup.
- They added that about 11 recommended features aren't supported even by Chrome.
- Worries about deepening Chrome dominance
- Several commenters said agents following Chrome-team guidance would feed a Chrome monoculture.
- Others argued they want more compatible code, not less.
- Experience: it helps with PR review pain
- One commenter said reviewing messy code replaceable by 2 lines of modern features led them to build similar tooling.
- Another found only two issues with legacy-scan and said it's likely more useful with weaker models.
- Workaround: filter by browser support
- One commenter told their agent to apply only features working in Chrome, Firefox, iOS Safari and macOS Safari, and got a good list.
- Another suggested publishing a markdown index on GitHub Pages so no install is needed.
How to Apply
- Run legacy-scan today
- Run npx modern-web-guidance@latest legacy-scan . in your project root.
- Pick findings supported by your target browsers as PR candidates.
- Constrain the agent to your browser support
- State in agent instructions to use only features supported in Chrome, Firefox and Safari.
- Require fallbacks for anything not yet widely supported.
- Search guides before UI tasks
- Before modals, tooltips or form validation, run the search command for relevant guides.
- Paste the retrieved guide into the agent's context before implementing.
Try It
# Run in terminal (try without installing)
npx modern-web-guidance@latest search "animate a dialog modal backdrop"
# Fetch the guide body using the ID from the results
npx modern-web-guidance@latest retrieve "animate-to-from-top-layer"
# Find legacy patterns in your codebase
npx modern-web-guidance@latest legacy-scan .
# To install as an agent skill (interactive wizard)
npx modern-web-guidance@latest installTerminology
Related Papers
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
How the Claude Code team thinks about verification
E2E, property and differential tests plus verification rules let Claude run in parallel.
Running coding agents without handing them my credentials
Credentials stay on the laptop; agents run commands there via Touch ID approval
Windows 11 Is Collecting Data on Which Coding Agents and Developer Tools You Use
Reverse engineering shows Windows 11 logs which coding agents you use and reports it as optional diagnostics
The Silent Cost of Conversation History in LLM Reasoning
Keeping full conversation history dropped accuracy from 0.6 to 0.1 within 20 turns; a verified state summary prevented it.
Anthropic upgrades Claude Code Projects to run parallel AI workers
Claude Code Projects now has a coordinator that splits work into parallel threads and opens PRs.