browser-native

Use when the user asks to audit, scan, or modernize JavaScript dependencies: identifies npm packages that can be replaced with modern browser/runtime built-in APIs (fetch, URL, structuredClone, crypto.randomUUID, Intl, etc.) and shows before/after code examples.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "browser-native" with this command: npx skills add soderlind/browser-native/soderlind-browser-native-browser-native

Browser-Native Dependency Scanner

When to use

Use this skill when the user:

  • asks to audit, scan, or check JavaScript/Node.js dependencies for replacements
  • wants to modernize a project by removing polyfills and outdated utility packages
  • asks "which of my deps can be replaced with browser built-ins?"
  • wants to know if packages like axios, lodash, moment, uuid, etc. are still needed
  • is trying to reduce bundle size by switching to native APIs
  • asks about browser-native alternatives to a specific npm package

Inputs required

  • A target directory (or the current working directory) that contains a package.json.
  • Optionally: desired output format (terminal table, markdown report, or JSON).

Procedure

1) Run the scanner script

node skills/browser-native/scripts/cli.js [target-dir]

Default output is a colored terminal table showing each replaceable dependency, its category, the native API replacement, and a confidence level (full or partial).

Output formats

# Terminal table (default)
node skills/browser-native/scripts/cli.js [dir]

# Markdown with before/after code examples
node skills/browser-native/scripts/cli.js [dir] --md

# JSON for parsing
node skills/browser-native/scripts/cli.js [dir] --json

# Save to file
node skills/browser-native/scripts/cli.js [dir] --md --out report.md

2) Review the results

The scanner checks dependencies and devDependencies against an internal database of 100+ npm packages that have native browser/runtime equivalents, organized in these categories:

CategoryExample packagesNative replacement
HTTPaxios, node-fetch, request, unfetchfetch()
URL / Queryquery-string, qs, url-parse, url-search-params-polyfillURL, URLSearchParams
Object Utilslodash.clonedeep, object-assign, object.values, object.hasownstructuredClone(), Object.assign(), Object.values(), Object.hasOwn()
Array Utilslodash.flatten, lodash.find, lodash.uniq.flat(), .find(), [...new Set()]
UUIDuuid, nanoid, shortidcrypto.randomUUID()
Datemoment, moment-timezoneIntl.DateTimeFormat, Intl.RelativeTimeFormat
Promisesbluebird, q, promise-polyfill, promise.allsettledPromise, Promise.allSettled()
Stringsleft-pad, repeat-string, string.prototype.matchall.padStart(), .repeat(), .matchAll()
Type checksis-number, isarray, is-promisetypeof, Array.isArray()
Encodingbase-64, js-base64btoa(), atob()
Polyfillsabort-controller, text-encoding, globalthisNative globals
Observersintersection-observer, resize-observer-polyfillNative APIs
Cryptocrypto-js (partial)crypto.subtle
Streamsweb-streams-polyfillReadableStream
FormDataform-data, formdata-polyfillFormData

3) Interpret confidence levels

  • Full — drop-in replacement. The native API covers the same functionality. Safe to remove the package and use the native API directly.
  • Partial — covers most common use cases, but the package may offer features the native API doesn't. Review your usage before removing.

For detailed reference on each replacement including before/after code and browser support, read:

  • references/replacements-guide.md

4) Present findings to the user

When showing results:

  1. Lead with the summary count (e.g., "14 of 42 dependencies can be replaced")
  2. Group by confidence: list full replacements first (easy wins), then partial
  3. For each flagged package, show the before/after code snippet
  4. Note any caveats from the notes field
  5. If asked for a migration plan, prioritize:
    • Polyfills first (safest to remove — they just provide what's already built-in)
    • Full confidence replacements next
    • Partial replacements last (require careful review)

5) Monorepo support

The scanner automatically checks packages/, apps/, libs/, and modules/ subdirectories for additional package.json files.

Verification

After presenting recommendations, the user can verify by:

  1. Removing the flagged package from package.json
  2. Replacing imports with the native API (using the "after" code example)
  3. Running the project's test suite
  4. Checking browser compatibility against their targets

Failure modes

  • No package.json found — the script will print an error. Ask the user for the correct project directory.
  • Zero replaceable deps — this is a good result! The project is already modern.
  • Package in database but used for edge-case features — confidence "partial" covers this. Always check the notes field and recommend reviewing actual usage before removing.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

prepare-wordpress

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

wp-cli-local

No summary provided by upstream source.

Repository SourceNeeds Review
Security

Auto Security Audit

一键自动化安全审计:nmap 端口扫描 + nuclei 12000+ CVE 漏洞检测(内外网双扫)+ SSL/TLS 检查 + SSH/防火墙/fail2ban 系统审计 + Markdown 报告生成。支持 cron 定时扫描 + 飞书推送。

Registry SourceRecently Updated