Skip to content
Back to skills

Best Practices

ASecurity

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.

  • 593 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
developmenttypescriptpythonrustgoswiftreactnextjsrefactoring

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add FradSer/dotclaude --skill best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fradser-best-practices/badge)](https://www.skillsdirectory.com/skills/fradser-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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`)

Files in this skill

  • SKILL.md2.1 KB
  • references/_template.md631 B
  • references/go.md9.6 KB
  • references/python.md8.8 KB
  • references/python/INDEX.md5.6 KB
  • references/python/_sections.md973 B
  • references/python/_template.md668 B
  • references/python/fundamental-background.md594 B
  • references/python/fundamental-exceptions.md2 KB
  • references/python/fundamental-future-imports.md1.3 KB
  • references/python/fundamental-global-state.md1.5 KB
  • references/python/fundamental-imports.md1.6 KB
  • references/python/fundamental-packages.md1.1 KB
  • references/python/fundamental-resources.md1.5 KB
  • references/python/fundamental-threading.md1.5 KB
  • references/python/language-comprehensions.md1.1 KB
  • references/python/language-conditionals.md1.1 KB
  • references/python/language-decorators.md1.4 KB
  • references/python/language-default-args.md1.2 KB
  • references/python/language-generators.md1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…