Agent SkillsFradSer/dotclaude › best-practices

best-practices

GitHub

提供多语言代码规范、质量标准和框架检测规则,用于重构工作流、代码审查及模式检查,确保行为一致性和类型安全。

refactor/skills/best-practices/SKILL.md FradSer/dotclaude

Trigger Scenarios

执行代码重构 应用代码质量标准 检测前端或后端框架 检查特定语言的编码模式

Install

npx skills add FradSer/dotclaude --skill best-practices -g -y
More Options

Non-standard path

npx skills add https://github.com/FradSer/dotclaude/tree/main/refactor/skills/best-practices -g -y

Use without installing

npx skills use FradSer/dotclaude@best-practices

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add FradSer/dotclaude --all -g -y

预览 repo 内 skill

npx skills add FradSer/dotclaude --list

SKILL.md

Frontmatter
{
    "name": "best-practices",
    "version": "1.3.0",
    "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
}

Best Practices

Language References

Each file extension maps to a specific reference:

  • .ts, .jsreferences/typescript.md
  • .tsx, .jsxreferences/typescript.md + references/react/react.md
  • .pyreferences/python.md + references/python/INDEX.md
  • .goreferences/go.md
  • .swiftreferences/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)

Version History

  • 6f2a0b2 Current 2026-08-20 11:01

Same Skill Collection

.claude/skills/reflect-skills-from-memory/SKILL.md
acpx/skills/use-acpx/SKILL.md
antigravity/skills/delegate/SKILL.md
antigravity/skills/research/SKILL.md
code-context/skills/code-context/SKILL.md
code-context/skills/get-context/SKILL.md
git-agent/skills/commit-and-push/SKILL.md
git-agent/skills/commit/SKILL.md
git-agent/skills/init/SKILL.md
git-agent/skills/related/SKILL.md
git/skills/commit-and-push/SKILL.md
git/skills/commit/SKILL.md
git/skills/finish-feature/SKILL.md
git/skills/finish-hotfix/SKILL.md
git/skills/finish-release/SKILL.md
git/skills/start-feature/SKILL.md
git/skills/start-hotfix/SKILL.md
git/skills/start-release/SKILL.md
github/skills/create-issues/SKILL.md
github/skills/create-pr/SKILL.md
github/skills/resolve-issues/SKILL.md
github/skills/review-pr/SKILL.md
hardware/skills/use-kicad-cli/SKILL.md
hardware/skills/use-openscad/SKILL.md
interfaces/skills/better-interface/SKILL.md
lark/skills/SKILL.md
marketing/skills/SKILL.md
mattpocock/skills/deprecated/design-an-interface/SKILL.md
mattpocock/skills/deprecated/qa/SKILL.md
mattpocock/skills/deprecated/request-refactor-plan/SKILL.md
mattpocock/skills/deprecated/ubiquitous-language/SKILL.md
mattpocock/skills/engineering/ask-matt/SKILL.md
mattpocock/skills/engineering/bdd/SKILL.md
mattpocock/skills/engineering/code-review/SKILL.md
mattpocock/skills/engineering/codebase-design/SKILL.md
mattpocock/skills/engineering/diagnosing-bugs/SKILL.md
mattpocock/skills/engineering/domain-modeling/SKILL.md
mattpocock/skills/engineering/grill-with-docs/SKILL.md
mattpocock/skills/engineering/implement/SKILL.md
mattpocock/skills/engineering/improve-codebase-architecture/SKILL.md
mattpocock/skills/engineering/prototype/SKILL.md
mattpocock/skills/engineering/research/SKILL.md
mattpocock/skills/engineering/resolving-merge-conflicts/SKILL.md
mattpocock/skills/engineering/setup-matt-pocock-skills/SKILL.md
mattpocock/skills/engineering/tdd/SKILL.md
mattpocock/skills/engineering/to-spec/SKILL.md
mattpocock/skills/engineering/to-tickets/SKILL.md
mattpocock/skills/engineering/triage/SKILL.md
mattpocock/skills/engineering/wayfinder/SKILL.md
mattpocock/skills/engineering/wizard/SKILL.md

Metadata

Files
0
Version
6f2a0b2
Hash
916e5e40
Indexed
2026-08-20 11:01

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-24 22:32
浙ICP备14020137号-1 $방문자$