Svelte5 Best Practices
SikandarJODD/cnblocks
Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.
Project structural organization rules for Bun/TypeScript CLI.
$ npx skills add nklisch/claude-code-modes --skill structural-refactor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nklisch/claude-code-modes structural-refactor --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/nklisch/claude-code-modes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/structural-refactor .claude/skills/structural-refactor && 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 "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .claude/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactorType 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 nklisch/claude-code-modes --skill structural-refactor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nklisch/claude-code-modes structural-refactor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/structural-refactor .agents/skills/structural-refactor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .agents/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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 nklisch/claude-code-modes --skill structural-refactor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nklisch/claude-code-modes structural-refactor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/structural-refactor .cursor/skills/structural-refactor && 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 "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .cursor/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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/nklisch/claude-code-modes.git --path .claude/skills/structural-refactor--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 nklisch/claude-code-modes --skill structural-refactor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nklisch/claude-code-modes structural-refactor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/structural-refactor .gemini/skills/structural-refactor && 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 "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .gemini/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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 nklisch/claude-code-modes structural-refactorInstalls 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 nklisch/claude-code-modes --skill structural-refactor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/structural-refactor .github/skills/structural-refactor && 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 "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .github/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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 nklisch/claude-code-modes --skill structural-refactor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nklisch/claude-code-modes structural-refactor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nklisch/claude-code-modes.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/structural-refactor .opencode/skills/structural-refactor && 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 "structural-refactor" agent skill from https://github.com/nklisch/claude-code-modes/tree/main/.claude/skills/structural-refactor into .opencode/skills/structural-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "structural-refactor", 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.
structural-refactorProject structural organization rules for Bun/TypeScript CLI.
Structural Refactor is an agent skill from nklisch/claude-code-modes. Project structural organization rules for Bun/TypeScript CLI. Proactively scans for organizational issues and produces a prioritized plan. Defines file, folder, and module structure preferences.
Its SKILL.md is about 530 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/centralized-types.md`, `references/file-size-limit.md` and `references/flat-by-default.md`).
It sits in Development, covering Refactoring. It works with TypeScript. The repository describes itself as: CLI launcher for Claude Code with behaviorally-tuned system prompts — control agency, quality, and scope instead of fighting the defaults. The licence is MIT.
Read from SKILL.md and the folder at commit 4dbbb28. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGlobGrepBashAgentWriteFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
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.
Structural Refactor loads about 526 tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 193 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 noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Glob, Grep, Bash, Agent, WriteAutomated 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 nklisch/claude-code-modes at commit 4dbbb28, republished under its MIT licence (© nklisch). 193 words, ~526 tokens.
.claude/skills/structural-refactor/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Scan the codebase for organizational issues based on these structural rules. Each rule has a reference file with rationale, examples, and exceptions.
| Rule | Summary (one line) | Reference |
|---|---|---|
| Flat by Default | Keep src/ flat; group into subdirectories only when 3+ files share a concern | details |
| Soft 300-Line Limit | Implementation files should stay under 300 lines; split when single-domain logic exceeds it | details |
| Test Co-location | Unit tests next to source (file.test.ts); integration/e2e tests also in src/ | details |
| Centralized Types | All domain types/interfaces/enums in types.ts; no local type definitions | details |
| No Barrel Exports | No index.ts re-export files; always import directly from the source module | details |
| Prompt Domain Organization | Prompts organized by domain concept (axis/modifier), not by implementation | details |
| kebab-case Files | All source files use kebab-case; test files use {source}.test.ts suffix | details |
Write the refactoring plan to docs/structural-refactor-plan.md.
The document should be a prioritized refactoring plan with these sections:
Implement-ready entries with file paths, current layout, target layout, and acceptance criteria.
Valid reorganizations with moderate impact. Brief entries with paths and rationale.
Code that technically violates a rule but should NOT be reorganized, with explanation why.
© nklisch, MIT. 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 7 other files (references) in .claude/skills/structural-refactor of nklisch/claude-code-modes.
Open the folder on GitHubat commit 4dbbb28
Structural Refactor 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 |
|---|---|---|---|---|---|---|
| Structural Refactor this skillnklisch/claude-code-modes | 116 | — | ~526 | Automated safety check: Notes | MIT | |
| 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.
AlmanacCode/codealmanac
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…
nklisch/claude-code-modes
Compare this project's base prompts and model metadata against a Claude Code release.
nklisch/claude-code-modes
Project stylistic refactoring rules for Bun/TypeScript CLI. An agent skill from nklisch/claude-code-modes.
nklisch/claude-code-modes
Project code patterns and conventions. An agent skill from nklisch/claude-code-modes.
Works with
Categories
Project structural organization rules for Bun/TypeScript CLI. Structural Refactor is an agent skill from nklisch/claude-code-modes. Project structural organization rules for Bun/TypeScript CLI.
Structural Refactor fits situations like: tasks that involve Refactoring.
Run `npx skills add nklisch/claude-code-modes --skill structural-refactor -a claude-code`. Or copy the skill folder (.claude/skills/structural-refactor in nklisch/claude-code-modes) into .claude/skills/structural-refactor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nklisch/claude-code-modes --skill structural-refactor -a codex`. Or copy the skill folder (.claude/skills/structural-refactor in nklisch/claude-code-modes) into .agents/skills/structural-refactor 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 nklisch/claude-code-modes --skill structural-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structural-refactor, .gemini/skills/structural-refactor, .github/skills/structural-refactor and .opencode/skills/structural-refactor in your project.
SKILL.md names no scripts, command-line tools or credentials: Structural Refactor is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Glob, Grep, Bash, Agent, Write.
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 notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Structural Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 526 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Structural Refactor: 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.
nklisch (a GitHub user) maintains it in nklisch/claude-code-modes, which has 116 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 1, 2026.
Source: nklisch/claude-code-modes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.