Reviews and refactors async JavaScript error handling to prevent swallowed failures, unhandled rejections, unclear fallback behavior, and weak failure contracts in Promise-based code.
Ships in ngautopilot-javascript. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to review, refactor, or implement safe error handling for asynchronous JavaScript code.
The goal is to prevent swallowed errors, unhandled promise rejections, duplicated catch blocks, unclear control flow, and unsafe fallback behavior.
This skill applies to plain JavaScript, TypeScript, Node.js, browser code, frontend services, API clients, scripts, and test utilities.
Use this skill when the task involves:
async / awaittry / catch.then() / .catch() chainsDo not use this skill when:
Identify every async boundary involved in the requested change:
Choose one explicit error contract per boundary:
Prefer async / await for imperative flows:
async function loadUser(userId) {
try {
return await userApi.getUser(userId);
} catch (error) {
throw new Error("Unable to load user", { cause: error });
}
}
Never swallow errors silently:
try {
await saveData(data);
} catch (error) {
logger.warn("Save failed", error);
throw error;
}
Preserve stack and context when wrapping errors.
Avoid catch-all fallbacks unless empty data is semantically valid.
Handle parallel async flows intentionally:
Promise.all for all-or-nothing workPromise.allSettled for valid partial successAvoid floating promises unless intentionally fire-and-forget:
void saveAuditLog(payload).catch((error) => {
logger.warn("Audit log failed", error);
});
Use for...of with await for sequential async loops and Promise.all for parallel loops.
Test failure paths:
Avoid empty catch blocks.
Avoid returning fake success from failed async work.
Avoid forEach with async callbacks.
Avoid unhandled promise rejections.
Avoid Promise.allSettled when fail-fast behavior is required.
Avoid retries without backoff or limits.
Avoid masking authentication or authorization failures as empty data.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-javascript:javascript--async-error-handlingfrom ngautopilot-javascript
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-javascript9 skills in this plugin
/javascript--async-error-handling--browser-async-error-handling-v18Browser Async Error Handling v18+Reviews asynchronous JavaScript error handling in browser-facing code, focusing on user-facing failure states, safe fallbacks, retry behavior, and preserved error context.
/javascript--async-error-handling--browser-async-error-handling-v20Browser Async Error Handling v20+Reviews asynchronous JavaScript error handling in browser-facing code for modern runtime baselines, focusing on user-facing failure states, safe fallbacks, retry behavior, and preserved error context.
/javascript--async-error-handling--nodejs-async-error-handling-v18Node.js Async Error Handling v18+Reviews asynchronous JavaScript error handling in Node.js 18+ projects, focusing on process-level failure behavior, file and network operations, and safe propagation from scripts and services.
Other plugins' skills for the same job