← スキル一覧に戻る

best-practices
by InKCre
Design system and any other design stuff of InKCre
⭐ 0🍴 0📅 2026年1月16日
SKILL.md
name: best-practices description: Best practices for developing with @inkcre/web-design including coding guidelines and accessibility.
Best Practices
Use this skill for guidance on developing with @inkcre/web-design.
Component Development
- Single Responsibility: Each component does one thing well
- High Cohesion, Low Coupling: Keep related code together, minimize dependencies
- Clear API: Props and events should be intuitive
- Avoid Prop Drilling: Use provide/inject for deeply nested data
- Testable: Write components that are easy to test
Naming Conventions
- Components:
camelCase(e.g.,inkButton) - CSS Classes:
kebab-case(e.g.,ink-button) - Props/Variables:
camelCase(e.g.,isLoading) - Events:
kebab-case(e.g.,update:modelValue)
Error Handling
- Use graceful degradation
- Provide user-friendly error messages
- Log errors appropriately
- Validate inputs and provide defaults
Accessibility
- Use semantic HTML elements
- Provide ARIA labels where needed
- Ensure keyboard navigation works
- Test with screen readers
- Maintain proper color contrast
Performance
- Use
v-ifvsv-showappropriately - Avoid unnecessary watchers
- Use
computedfor derived state - Lazy load components when possible
- Optimize large lists with virtual scrolling
Code for Human Brains
Write code that's easy to understand:
- Keep it simple: Prefer straightforward solutions
- Limit cognitive load: Keep functions simple (≤4 concepts to hold in memory)
- Use meaningful names: Variables should be self-documenting
- Prefer early returns: Avoid deeply nested conditions
- Comment the "why": Explain motivation, not just what
Example
❌ Hard to understand:
if (val > someConstant && (condition2 || condition3) && (condition4 && !condition5)) {
// What are we checking?
}
✅ Easy to understand:
const isValid = val > someConstant;
const isAllowed = condition2 || condition3;
const isSecure = condition4 && !condition5;
if (isValid && isAllowed && isSecure) {
// Clear what each condition means
}
スコア
総合スコア
55/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です


