scratch4js: Skill for Claude Code

.agents/skills/rsbuild-best-practices/SKILL.md

rsbuild-best-practices is a skill for Claude Code, Codex from playforge-coding/scratch4js. It costs 40 tokens per session (452 once invoked), scanned A, a copy of rsbuild-best-practices, MPL-2.0.

A set of working rules for Rsbuild, a tool that develops and bundles web applications.

In plain words
What is it for?
It guides Rsbuild configuration, development and production commands, type checks, code splitting, asset handling, browser support, and source-map security.
Why use it?
It helps avoid configuration, type-checking, asset, bundle-size, and debugging mistakes in Rsbuild projects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is playforge-coding/scratch4js's own configuration. It tells Claude Code and Codex how to work on scratch4js itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scratch4js configures →

Reuse

Borrowing it

Nothing to install: this file belongs to playforge-coding/scratch4js. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/playforge-coding/scratch4js/main/.agents/skills/rsbuild-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/playforge-coding/scratch4js

Made for: Claude Code, Codex.

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 rsbuild-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/playforge-coding/scratch4js/rsbuild-best-practices/github.svg)](https://agentmods.dev/skills/playforge-coding/scratch4js/rsbuild-best-practices)
Your own site
<a href="https://agentmods.dev/skills/playforge-coding/scratch4js/rsbuild-best-practices"><img src="https://agentmods.dev/badge/skills/playforge-coding/scratch4js/rsbuild-best-practices/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 rsbuild-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/playforge-coding/scratch4js/rsbuild-best-practices"><img src="https://agentmods.dev/badge/skills/playforge-coding/scratch4js/rsbuild-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 452 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 100% copy Near-identical to another mod 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.00040 $0.00452
Opus 5.5 $0.00016 $0.00181
Sonnet 5.5 $0.00008 $0.00090
Haiku 4.5 $0.00004 $0.00045

Measured 2mo ago against content hash 4c0fbe9f344c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rsbuild-best-practices 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 2mo 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.

Origin

This is a copy

100% identical to rsbuild-best-practices — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/rsbuild-best-practices/SKILL.md · 58 lines

What it actually says

Rsbuild Best Practices

Apply these rules when writing or reviewing Rsbuild projects.

Configuration

  • Use rsbuild.config.ts and defineConfig
  • Use tools.rspack or tools.bundlerChain only when no first-class Rsbuild option exists
  • Define explicit source.entry values for multi-page applications
  • In TypeScript projects, prefer tsconfig.json path aliases first

CLI

  • Use rsbuild for local development
  • Use rsbuild build for production build
  • Use rsbuild preview only for local production preview
  • Use rsbuild inspect to inspect final Rsbuild/Rspack configs

Type checking

  • Use @rsbuild/plugin-type-check for integrated dev/build type checks
  • Or run tsc --noEmit/vue-tsc --noEmit as an explicit script step

Bundle size optimization

  • Prefer dynamic import() for non-critical code paths
  • Prefer lightweight libraries where possible
  • Keep browserslist aligned with real compatibility requirements

Asset management

  • Import source-managed assets from project source directories, not from public
  • Reference public files by absolute URL path

Security

  • Do not publish .map files to public servers/CDNs when production source maps are enabled

Debugging

  • Run with DEBUG=rsbuild when diagnosing config resolution or plugin behavior
  • Read generated files in dist/.rsbuild to confirm final config, not assumed config

Profiling

  • Use Node CPU profiling (--cpu-prof) when JavaScript-side overhead is suspected
  • Use RSPACK_PROFILE=OVERVIEW and analyze trace output for compiler-phase bottlenecks

Documentation

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. 2mo ago First seen · 58 lines · 40 tokens per session scan A 4c0fbe9f344c

Subscribe to this mod's changes

rsbuild-best-practices is a skill published in the GitHub repository playforge-coding/scratch4js (2 stars, last pushed 4mo ago), licensed MPL-2.0. It adds 40 tokens to every session and 452 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to rsbuild-best-practices, differing in 4 lines, and is treated as a copy.

Related

Other skills, from other repositories

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

systematic-debugging

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

obra/superpowers · 21 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

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 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