skills/zeropsin-error/SKILL.md
Create and map ZerospinError instances for Effect-based code in zerospin. Use when defining error codes/messages, wrapping causes, mapping/catching errors in Effects, or returning structured errors from Effect.gen/Effect.fn or promise boundaries.
npx skillsauth add morgs32/skills zerospin-errorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create structured errors with stable codes, human messages, and optional metadata.
code, message, and cause when wrapping.new ZerospinError('some-code').Effect.gen with return yield* new ZerospinError(...).const error = new ZerospinError({
code: 'failed-to-fetch',
message: 'Failed to fetch data',
cause: originalError,
extra: { url },
status: 502,
});
code string; never include dynamic data in the code.message human-readable and specific to the failure.cause when wrapping another error.extra for structured metadata (ids, inputs, context), not for free-form text.status only for HTTP-facing errors.const res = yield* Effect.promise(() => fetch('/api/data'));
if (res.status === 404) {
return yield* new ZerospinError({
code: 'resource-not-found',
message: 'Resource not found',
});
}
const parsed = Effect.promise(() => res.json()).pipe(
Effect.mapError((error) => {
return new ZerospinError({
code: 'failed-to-parse-json',
message: 'Failed to parse JSON',
cause: error,
});
})
);
const safe = effect.pipe(
Effect.catchAll((error) => {
return new ZerospinError({
code: 'operation-failed',
message: error.message,
cause: error,
});
})
);
data-ai
Update agent skills in this repo or another.
development
TypeScript type-safety rules and guidance.
devops
Fix and update Turborepo (Turbo) configuration and task setup. Use for turbo.json errors, schema updates (pipeline -> tasks), and package-level config issues like missing extends.
development
Linting workflow rules for this workspace.