From aigroup-workflow
Writes, debugs, and refactors JavaScript using ES2023+ features, async/await, ESM modules, and Node.js APIs. For vanilla JS apps, browser/Node performance, Web Workers, and Fetch API.
npx claudepluginhub codeape-7/ai-agent-workflowgroupThis skill uses the workspace's default tool permissions.
- Building vanilla JavaScript applications
Writes, debugs, and refactors JavaScript using ES2023+ features, async/await, ESM modules, and Node.js APIs. For vanilla apps, browser/Node performance, Web Workers, Fetch API.
Applies opinionated conventions for modern JavaScript and Node.js codebases: ES2023+ features, async/await patterns, ESM/CJS modules, Web Workers, browser APIs, performance optimization.
Masters modern ES6+ JavaScript, async patterns, promises, event loops, and Node.js APIs for browsers and Node. Optimizes code, debugs async issues, ensures compatibility.
Share bugs, ideas, or general feedback.
package.json, module system, Node version, browser targets; confirm .js/.mjs/.cjs conventionseslint --fix); if linter fails, fix all reported issues and re-run before proceeding. Check for memory leaks with DevTools or --inspect, verify bundle size; if leaks are found, resolve them before continuingLoad detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Modern Syntax | references/modern-syntax.md | ES2023+ features, optional chaining, private fields |
| Async Patterns | references/async-patterns.md | Promises, async/await, error handling, event loop |
| Modules | references/modules.md | ESM vs CJS, dynamic imports, package.json exports |
| Browser APIs | references/browser-apis.md | Fetch, Web Workers, Storage, IntersectionObserver |
| Node Essentials | references/node-essentials.md | fs/promises, streams, EventEmitter, worker threads |
X | null or X | undefined patterns?.) and nullish coalescing (??)import/export) for new projectsvar (always use const or let)// ✅ Correct — always handle async errors explicitly
async function fetchUser(id) {
try {
const response = await fetch(`/api/users/${id}`);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return await response.json();
} catch (err) {
console.error("fetchUser failed:", err);
return null;
}
}
// ❌ Incorrect — unhandled rejection, no null guard
async function fetchUser(id) {
const response = await fetch(`/api/users/${id}`);
return response.json();
}
// ✅ Correct
const city = user?.address?.city ?? "Unknown";
// ❌ Incorrect — throws if address is undefined
const city = user.address.city || "Unknown";
// ✅ Correct — named exports, no default-only exports for libraries
// utils/math.mjs
export const add = (a, b) => a + b;
export const multiply = (a, b) => a * b;
// consumer.mjs
import { add } from "./utils/math.mjs";
// ❌ Incorrect — mixing require() with ESM
const { add } = require("./utils/math.mjs");
// ✅ Correct
const MAX_RETRIES = 3;
let attempts = 0;
// ❌ Incorrect
var MAX_RETRIES = 3;
var attempts = 0;
When implementing JavaScript features, provide: