developer-frontend
Frontend development standards — UI/UX principles, accessibility, state management, and component patterns. Load when writing frontend code.
适合你,如果你在写前端代码时需要参考UI/UX、可访问性和组件模式标准。
npx oh-my-skill add dragoscirjan/opencode-config/developer-frontendcurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- dragoscirjan/opencode-config/developer-frontendnpx oh-my-skill verify dragoscirjan/opencode-config/developer-frontend怎么用
商店整理自技能原文 · 版本 f561928 · 表述以原文为准安装后,Claude 会按照前端开发标准编写代码,包括无障碍、性能优化、状态管理、组件设计等,并自动加载相关语言技能。
当你编写前端代码时,Claude 会自动加载此技能,并可能根据代码语言加载对应的语言技能。
技能原文 SKILL.md
Frontend Development Standards
Always load clean-code alongside this skill. Use the detect-language tool to dynamically load the language-specific skill (e.g. lang-ts, lang-vue, lang-css) for the frontend code you are writing. Run the env-get tool for the DEVELOPER_SKILLS variable. If it returns a comma-separated list of skill names, load each of them.
Cross-Cutting Rules
- Accessibility: WCAG 2.1 AA minimum. Semantic HTML. ARIA only when native elements insufficient. Keyboard navigable. Contrast ≥ 4.5:1. Test with axe-core / Lighthouse.
- Performance: Lazy-load routes and heavy components. Code-split at route boundaries. Optimize images (WebP, lazy). Bundle size budgets. Avoid layout shifts (CLS).
- State: Local first. Lift only when shared. Framework-native before external libraries. Normalize complex state.
- Components: Single responsibility. Props in, events/callbacks out. No direct DOM manipulation. Presentational components are pure functions of props.
- Testing pyramid: Unit for logic/utilities. Component for rendering/interaction. e2e for critical flows only.
- Build: Vite for new projects. Use
run-quality-checksto run validations, formatters, and tests before finalizing. - Security: Sanitize user content. Never
innerHTML/v-html/dangerouslySetInnerHTMLwith untrusted data. CSP headers. HTTPS only.
Frameworks (Angular)
Angular — Feature modules. Smart vs presentational components. OnPush change detection. Reactive forms. takeUntilDestroyed or async pipe for RxJS. Standalone components (17+).