mcpField
B
best-practices

best-practices

github.com/fradserDevelopment596114 installsUpdated 5w ago
Repository

About best-practices

A development skill that provides language- and framework-specific coding references alongside universal code quality guidance. It prioritizes applicable rules while requiring refactors to preserve behavior and public interfaces.

Key features

  1. 01Map file extensions to language references
  2. 02Provide React and Next.js rule indexes
  3. 03Apply framework rules only when detected
  4. 04Prioritize critical performance and hydration rules
  5. 05Set standards for types, errors, and cleanup

Use cases

  1. 01Find guidance for a file's programming language
  2. 02Apply relevant React or Next.js patterns
  3. 03Review code quality during refactoring
  4. 04Keep refactors consistent with existing conventions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/fradser/dotclaude --skill best-practices

After installing, type/best-practicesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
_template.md
go.md
python.md
references/python/
_sections.md
_template.md
fundamental-background.md
fundamental-exceptions.md
fundamental-future-imports.md
fundamental-global-state.md
fundamental-imports.md
fundamental-packages.md
fundamental-resources.md
fundamental-threading.md
INDEX.md
language-comprehensions.md
language-conditionals.md
language-decorators.md
language-default-args.md
language-generators.md
language-getters-setters.md
language-iterators.md
language-lambda.md
language-lexical-scoping.md
language-nested-classes.md
language-power-features.md
language-properties.md
language-true-false.md
quality-function-length.md
quality-lint.md
quality-main.md

Details

From the project README

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)

Comments

Markdown supported