editing

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

A set of rules for editing code files carefully while preserving comments, types, formatting, and existing behavior. It also defines conventions for comments and other small code details.

In plain words
What is it for?
Use it when editing, refactoring, or adding code, especially when comments, type definitions, formatting rules, or non-obvious behavior must be preserved.
Why use it?
It reduces accidental changes during edits and makes refactoring easier to review. The guidance helps keep project code consistent as it changes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Part of the frontend plugin — 13 skills shipped together

Good fit Use it when editing, refactoring, or adding code, especially when comments, type definitions, formatting rules, or non-obvious behavior must be preserved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fubits1/svelte-skills/editing
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 editing
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 editing

README.md
[![agentmods](https://agentmods.dev/badge/skills/fubits1/svelte-skills/editing/github.svg)](https://agentmods.dev/skills/fubits1/svelte-skills/editing)
Your own site
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/editing"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/editing/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 editing

Your own site · 80×15
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/editing"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/editing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,380 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.00025 $0.01380
Opus 5 $0.00013 $0.00690
Sonnet 5 $0.00005 $0.00276
Haiku 4.5 $0.00003 $0.00138

Measured 9d ago against content hash 41eb829b40b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

editing 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 9d 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/editing/SKILL.md · 68 lines

How it starts

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

Editing Files

  • Comments start with a lowercase letter: // unmount svelte components...

  • No trailing period on bullet points or incomplete sentences (headers, fragments, single-noun-phrase comments). e.g. - open /maplibre?debug not - open /maplibre?debug.; // close event listener not // close event listener.

  • No space between number and unit: 30s not 30 s.

  • Lengthy and important comments belong in /** */ blocks, not in stacked // lines. Use // for short single-line comments and inline notes. Anything that explains a non-obvious invariant, a multi-step rationale, or warns about a foot-gun goes in a JSDoc-style block so it stands out and IDEs/tooling render it. Place the block directly above the construct it describes (function, method, branch, or key statement).

    // ❌ BAD: stacked // lines for a multi-paragraph rationale
    // programmatic closes (showPopup, closePopup) reassign or clear
    // activePopup before remove(), so the comparison fails for those
    // and the listener returns. user-initiated closes still match.
    popup.on('close', () => { ... })
    
    // ✅ GOOD: lengthy/important rationale in a /** */ block
    /**
     * close event listener
     *
     * programmatic closes (showPopup, closePopup) reassign or clear
     * activePopup before remove(), so the comparison fails for those
     * and the listener returns. user-initiated closes still match.
     */
    popup.on('close', () => { ... })
    
    // ✅ GOOD: short single-line note stays inline
    // reassign before remove() so the close listener sees activePopup !== popup
    this.activePopup = popup
    
  • A comment you write or touch defaults to DELETE: it earns its place or it goes. This removes only noise: information-bearing comments are protected by the never-remove rule below, which outranks it. For the survival test that decides whether a comment earns its place, the ban-list, and the removal procedure, see references/comments.md.

    // ❌ BAD: restates what void does
    // fire-and-forget the unmount promise
    void unmount(marker._popupComponent);
    
    // ✅ GOOD: says WHY the unusual syntax exists
    // svelte 5 unmount() is async, void satisfies no-floating-promises
    void unmount(marker._popupComponent);
    
  • NEVER remove an existing information-bearing comment: not with Write, not with Edit, not ever. This outranks the default-DELETE above: when a comment carries information (a keyword like HINT/TODO/FIXME, a cross-reference, a non-obvious WHY), it is protected and default-DELETE does not touch it. Modifying such a comment is OK, but NEVER lose information from it. If adding context, append, don't replace. Diff after to check.

  • TODO/comment placement: put the comment directly above the line it describes, not somewhere else. Include the replacement command in the comment so whoever reads it knows exactly what to do. Never write "see TODO above": if the reader has to search for context, the comment is useless. For each TODO - one block, one location, full context.

  • Never use any, unknown, ts-ignore, or eslint-disable: fix the actual issue. Never use eslint-disable with fake justifications (e.g. "reserved for future", "API consistency"). If code is unused, delete it or wire it up.

  • Refactors: grep entire codebase for ALL occurrences FIRST, then fix in one pass. Before removing any conditional logic, enumerate ALL callers and triggers (click, back/forward, programmatic navigation, keyboard, etc.). If ANY trigger still needs the old logic, keep it.

  • When adding state management, trace ALL code paths before declaring done.

  • Use Svelte components, not raw HTML strings. No .setHTML() or template literals.

  • .svelte / .svelte.ts / .svelte.js files: prefer delegating creation, editing, and review to the svelte:svelte-file-editor subagent. It runs in a separate context window, so its docs lookup and autofixer iteration don't spend the main agent's context. Name the subagent in your dispatch to delegate. When editing inline instead (small change, or subagent unavailable), follow the two rules below.

  • .svelte or .svelte.ts/.svelte.js files: ALWAYS invoke svelte:svelte-code-writer skill BEFORE writing or editing. No exceptions.

  • .svelte, .svelte.ts, .svelte.js files: ALWAYS run the Svelte autofixer (mcp__svelte__svelte-autofixer) after editing to validate Svelte 5 correctness.

  • When user says "test first" or "write failing test": write the test, run it, confirm it FAILS, only then implement the fix. Never apply both in the same pass.

  • Don't export types without checking if any consumer imports them. Run knip via pnpm lint:file to catch unused exports (see SETUP.md). If it's only used internally, keep it private.

  • Before writing a config override, check what it overrides. If per-item value equals the inherited default, the override does nothing: don't write it.

  • Markdown files: after writing or editing any .md file, run npx markdownlint-cli <file> and fix all errors before declaring done.

  • Visual refactors (CSS, inline styles, class: directives, layout changes): Follow this workflow BEFORE editing:

    1. Ensure a Storybook story exists for the component. If not, write one first.
    2. Open the story in the browser via Playwright MCP and take a BEFORE screenshot (/tmp/before-<component>.png).
    3. Apply the refactor.
    4. Take an AFTER screenshot (/tmp/after-<component>.png).
    5. Compare visually. If anything shifted, fix it before declaring done. If changes are already applied without a before screenshot: git stash, screenshot, git stash pop, screenshot, compare.

Read the full file on GitHub · 68 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 68 lines · 25 tokens per session scan A 41eb829b40b0

Subscribe to this mod's changes

editing is a skill published in the GitHub repository fubits1/svelte-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 1,380 once invoked, about $0.0001 per session on Opus 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

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens