code-reuse

code-reuse is a skill for Claude Code from spinspire/pocketbase-sveltekit-starter. It costs 109 tokens per session (2,784 once invoked), scanned A, original, MIT.

A catalogue of tested code patterns from reference repositories, covering UI components, PocketBase hooks, forms, dialogs, authentication, pagination, and live data stores.

In plain words
What is it for?
It is for locating reusable frontend and backend examples, then adapting them to a SvelteKit, PocketBase, or other project setup.
Why use it?
It helps developers find existing code to adapt instead of recreating common features from scratch.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents); mentions OpenCode.

Good fit It is for locating reusable frontend and backend examples, then adapting them to a SvelteKit, PocketBase, or other project setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spinspire/pocketbase-sveltekit-starter/code-reuse
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 spinspire/pocketbase-sveltekit-starter --skill code-reuse
Clone the repo
git clone --depth 1 https://github.com/spinspire/pocketbase-sveltekit-starter

Made for: Claude Code.

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-reuse

README.md
[![agentmods](https://agentmods.dev/badge/skills/spinspire/pocketbase-sveltekit-starter/code-reuse.svg)](https://agentmods.dev/skills/spinspire/pocketbase-sveltekit-starter/code-reuse)
Your own site
<a href="https://agentmods.dev/skills/spinspire/pocketbase-sveltekit-starter/code-reuse"><img src="https://agentmods.dev/badge/skills/spinspire/pocketbase-sveltekit-starter/code-reuse.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,784 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00109 $0.02784
Opus 5 $0.00055 $0.01392
Sonnet 5 $0.00022 $0.00557
Haiku 4.5 $0.00011 $0.00278

Measured 8d ago against content hash 0de05bcdb9b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

code-reuse 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 8d 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.

.agents/skills/code-reuse/SKILL.md · 162 lines

How it starts

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

Code Reuse

Proven, copy-ready code catalog from reference repos. Reuse before building from scratch.

Sources

Repo What to copy Where it lives
pocketbase-sveltekit-starter Frontend lib + components + PB JS hooks sk/src/lib, pb/pb_hooks
spinspire/recipes Frontend lib + components playground + multi-stack templates sk/, pb/, py/, rs/

⚠️ Adapt, don't paste. These use SCSS + box-icons + $app/stores + some legacy export let. Convert: $app/stores$app/state, SCSS → oat-css/app.css tokens, export let → runes ($props/$state/$derived). They are proven patterns, not drop-in code.


1. pocketbase-sveltekit-starter — frontend lib (sk/src/lib)

Core PB client (pocketbase/index.ts)

  • client — typed PocketBase instance (same-origin by default).
  • authModel — readable store on client.authStore.onChange; calls invalidateAll() on auth flips.
  • login(email, password, register?, rest?) — create-if-register then authWithPassword.
  • logout()authStore.clear().
  • save<T>(collection, record, create?) — generic create/update; auto-converts to FormData when a value is File/FileList (via object2formdata). Use for file uploads.
  • watch<T>(idOrName, queryParams?, page?, perPage?, realtime?)PageStore<T> — realtime paginated list store: subscribes to subscribe("*"), maintains result.items (update=replace, create=append, delete=filter). PageStore adds setPage()/next()/prev(); unsubscribe tears down realtime. Good upgrade candidate for our host pool/queue lists.
  • providerLogin(provider, authCollection) — OAuth2 login that backfills name/avatar from meta.
  • webauthnRegister/Login — passkey flow via @simplewebauthn/browser + /api/webauthn/* routes.

pocketbase/ui.ts

  • alertOnFailure(request) — wraps a PB request; surfaces top-level message + per-field data errors via alerts.error().

Read the full file on GitHub · 162 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. 8d ago First seen · 162 lines · 109 tokens per session scan A 0de05bcdb9b6

Subscribe to this mod's changes

code-reuse is a skill published in the GitHub repository spinspire/pocketbase-sveltekit-starter (508 stars, last pushed 16d ago), licensed MIT. It adds 109 tokens to every session and 2,784 once invoked, about $0.0005 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-30.