Agent skill
best-practices
Best practices for developing with @inkcre/web-design including coding guidelines and accessibility.
Install this agent skill to your Project
npx add-skill https://github.com/InKCre/design/tree/main/packages/web-design/agent-skills/best-practices
SKILL.md
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
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
i18n
Integrate @inkcre/web-design with vue-i18n for internationalization.
styling
Use @inkcre/web-design styling system with design tokens, SCSS mixins, and theming.
components
Use @inkcre/web-design Vue 3 components. Includes all 22 components with props, events, and usage examples.
router
Integrate @inkcre/web-design with Vue Router using the adapter pattern.
clean-sync-conflicts
Use when git status shows .sync-conflict-* files, when starting a conversation with untracked sync conflict files, or when the user mentions Syncthing conflicts in the repo
openclaw-skill
Didn't find tool you were looking for?