mengto/skills7 files

Web Technique To Skill

Turn a visual or interaction technique you already built into a reusable web-design skill, by isolating the one mechanism that makes it work while reproducing its approved reference exactly around that focus, and packaging it with a demo that proves both the mechanism and the visual fidelity. Covers finding the mechanism, naming the technique plainly, disclosing the verified runtime and renderer, auditing reference layers, carrying real numbers instead of adjectives, preserving owned staging, keeping expensive gotchas, declaring the boundary against neighbouring skills, and browser-verifying before claiming it works. Use when a page, canvas scene, shader, scroll effect, layout system, or hover interaction turned out well and should become a skill rather than staying in one project.

Specification
Skill ID
mengto/skills/web-technique-to-skill
Publisher
mengto
Repository
skills
Installs
0
Files
7
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

mengto/skills/web-technique-to-skillInstalls these files
  • SKILL.md
  • agents/openai.yaml
  • demo/PROMPT.md
  • demo/expected-output.md
  • demo/index.html
  • demo/input.md
  • demo/preview.jpg

What this skill tells the agent

Web Technique to Skill

Start from working code, not from prose. Reach for article-prompts-to-skills when the source is an article or a prompt pack that describes behavior. Reach for this when you built the thing, it works, and the knowledge is currently trapped in one file.

Extract one mechanism per skill. A page that turned out well usually holds several; package them separately or each one gets diluted.

Treat this as the living quality contract for every web-technique skill. On every creation or revision, audit this skill too. If the work exposes a missing fidelity rule, failure mode, packaging constraint, or verification step, update this contract in the same scoped change instead of solving it only inside one child skill.

Name the mechanism in one sentence

Write the sentence before you write anything else: the one thing that, if removed, makes the effect stop working. If you cannot write it, you have a look, not a mechanism, and there is no skill here yet.

The sentence decides everything downstream. For a leaf fall it is "the tumble crosses edge-on, and that instant of near-disappearance is what the eye reads as a leaf" — so the sprite artwork, the palette, and the night scene are all staging, and the tumble is the skill.

Test it: change the subject, the palette, and the layout in your head. If the sentence still holds, it is the mechanism. If it stops making sense, you named the staging.

Name the demo and disclose the stack

Use the concrete technique name for the visible h1 and browser <title>: Wisps, Cursor Ripples, Liquid Metal Border, or Scroll-scrubbed Word Reveal. Do not hide the subject behind an abstract mechanism claim. “Draw at any speed” describes behaviour, but it does not tell anyone what the demo is.

Put the verified implementation path directly above or below that title. Name, in order:

  1. The runtime or framework: Vanilla JavaScript, React, Vue
  2. The renderer or browser API: Canvas 2D, WebGL, DOM/CSS, SVG
  3. The technique layer when present: GLSL shaders, Three.js, GSAP, ScrollTrigger

Write Vanilla JavaScript · Canvas 2D or Three.js · WebGL · GLSL, not “interactive experiment” or “motion study.” Never guess from the look. Verify imports, renderer construction, and context creation in the source. getContext('2d') is Canvas 2D, not a shader; WebGLRenderer plus ShaderMaterial is Three.js, WebGL, and GLSL. When the visual could be mistaken for a more complex stack, state the absence plainly: No WebGL, shaders, or Three.js.

Separate the effect stack from the interface stack when they differ. Write Vanilla JavaScript + Canvas 2D effect; CSS interface instead of listing CSS beside Canvas 2D as if both render the particles. Readers should know which technology creates the technique and which technology only lays out its controls.

If an approved reference headline must remain for layout fidelity, keep it and put the technique name plus stack in the browser title and the reference's existing kicker, control panel, or secondary label. The implementation must still be obvious on the first screen.

Split mechanism from staging

Sort every part of the source into three piles and keep only the first:

pilegoes whereexamples
mechanismthe skillthe maths, the state model, the ordering constraint, the budget
stagingthe demo onlypalette, copy, imagery, page layout, brand
incidentalnowhereselector names, a font choice, a one-off asset path

Strip project selectors and incidental asset paths from the reusable mechanism in the skill body. Keep the approved reference staging in the demo: the same owned brand, palette, type treatment, composition, asset placement, atmosphere, and motion hierarchy. Isolate the technique by narrowing what the demo teaches and controls, not by inventing a different visual world.

Anchor every rule to the failure it prevents

State the wrong result, not the right adjective. A rule with a named failure is testable; a rule without one is decoration.

  • Weak: "vary the particle rotation for a natural feel."
  • Strong: "drive rotation from the tumble angle, ninety degrees out of phase. An independent sine reads as a wobble or as an easing bug."

If you cannot name what goes wrong, you probably never tested the alternative, and the rule may not be real. Cut it or go and find out.

Carry numbers, not adjectives

Ship the constants you actually landed on. "Subtle" is unusable; 0.3–0.5 is a starting point someone can adjust.

Include ranges per layer or state, timing and easing, size and spacing, budgets (dt clamp, DPR cap, instance counts), and any formula that trades one quantity against another. Where a value was tuned by measurement rather than taste, say what was measured.

Prefer a small table over prose when three or more parameters vary together.

Keep the expensive gotchas

The rules worth most are the ones that cost hours and cannot be re-derived by reading the code. They are usually one of:

  • Colour space — a value that looks right in the editor and wrong on screen because something decodes or tone-maps between the two.
  • Layout timing — code that measures once and is correct only if layout already happened; the fix is an observer, not a longer timeout.
  • Stacking and compositing — an element that cannot rise above another because of a context created three ancestors up.
  • Ordering — two correct operations that are wrong in one order.
  • Platform quirks — a property that silently no-ops on one engine.

Write these as their own rule with the symptom first, so the reader recognises the bug they are currently staring at.

Declare the boundary in the opening lines

Name the nearest existing skill and say when to reach for it instead. Search agent-skills/*/*/SKILL.md before you start; if a skill already covers the mechanism, extend it rather than adding a near-duplicate.

Two skills that both "add particles" with no stated boundary means neither gets picked correctly.

Fold in accessibility and lifecycle

For web-design skills these are part of the mechanism, not an appendix:

  • Under prefers-reduced-motion: reduce, render a designed still frame. Do not hide the effect; the composition was built with it in. Keep controls live so they still do something.
  • Pause on document.hidden and when the section leaves the viewport. Reset the time base on resume so the first frame does not integrate the whole pause.
  • Clamp dt to about 1/30 s. Cap device pixel ratio at 2.
  • Size from a ResizeObserver, and guard any build step against a zero viewport.
  • Keep controls as real form elements, keyboard reachable, with visible focus and a live region for changes.

State the cost honestly

Say what is actually expensive, and measure before claiming it. Profile rather than guess: the part that looks heavy often is not. Name the real bottleneck, the cheap lever, and the thing that does not matter.

Report the lever that buys the most for the least — for a recycled particle field, tightening the spawn band beats raising the count, because on-screen density goes as count ÷ area.

Record where the design came from

Write one line in SKILL.md naming the source: what the project was, and what the mechanism was doing in it. A reader decides whether the skill applies to them by understanding the context it survived — "extracted from a dark WebGL Kyoto night scene where it had to stay legible over type" tells them more than any amount of description.

The demo should look like that source — see Direct the demo below. What stays behind is only what you do not own: a client's name and brand, licensed fonts, purchased or third-party imagery. Substitute those and reproduce everything else.

Direct the demo

Use this skill in a project

Open any RiverX project, search the Skills panel for mengto/skills/web-technique-to-skill, and install it in one click.

Use this skill