Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add FradSer/dotclaude --skill best-practices -a claude-code
Open on GitHub

What 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 any types 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-code

2Manually: put the files in place

~/.claude/skills/best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/best-practices/

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.

best-practices MoizIbnYousaf best-practices transforms vague instructions into detailed coding prompts with verification steps, file context, and explicit constraints. Useful for complex implementation tasks. CX Codex +1 533installs best-practices mobbin The best-practices skill for Claude Code explains what Mobbin can and cannot do and how its skills work together. Read it before other Mobbin skills when asking about capabilities or starting a design task. CX Codex +1 1,800installs best-practices alexander-cedergren best-practices — an OCI architecture skill: sizes VCNs you won't have to rebuild, keeps subnets regional, and warns where Cloud Guard auto-fixes bite. CX Codex +1 121installs best-practices web-quality-skills best-practices is a Claude Code skill for checking web code security, browser compatibility, and code quality. It runs on requests for a security review or code modernization. CX Codex +1 ★ 7,191repo stars voltagent-lang VoltAgent Community voltagent-lang — a pack of subagents with expertise in specific languages and frameworks: Python, TypeScript, Go, Rust, Java and more. Useful when you want advice on language idioms or a framework deep dive. ★ 26,718repo stars dodo-best-practices dodopayments dodo-best-practices guides Dodo Payments integration, from multi-language SDK setup to test environment configuration and webhook flows. CX Codex +1 1,000installs error-handling affaan-m error-handling — a skill that sets one way to handle errors in TypeScript, Python and Go: typed errors, retries, circuit breakers, user-facing messages. CX Codex +1 6,600installs code-craft jssblck code-craft guides type boundaries, invariants, state, effects, errors, and abstraction choices. Use it when an agent is shaping a code change. CX Codex +1 1,700installs rewriting-code-strictly b-mendoza rewriting-code-strictly is a Claude Code skill that rewrites Python, TypeScript/JavaScript, or Go with stricter typing and boundary checks. It runs on requests to harden code or align it with static analysis tools. CX Codex +1 122installs rust-anything Erkam Yaman rust-anything is a Claude Code skill for porting TypeScript, Python, C, Go, Ruby, or Java to Rust. It triggers on requests to migrate code, plan rewrites, or speed up hot loops. CX Codex +1 ★ 7,482repo stars

From the same set16

The whole set →
plugin-best-practices plugin-best-practices validates Claude Code plugin structure, manifests, and architecture against framework standards. Ensures your plugin meets requirements before marketplace submission. CX Codex +1 121installs commit This skill creates atomic conventional commits through git-agent. Use it when a short intent should become a focused Git commit. CX Codex +1 121installs optimize-plugin optimize-plugin validates Claude plugin structure, runs Python sanity checks, and fixes issues via a subagent. Useful when auditing or refactoring plugin manifests and components. CX Codex +1 117installs create-prd The create-prd skill turns product ideas into a structured PRD through a guided interview, then saves it as Markdown or creates a Feishu document. CX Codex +1 117installs create-issues create-issues automates GitHub issue creation with TDD principles, proper labeling, and auto-closing keywords. Detects repository templates, applies conventions, and links issues to epics or related tasks. CX Codex +1 116installs refactor Runs automated code refactoring on specified files, directories, or recent git modifications. CX Codex +1 113installs resolve-issues resolve-issues — a skill for Claude Code handles GitHub issues with an isolated worktree and TDD. It then hands PR creation to the project’s quality and review workflow. CX Codex +1 112installs create-pr The create-pr skill opens GitHub pull requests after quality and security checks, then hands them to CI monitoring and reviewer-comment triage. CX Codex +1 109installs

Project sponsors

Companies that keep this analytics open