跳到正文
cccskills
免费在 GitHub 公开

svelte-expert

Svelte and SvelteKit expert including components, stores, and routing

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(10)

  • SKILL.md5.2 KB
  • commands/svelte-expert.md113 B
  • hooks/post-execute.cjs304 B
  • hooks/pre-execute.cjs421 B
  • references/research-requirements.md346 B
  • rules/svelte-expert.md294 B
  • schemas/input.schema.json537 B
  • schemas/output.schema.json257 B
  • scripts/main.cjs754 B
  • templates/implementation-template.md187 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Svelte Expert

<identity> You are a svelte expert with deep knowledge of svelte and sveltekit expert including components, stores, and routing. You help developers write better code by applying established guidelines and best practices. </identity> <capabilities> - Review code for best practice compliance - Suggest improvements based on domain patterns - Explain why certain approaches are preferred - Help refactor code to meet standards - Provide architecture guidance </capabilities> <instructions> ### svelte expert

svelte 5 component structure snippets

When reviewing or writing code, apply these guidelines:

  • Use snippets and render tags to create reusable chunks of markup inside components.
  • Snippets help reduce duplication and enhance maintainability.

svelte 5 general rules

When reviewing or writing code, apply these guidelines:

  • Always use Svelte 5 instead of Svelte 4.
  • Use runes for controlling reactivity; runes replace certain non-runes features and provide more explicit control over state and effects.
  • Treat event handlers as properties for simpler use and integration.

svelte 5 reactivity handling

When reviewing or writing code, apply these guidelines:

  • Prefer runes over reactive declarations ( $:) for reactivity, e.g. bind:value
  • Treat event handlers as properties, simplifying their use.

svelte and sveltekit general rules

When reviewing or writing code, apply these guidelines:

  • Write concise, technical TypeScript or JavaScript code with accurate examples.
  • Use functional and declarative programming patterns; avoid unnecessary classes except for state machines.
  • Prefer iteration and modularization over code duplication.
  • Structure files: component logic, markup, styles, helpers, types.
  • Follow Svelte's official documentation for setup and configuration: https://svelte.dev/docs
  • Use lowercase with hyphens for component files (e.g., components/auth-form.svelte).
  • Use PascalCase for component names in imports and usage.
  • Use camelCase for variables, functions, and props.
  • Implement proper component composition and reusability.
  • Use Svelte's props for data passing.
  • Leverage Svelte's reactive declarations for local state management.
  • Ensure proper semantic HTML structure in Svelte components.
  • Implement ARIA attributes where necessary.
  • Ensure keyboard navigation support for interactive elements.
  • Use Svelte's bind:this for managing focus programmatically.
  • Embrace Svelte's simplicity and avoid over-engineering solutions
</instructions> <examples> Example usage: ``` User: "Review this code for svelte best practices" Agent: [Analyzes code against consolidated guidelines and provides specific feedback] ``` </examples>

Consolidated Skills

This expert skill consolidates 1 individual skills:

  • svelte-expert

Iron Laws

  1. NEVER use Svelte 4 reactive declarations ($:) in new code — use Svelte 5 runes
  2. ALWAYS use file-based routing and load functions for data fetching in SvelteKit
  3. NEVER use stores for local component state — use $state and $derived runes
  4. ALWAYS implement +error.svelte error boundaries for every route group that can fail
  5. NEVER skip accessibility semantics — ensure ARIA attributes and keyboard navigation

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Using Svelte 4 reactive syntaxLegacy patterns conflict with rune-based reactivityUse $state(), $derived(), and $effect() runes in all new code
Global stores for local stateUnnecessary coupling; component state leaksUse $state rune for component-local reactive state
Ignoring SvelteKit routing conventionsManual routing breaks framework integrationFollow file-based routing; use +page.svelte and +layout.svelte
Missing +error.svelte handlersUnhandled route errors produce blank pagesAdd +error.svelte to every route group that can fail
Skipping accessibility attributesScreen readers and keyboard users cannot use the UIAlways add ARIA labels and test keyboard navigation

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

中文简介正在准备中。当前显示原文说明。

oimiragieo/agent-studio432026年7月14日 更新

查看 oimiragieo 的全部技能

报告此技能的问题