agentleFS
koteitankoteitan/my-skills/skills/webapp-defaults/SKILL.md

webapp-defaults

Skill1 starsChanged 3 months agoMITView on GitHub

The standing defaults when scaffolding a small vanilla web app (index.html + main.js + style.css) — dark mode ON by default and persisted to localStorage, a top-right hamburger pulldown menu, and tab/option state saved to localStorage and restored on load. Apply when creating a new simple SPA/tool page.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default UI conventions the user re-specifies in every small vanilla web app.

    line 8
  2. Distinctive:

    Keep it minimal and dependency-free.

    line 55

≈ “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

webapp-defaults

Default UI conventions the user re-specifies in every small vanilla web app. Apply them by default when scaffolding a new page unless told otherwise.

When to invoke

  • Creating a new small front-end (a tool page, toy, visualizer) from scratch, especially when the user says "main.js style.css index.html で作って".
  • User asks for a menu / dark mode / state persistence on such a page.

Defaults

  1. Stack: plain index.html + main.js + style.css (vanilla, no build step) unless the project already uses a framework.
  2. Dark mode:
    • Default is DARK.
    • Toggle lives as a checkbox in the menu (below).
    • Persist the choice to localStorage and restore it on load.
  3. Menu: a hamburger pulldown menu in the top-right corner. Put the dark-mode checkbox and any options in it.
  4. State persistence: save UI state — selected tab, chosen options, toggles — to localStorage, and restore it on load so a reload reproduces the last state.

Sketch

// main.js — dark mode default + persistence
const KEY = 'ui';
const state = JSON.parse(localStorage.getItem(KEY) || '{}');
const dark = state.dark ?? true;                 // default dark
document.documentElement.classList.toggle('dark', dark);

function save(patch) {
  Object.assign(state, patch);
  localStorage.setItem(KEY, JSON.stringify(state));
}
// on tab switch: save({ tab: id });  on load: restore state.tab
/* style.css — dark by default via :root, .dark just re-affirms/toggles */
:root { color-scheme: dark; background:#1a1a1a; color:#d4d4d4; }

Keep it minimal and dependency-free. Match existing project style if one exists.

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.