Claude-skill-registry best-practices
Provides language-specific best practices, code quality standards, and framework detection for refactoring workflows
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/best-practices" ~/.claude/skills/majiayu000-claude-skill-registry-best-practices && rm -rf "$T"
manifest:
skills/data/best-practices/SKILL.mdsource content
Best Practices
Language References
Based on file extension, load the appropriate reference:
,.ts
→.jsreferences/typescript.md
,.tsx
→.jsx
+references/typescript.mdreferences/react/react.md
→.py
+references/python.mdreferences/python/INDEX.md
→.goreferences/go.md
→.swiftreferences/swift.md
Universal principles:
references/universal.md
Next.js/React References
For Next.js projects, use
references/react/ directory:
- pattern index by impact levelreferences/react/rules/INDEX.md
- priorities and categoriesreferences/react/rules/_sections.md- Specific rule files matching observed patterns
Rule Application
- Auto-detect frameworks; only apply Next.js rules if Next.js is detected
- Prefer CRITICAL rules first (waterfalls, bundle size, hydration)
- Preserve behavior and public interfaces
Code Quality Standards
- Comments: Only for complex business logic; remove code-restating comments
- Error Handling: Try-catch only where recoverable; no defensive checks in trusted paths
- Type Safety: No
; use proper types orany
with guardsunknown - Style: Match existing code style; check CLAUDE.md
- Cleanup: Remove all unused imports, variables, functions, types
- No compat hacks: Delete unused
, re-exports of deleted code_vars - Renaming: Use descriptive names instead of marking unused
- Dead code: Delete completely, never comment out
Workflow
- Identify target scope
- Detect frameworks and languages
- Load language + framework references
- Filter rules for detected frameworks only
- Analyze complexity, redundancy, violations
- Execute behavior-preserving refinements
- Validate tests pass