best-practices · fradser — Claude Code skill: what it does, how to install
best-practices enforces language-specific standards and framework rules for TypeScript, Python, Go, Swift, and React.
MIT 115 installs ★ 597 updated 2026-10-09
npx skills add FradSer/dotclaude --skill best-practices -a claude-codeWhat best-practices does
This skill maps source extensions to curated guides. Files ending in .ts or .js trigger TypeScript instructions, .py loads Python references, while .go and .swift map to their respective standards. If the assistant identifies Next.js in your workspace, it prioritizes critical frontend rules targeting network waterfalls, hydration errors, and bundle size overhead.
The guidelines enforce strict hygiene during refactoring. Dead code must be deleted rather than commented out, unused imports are stripped, and any types are prohibited in favor of explicit guards or unknown. Existing code style and repository conventions in CLAUDE.md take precedence.
Because the configuration sets user-invocable: false, you do not trigger this skill via a direct slash command. The agent activates it automatically when evaluating or restructuring code.
What it helps with
- eliminate
anytypes across TypeScript codebases - prevent client-side hydration issues and waterfall fetches in Next.js
- strip dead functions, variables, and unused imports during cleanup
- split multi-concern files following Single Responsibility guidelines
Example prompts for the agent
- Review this repository against language-specific quality standards
- Refactor the authentication module while keeping public interfaces intact
- Clean up unused types and eliminate dead code in this component
How to install best-practices
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/best-practices/
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill best-practices -a codex2Manually: put the files in place
.agents/skills/best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill best-practices -a cursor2Manually: put the files in place
.cursor/skills/best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install FradSer/dotclaude refactor/skills/best-practices2Manually: put the files in place
.github/skills/best-practices/SKILL.md1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill best-practices -a gemini-cli2Platform CLI
gemini skills install https://github.com/FradSer/dotclaude --path refactor/skills/best-practicesManually: put the files in place
.devin/skills/best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill best-practices -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about best-practices
How to install best-practices in Claude Code?
Run npx skills add FradSer/dotclaude --skill best-practices -a claude-code. The file will be placed into ~/.claude/skills/best-practices/SKILL.md.
What does best-practices do?
It equips the agent with refactoring rules, framework detection logic, and style guidelines across TypeScript, Python, Go, Swift, and React.
Can best-practices be invoked directly?
No, it specifies user-invocable: false. The AI references its instructions automatically during refactoring tasks and code checks.
Source text
SKILL.md · MIT
--- name: best-practices description: Language-specific best practices, code quality standards, and framework detection rules. Use when executing refactoring workflows, applying code quality rules, detecting frameworks, or checking language-specific patterns for TypeScript, Python, Go, Swift, or React. user-invocable: false version: 1.3.0 --- # Best Practices ## Language References Each file extension maps to a specific reference: - `.ts`, `.js` — `references/typescript.md` - `.tsx`, `.jsx` — `references/typescript.md` + `references/react/react.md` - `.py` — `references/python.md` + `references/python/INDEX.md` - `.go` — `references/go.md` - `.swift` — `references/swift.md` Universal principles are in `references/universal.md`. ## Next.js/React References For Next.js projects, the `references/react/` directory provides: 1. `references/react/rules/INDEX.md` — pattern index by impact level 2. `references/react/rules/_sections.md` — priorities and categories 3. Specific rule files matching observed patterns ## Rule Application - Framework-specific rules (e.g., Next.js) apply only when that framework is detected - **CRITICAL** rules have highest priority: waterfalls, bundle size, hydration - All refactoring MUST preserve behavior and public interfaces ## Code Quality Standards - **Comments**: Only for complex business logic; code-restating comments are unnecessary - **Error Handling**: Try-catch only where recoverable; no defensive checks in trusted paths - **Type Safety**: No `any`; proper types or `unknown` with guards are required - **Style**: Existing code style and CLAUDE.md conventions take precedence - **Cleanup**: Unused imports, variables, functions, and types are removed - **No compat hacks**: Unused `_vars` and re-exports of deleted code are deleted - **Renaming**: Descriptive names are preferred over marking as unused - **Dead code**: Dead code is deleted, never commented out - **File Organization**: Single Responsibility applies at file level; files with multiple concerns are candidates for splitting (see `references/universal.md`)
© FradSer · MIT · FradSer/dotclaude
Similar skills
All skills for Code review and refactoring →best-practices by other authors comes first.