code-style

code-style is a skill for Claude Code from fubits1/svelte-skills. It costs 48 tokens per session (1,392 once invoked), scanned A, original, MIT.

A general code-style guide covering names, braces, HTML data attributes, and CSS nesting. Data attributes are custom HTML attributes used to store values for scripts or styling.

In plain words
What is it for?
Use it when editing code, writing functions, naming variables, writing conditional statements, adding HTML data attributes, or applying CSS nesting.
Why use it?
It gives coding work a consistent form and prevents common readability and style-check problems, such as unclear variable names or malformed data attributes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the frontend plugin — 13 skills shipped together

Good fit Use it when editing code, writing functions, naming variables, writing conditional statements, adding HTML data attributes, or applying CSS nesting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fubits1/svelte-skills/code-style
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fubits1/svelte-skills --skill code-style
Clone the repo
git clone --depth 1 https://github.com/fubits1/svelte-skills

Made for: Claude Code.

Or install frontend, the plugin that ships this one along with the rest of its 13 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/fubits1/svelte-skills/code-style/github.svg)](https://agentmods.dev/skills/fubits1/svelte-skills/code-style)
Your own site
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/code-style"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/code-style/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-style

Your own site · 80×15
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/code-style"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/code-style.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,392 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01392
Opus 5.5 $0.00019 $0.00557
Sonnet 5.5 $0.00010 $0.00278
Haiku 4.5 $0.00005 $0.00139

Measured 11d ago against content hash 4798a45b1eb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/frontend/skills/code-style/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Style

REQUIRED SUB-SKILLS:

  • When Svelte is involved (.svelte, .svelte.ts, .svelte.js), invoke svelte-5:code-style-svelte. If the svelte-5 plugin isn't installed, stop and ask the user to install it.
  • When CSS is involved (CSS or SCSS files, <style> blocks, inline style attributes, style: directives), invoke frontend:code-style-css.

Brace Style

Single-line if without braces is OK only when the entire statement fits on one line:

// OK — fits on one line. But then we need an empty line after the statement, except there is another if, then we need an empty line after the last if.
if (x) doThing();

//OK
if (x) doThing();
if (y) doThingY();
if (z) doThingZ();

let x = 1

//NOT OK
if (x) doThing();
let x = 1

// NOT OK — body wraps to the next line, needs braces
if (x)
  doThing();

// Correct
if (x) {
  doThing();
}

HTML Data Attributes

Always use key-value syntax. Never use bare/boolean data attributes.

<!-- BAD -->
<div data-active></div>

<!-- GOOD -->
<div data-active="true"></div>

Markup and Locale

  • A native <button> activates on Enter and Space, an <a href> on Enter only. Use <button> for actions and <a href> for navigation to a real URL; only a non-semantic element with a role needs its own key handler.
  • Give inputs a meaningful name, the matching type (email, tel, url, number) and inputmode, and turn off spellcheck on emails, codes and usernames (spellcheck="false").
  • Give every field that collects information about the user its autocomplete token (name, email, tel, street-address, one-time-code), which WCAG 1.3.5 requires. Use autocomplete="off" only on a field that must never be autofilled.
  • Wrap a checkbox or radio and its text in one <label>, so the whole row is a single hit target with no dead zone.
  • Keep a submit button enabled until the request starts, then show a spinner while it runs.
  • Warn before the user leaves with unsaved changes: beforeunload on plain pages, beforeNavigate on SvelteKit (svelte-5:code-style-svelte).
  • Never disable zoom with user-scalable=no or maximum-scale=1. Match <meta name="theme-color"> to the page background.
  • During a drag, put inert on the content that isn't a drop target, not on the dragged element (text selection: frontend:code-style-css).
  • Format dates, times, numbers and currency with Intl.DateTimeFormat and Intl.NumberFormat. Detect the language from Accept-Language or navigator.languages, not the IP. Mark brand names, code and identifiers with translate="no".

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · +6 lines 4798a45b1eb1
  2. 12d ago Changed · +12 lines · +9 tokens per session d2d64f042527
  3. 2mo ago First seen · 124 lines · 39 tokens per session scan A 435c4730d0ff

Subscribe to this mod's changes

code-style is a skill published in the GitHub repository fubits1/svelte-skills (10 stars, last pushed 12d ago), licensed MIT. It adds 48 tokens to every session and 1,392 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

code-style compared with skills from other repositories

code-style next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-stylefubits1/svelte-skillsSkill1012d agoMITA48Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code