Svelte5 Best Practices
SikandarJODD/cnblocks
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.
A skill your agent uses when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code…
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install AlmanacCode/codealmanac deep-refactor-audit --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .claude/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .claude/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-auditType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install AlmanacCode/codealmanac deep-refactor-audit --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .agents/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .agents/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install AlmanacCode/codealmanac deep-refactor-audit --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .cursor/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .cursor/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/AlmanacCode/codealmanac.git --path .agents/skills/deep-refactor-audit--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install AlmanacCode/codealmanac deep-refactor-audit --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .gemini/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .gemini/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install AlmanacCode/codealmanac deep-refactor-auditInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .github/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .github/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install AlmanacCode/codealmanac deep-refactor-audit --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/AlmanacCode/codealmanac.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/deep-refactor-audit .opencode/skills/deep-refactor-audit && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "deep-refactor-audit" agent skill from https://github.com/AlmanacCode/codealmanac/tree/main/.agents/skills/deep-refactor-audit into .opencode/skills/deep-refactor-audit/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "deep-refactor-audit", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
deep-refactor-auditA skill your agent uses when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code…
Deep Refactor Audit is an agent skill from AlmanacCode/codealmanac. Use when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code cleanup assessment, hand-rolled library review, or no-code report on how a codebase should be reshaped.
Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).
It sits in Development, covering Refactoring. It works with TypeScript. The repository describes itself as: A codebase wiki for AI coding agents. Captures what the code can't say: decisions, flows, invariants, gotchas. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 0f15350. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Deep Refactor Audit loads about 3.5k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 1,118 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from AlmanacCode/codealmanac at commit 0f15350, republished under its Apache-2.0 licence (© AlmanacCode). 1,118 words, ~3,470 tokens.
.claude/skills/deep-refactor-audit/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.This is a no-code architecture audit for aggressively rethinking a codebase. The job is to ask why the codebase is shaped this way, whether that shape still deserves to exist, and what a strong principal engineer would change before allowing the system to keep growing.
AI-generated code often accumulates accidental architecture: features nobody asked to keep, abstractions created for one use case, hand-rolled versions of standard libraries, over-flexible configuration, compatibility paths with no owner, and names that hide what the code actually does. Treat those as suspect until they earn their place.
Because this audit does not modify production code, take intellectual risks. Be creative, skeptical, and specific. Question architecture, naming, feature value, user behavior, dependencies, and whether whole subsystems should exist.
Do not be polite at the expense of usefulness. The valuable output is not "some code smells exist." The valuable output is a clear opinion about what should be preserved, simplified, deleted, or redesigned.
Do not edit implementation files during this audit. You may create notes, diagrams, reports, and plans under docs/.
This restriction is not meant to make the audit timid. It exists so the diagnosis can be bolder than an implementation task.
Before the deep dive, set an explicit audit goal. If the environment has a goal mechanism, use it. Otherwise write the goal at the top of the audit worklog.
Use this shape:
Goal:
Critically audit <scope> to determine which architecture, features, boundaries, names, abstractions, dependencies, and workflows should be preserved, simplified, removed, or redesigned.
Core questions:
- Why does this exist?
- Is it still needed?
- Is this the simplest shape that can support the product?
- Did this complexity come from real constraints or accidental accumulation?
- Is this hand-rolled code justified, or should it use a standard library/framework capability?
- What would the architecture look like if we designed it cleanly today?
Non-goals:
- Do not modify production code.
- Do not produce a shallow smell list.
- Do not assume the current architecture is justified.
- Do not recommend patterns without explaining concrete movement in the codebase.
Success criteria:
- Current architecture is mapped.
- Major boundaries are judged.
- Questionable features are called out.
- Hand-rolled machinery is compared against existing libraries or framework capabilities.
- Accidental complexity is separated from legitimate complexity.
- Prior art, named patterns, and mature repositories are researched where useful.
- A target architecture and refactor roadmap are written.Create a dated folder:
docs/refactor-audit-YYYY-MM-DD/
README.md
worklog.md
source-map.md
smells.md
feature-questions.md
hand-rolled-inventory.md
research-notes.md
subagent-briefs.md
reports/
target-architecture.md
refactor-roadmap.mdUse fewer files for a small repository, but always keep a running worklog. Write notes throughout the audit, not only at the end. The worklog must let another agent resume after compaction without losing the important insights.
For every subsystem, ask:
Classify findings as:
Keep:
The complexity is justified by product value, external constraints, safety, compatibility, performance, or repeated use.
Simplify:
The feature or boundary is useful, but the implementation is more complex than the value requires.
Delete candidate:
The feature, path, abstraction, dependency, parser, compatibility layer, or workflow appears to cost more than it is worth.
Replace with library:
The code hand-rolls a solved problem without a strong reason.
Redesign:
The concept is important, but the current boundary is wrong.
Unknown:
There may be a real reason, but the audit did not find enough evidence.AI-written code often has specific failure modes. Look for:
Be willing to say: this whole feature may not deserve to exist.
Treat hand-rolled infrastructure as a first-class audit target. Sometimes it is correct. Often it is accidental.
Inventory custom implementations of:
For each one, ask:
What is hand-rolled?
What standard library, framework feature, or popular package already solves this?
What special constraints might justify custom code?
What bugs or maintenance costs does the custom version create?
What would be deleted if we adopted the existing solution?
What would become harder if we adopted it?
Recommendation: keep custom / replace / wrap library behind a seam / research further.Do not blindly demand libraries. A small owned parser for a tiny syntax may be better than a heavy dependency. A security-sensitive or performance-sensitive boundary may justify custom code. The audit should force the question and document the answer.
When the code is solving a known problem, research how mature systems solve it. Use web search, official docs, respected engineering writing, and open-source repositories when useful.
Name patterns explicitly. Patterns give vocabulary to the critique.
Use patterns as tools, not decorations. For each pattern, explain:
Pattern:
Where it applies:
What would move:
What boundary would exist:
What gets simpler:
What gets more complex:
Why this is or is not worth it here:Useful patterns to consider:
Also inspect real repositories. If the codebase has a CLI, inspect respected CLI projects. If it has background jobs, inspect job queue systems. If it has multiple providers, inspect SDKs or tools with provider adapters. If it has a frontend, inspect mature apps using the same framework.
Do not copy blindly. Borrow shape.
A deep refactor audit is allowed to question product surface area.
For each expensive feature, ask:
Feature:
What user behavior requires this?
What code complexity does it create?
What other features does it distort?
What would break if it disappeared?
Could a simpler product behavior replace it?
Should we keep, simplify, hide, or remove it?Examples:
A reporting system supports six export formats, but users only need CSV.
Recommendation: delete or defer the unused formats. Keep the export boundary small until usage proves otherwise.A plugin system exists before there are external plugins.
Recommendation: keep a clean internal interface, but remove plugin discovery, lifecycle hooks, and registry machinery until a second real plugin exists.A settings page exposes every internal knob.
Recommendation: separate user preferences from operator/configuration concerns. Remove settings that users cannot reason about.When available, use subagents for independent critique. Do not ask them to validate your opinion. Ask them to find the strongest objections.
Useful subagent roles:
Boundary critic:
Find modules with mixed responsibilities, misleading names, hidden policy, and bad dependency direction.
Feature skeptic:
Find features, flags, modes, compatibility paths, and abstractions that may not deserve to exist.
Hand-rolled machinery critic:
Find custom implementations of solved problems. Compare them against standard libraries, framework features, and popular packages.
Pattern researcher:
Research named architecture patterns and mature open-source examples relevant to one subsystem.
Deletion advocate:
Argue what should be removed entirely. Identify product simplifications that would collapse code complexity.
Target architect:
Propose a cleaner architecture from first principles, ignoring migration cost at first.
Migration realist:
Take the target architecture and identify sequencing, risks, tests, and rollback points.Save subagent outputs under reports/.
Each major finding should use this structure:
Finding:
Evidence:
Why it exists today:
Why that reason may no longer be good enough:
Architectural cost:
User/product value:
Hand-rolled or dependency concern:
Recommendation:
Pattern or prior art:
Risk:
Confidence:
Files inspected:Be direct. A useful audit may say:
This module should not exist.
This feature is distorting the architecture.
This abstraction is premature.
This boundary is too weak.
This name is lying.
This subsystem should become three modules.
This workflow should be deleted unless there is evidence users need it.
This parser should be replaced by a library unless the custom grammar is a product requirement.Do not stop at criticism. Propose the shape the codebase should move toward.
Include:
Use lightweight pseudocode when helpful:
const request = commands.parse(argv);
const result = await operations.run(request);
output.render(result, request.outputMode);Explain why that shape is cleaner.
The roadmap should separate courage from chaos.
Group work into:
Phase 0: Delete, hide, or freeze questionable surface area
Phase 1: Replace unjustified hand-rolled machinery or isolate it behind honest seams
Phase 2: Rename concepts so the architecture can be discussed honestly
Phase 3: Move decisions out of mechanisms
Phase 4: Introduce the right architectural seams
Phase 5: Collapse or replace obsolete workflows
Phase 6: Harden tests around the new shapeFor each phase, include:
Goal:
Changes:
Why first:
Risk:
Verification:The final report should include:
The tone should be serious, opinionated, and evidence-based. This is not a polite lint pass. This is the moment to ask whether the codebase deserves its current shape.
© AlmanacCode, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .agents/skills/deep-refactor-audit of AlmanacCode/codealmanac.
Open the folder on GitHubat commit 0f15350
Deep Refactor Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Deep Refactor Audit this skillAlmanacCode/codealmanac | 997 | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Svelte5 Best PracticesSikandarJODD/cnblocks | 430 | 1 repos | ~810 | Automated safety check: Pass | MIT | |
| Dinero Best Practicesdinerojs/dinero.js | 6.8k | — | ~756 | Automated safety check: Pass | MIT | |
| Code Guidelinesgetsentry/sentry-react-native | 1.8k | — | ~3.2k | Automated safety check: Pass | MIT | |
| AST Visitor Pattern for Unionsprisma/orm | 48k | — | ~830 | Automated safety check: Pass | Apache-2.0 | |
| ast-grep Codemod Referencewarp-drive-data/warp-drive | 3.2k | — | ~2.6k | Automated safety check: Pass | MIT |
SikandarJODD/cnblocks
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.
dinerojs/dinero.js
Core best practices for the Dinero.js money library. An agent skill from dinerojs/dinero.js.
getsentry/sentry-react-native
Enforce Sentry React Native SDK code guidelines for implementation, refactoring, and review.
prisma/orm
Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.
warp-drive-data/warp-drive
Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.
zai-org/ZCode
A skill your agent uses when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who…
AlmanacCode/codealmanac
A skill your agent uses when the user asks to run or prepare the Almanac clean-slate workflow, uninstall all local codealmanac/Almanac CLI artifacts, or reset a machine to first-time Almanac install…
Works with
Categories
A skill your agent uses when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code…. Deep Refactor Audit is an agent skill from AlmanacCode/codealmanac. Use when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code cleanup assessment, hand-rolled library review, or no-code report on how a codebase should be reshaped.
Deep Refactor Audit fits situations like: A user asks for a major architecture/refactor audit; codebase smell investigation; boundary critique; feature simplification review.
Run `npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a claude-code`. Or copy the skill folder (.agents/skills/deep-refactor-audit in AlmanacCode/codealmanac) into .claude/skills/deep-refactor-audit in your project. Claude Code loads it when a task matches its description.
Run `npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a codex`. Or copy the skill folder (.agents/skills/deep-refactor-audit in AlmanacCode/codealmanac) into .agents/skills/deep-refactor-audit in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AlmanacCode/codealmanac --skill deep-refactor-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deep-refactor-audit, .gemini/skills/deep-refactor-audit, .github/skills/deep-refactor-audit and .opencode/skills/deep-refactor-audit in your project.
SKILL.md names no scripts, command-line tools or credentials: Deep Refactor Audit is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Deep Refactor Audit is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Deep Refactor Audit: Svelte5 Best Practices (SikandarJODD/cnblocks, 430 stars), Dinero Best Practices (dinerojs/dinero.js, 6.8k stars), Code Guidelines (getsentry/sentry-react-native, 1.8k stars) and AST Visitor Pattern for Unions (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
AlmanacCode (a GitHub organization) maintains it in AlmanacCode/codealmanac, which has 997 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 25, 2026.
Source: AlmanacCode/codealmanac on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.