agentleFS
ivklgnivklgn/ai-kit/skills/can-i-use/SKILL.md

can-i-use

Skill12 starsChanged 2 months agoMITView on GitHub

Check browser support for web platform features (CSS, JS APIs, HTML) against the project's actual browser targets. Resolves the project's browserslist config, queries caniuse/MDN compatibility data, reports Baseline status, and recommends fallbacks or progressive enhancement. Use when asking "can I use X", choosing between modern and legacy approaches, reviewing code for unsupported features, or auditing browser compatibility.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No config at all → ask the user what browsers they must support, or state the assumption you're making (e.g.

    line 18
  2. Very specific:

    When browserslist is configured, resolve it to concrete versions: npx browserslist in the project root.

    line 20
  3. Very specific:

    If caniuse-lite is already in the project's node_modules, npx browserslist --coverage style tooling can cross-check locally

    line 28
  4. Distinctive:

    Never answer from memory alone — always cite fetched support data or locally resolved browserslist output

    line 69
  5. Distinctive:

    Don't recommend adding dependencies (polyfills) without stating bundle-size cost and the alternative

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Can I Use

You are answering whether a web platform feature is safe to use in THIS project — not in the abstract. "Safe" means: supported by the project's declared browser targets, or degradable there without breaking the experience.

Step 1: Resolve the Project's Browser Targets

Find the target matrix, in priority order:

  1. browserslist key in package.json, .browserslistrc, or a shared config referenced from them
  2. Framework defaults when nothing explicit exists (note which framework and version defines them)
  3. tsconfig.json target/lib for JS language-feature floors
  4. No config at all → ask the user what browsers they must support, or state the assumption you're making (e.g. Baseline Widely available) explicitly

When browserslist is configured, resolve it to concrete versions: npx browserslist in the project root. Record the oldest version per browser family — that's what every feature must clear.

Step 2: Establish Support Data for Each Feature

For every feature in question, get real compatibility data — do not answer from memory, support tables change:

  • Query caniuse: https://caniuse.com/?search=<feature> via WebFetch, or the raw data at https://raw.githubusercontent.com/Fyrd/caniuse/main/features-json/<feature-id>.json when you know the feature id
  • For features not in caniuse (many JS APIs, newer CSS), use MDN BCD: https://developer.mozilla.org/ feature pages state browser versions and Baseline status
  • If caniuse-lite is already in the project's node_modules, npx browserslist --coverage style tooling can cross-check locally
  • Note the Baseline status when available: Widely available (safe nearly everywhere), Newly available (recent cross-browser — check your matrix's tail), Limited (not cross-browser yet)

Step 3: Compare and Verdict

For each feature, compare its minimum supporting version per browser against the project's oldest target from Step 1:

  • SAFE — supported by every resolved target (including partial-support caveats that don't affect the intended use; state them)
  • NEEDS FALLBACK — unsupported in some targets but degradable: pair the verdict with the concrete technique
  • UNSAFE — required by the use case, unsupported in targets, no viable fallback

Watch the classic gaps: Safari/iOS lagging (and iOS minor-version fragmentation), partial implementations behind flags, prefixed-only support, and features whose caniuse entry is green but whose specific sub-feature (the one you need) is not.

Step 4: Recommend the Path

For NEEDS FALLBACK verdicts, recommend in order of preference:

  • CSS: @supports feature queries with a working base experience; progressive enhancement over polyfill
  • JS APIs: runtime feature detection ('x' in navigator) with graceful degradation; targeted polyfill only when behavior parity is required — name the specific polyfill and its cost
  • Syntax: let the project's existing transpiler/bundler handle it — check whether current browserslist config already transpiles/polyfills it (core-js config, esbuild/SWC target) before adding anything
  • Reconsider: sometimes an older, universally supported technique costs one line more — say so

Output

## Browser Compatibility Check

**Targets** (from <source>): <resolved oldest per family — e.g. Chrome 109, Firefox 115, Safari 15.4, iOS 15.4>

| Feature | Baseline | Blocking target | Verdict | Action |
|---------|----------|-----------------|---------|--------|
| CSS `:has()` | Widely available | Safari 15.4 ✗ (needs 15.4+... ) | NEEDS FALLBACK | `@supports selector(:has(a))` + class toggle fallback |

### Details & caveats
- <per-feature: partial-support notes, flags, prefix requirements, sub-feature gaps>

In review/audit mode (checking existing code instead of a prospective feature): grep the changed or specified files for modern CSS features, JS APIs, and syntax newer than the target floor, then run the same verdict table over everything found. State clearly which files were scanned.

Rules

  • Never answer from memory alone — always cite fetched support data or locally resolved browserslist output
  • The project's declared targets are the truth, even if they look outdated; flag a stale browserslist as a separate observation, don't silently ignore it
  • Distinguish "feature works" from "the sub-feature you need works" — verify the specific usage
  • Don't recommend adding dependencies (polyfills) without stating bundle-size cost and the alternative

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.