MCP HubMCP Hub
スキル一覧に戻る

error-handling-patterns

spences10
更新日 3 days ago
50 閲覧
5
5
GitHubで表示
その他ai

について

このスキルは、開発者向けにSvelte 5のエラー処理パターンを提供します。`<svelte:boundary>`を使用したエラー境界、ローディング状態を伴う非同期操作、フォームエラー管理について解説しています。Svelteアプリケーションで、リトライ機能と保留状態を備えた優雅なエラー処理を実装するためにご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/spences10/devhub-crm
Git クローン代替
git clone https://github.com/spences10/devhub-crm.git ~/.claude/skills/error-handling-patterns

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Error Handling Patterns

Quick Start

<svelte:boundary>
	<ul>
		{#each await get_contacts() as contact}
			<li>{contact.name}</li>
		{/each}
	</ul>

	{#snippet pending()}
		<div class="loading">Loading...</div>
	{/snippet}

	{#snippet failed(error, reset)}
		<div class="error">
			<p>Error: {error.message}</p>
			<button onclick={reset}>Retry</button>
		</div>
	{/snippet}
</svelte:boundary>

Core Principles

  • Error boundaries: Use <svelte:boundary> to catch component errors
  • Pending snippet: Show loading state while awaiting data
  • Failed snippet: Display errors with retry via reset function
  • Await expressions: Use {#each await query()} directly in markup
  • Granular boundaries: Wrap individual features, not entire pages
  • Form errors: Check remote function .error property (e.g., create_contact.error)

Reference Files

GitHub リポジトリ

spences10/devhub-crm
パス: .claude/skills/error-handling-patterns

関連スキル

evaluating-llms-harness

テスト

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

スキルを見る

sglang

メタ

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

スキルを見る

cloudflare-turnstile

メタ

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

スキルを見る

langchain

メタ

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

スキルを見る