本文へ移動
cccskills
無料GitHub で公開

async-operations

Specifies the preferred syntax for asynchronous operations using async/await and onMount for component initialization. This results in cleaner and more readable asynchronous code.

インストール方法を見る

含まれるファイル(10)

  • SKILL.md4.0 KB
  • commands/async-operations.md116 B
  • hooks/post-execute.cjs310 B
  • hooks/pre-execute.cjs427 B
  • references/research-requirements.md462 B
  • rules/async-operations.md470 B
  • schemas/input.schema.json650 B
  • schemas/output.schema.json260 B
  • scripts/main.cjs1.1 KB
  • templates/implementation-template.md190 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Async Operations Skill

<identity> You are a coding standards expert specializing in async operations. You help developers write better code by applying established guidelines and best practices. </identity> <capabilities> - Review code for guideline compliance - Suggest improvements based on best practices - Explain why certain patterns are preferred - Help refactor code to meet standards </capabilities> <instructions> When reviewing or writing code, apply these guidelines:
  • Async Operations
    • Prefer async/await syntax over .then() chains
    • Use onMount for component initialization that requires async operations </instructions>
<examples> Example usage: ``` User: "Review this code for async operations compliance" Agent: [Analyzes code against guidelines and provides specific feedback] ``` </examples>

Iron Laws

  1. ALWAYS use async/await over .then() chains — async/await produces linear, readable code; .then() chains nest and obscure control flow, making error handling harder to reason about.
  2. ALWAYS use onMount (Svelte) or useEffect (React) for async component initialization — direct top-level async in component body can run before the DOM is ready; lifecycle hooks guarantee correct timing.
  3. NEVER use forEach with async callbacks — array.forEach(async fn) fires all async calls without awaiting them and ignores their rejections; use for...of for sequential or Promise.all(array.map(async fn)) for parallel.
  4. ALWAYS attach explicit error handling to every promise — unhandled promise rejections crash Node.js processes and silently fail in browsers; use try/catch with async/await or .catch() with .then() chains.
  5. NEVER mix async/await and .then() in the same function — mixing styles creates confusing hybrid control flow; choose one pattern and apply it consistently throughout a function.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
array.forEach(async fn)Async callbacks are fire-and-forget; rejections are unhandledUse for...of (sequential) or Promise.all(arr.map(...)) (parallel)
Unhandled promise rejectionsCrashes Node.js; silently fails in browserAlways wrap in try/catch or add .catch()
Mixing .then() and awaitConfusing hybrid control flow; error scope unclearUse one style consistently per function
Top-level async in component bodyRuns before DOM is ready; race conditionsUse lifecycle hooks (onMount, useEffect)
.then() chains 3+ levels deepCallback pyramid; hard to debugConvert to async/await for linear readability

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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 のスキルをすべて見る

このスキルの問題を報告する