modules/programs/agents/shared/skills/effect-deslopify-idiomatic/SKILL.md
Audit and remediate Effect code to idiomatic standards. Chains effect-sdd audit methodology with Effect best practices to systematically identify and fix non-idiomatic patterns. USE THIS SKILL WHEN: 'deslopify', 'make this idiomatic effect', 'audit effect quality', 'is this good effect code', 'library-grade effect'.
npx skillsauth add MichaelVessia/nixos-config effect-deslopify-idiomaticInstall 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.
Systematic audit and remediation of Effect-TS code to library-grade idiomatic standards.
Companion skills: effect-best-practices (pattern reference), effect-sdd (methodology). These provide the pattern reference and methodology this skill orchestrates.
Apply to any Effect-TS codebase, package, or file path.
Run SDD audit mode across phases 1-4 on the target.
Produce a gap list covering:
readFileSync, existsSync, execSync, etc. instead of Effect platform services)Config)FileSystem.layerNoop)For each gap:
Implement highest-impact fixes. Priority order:
Add/keep regression tests for bug fixes (TDD: failing test first, then fix).
Run all applicable gates:
npx tsc --noEmit or pnpm check)npx effect-language-service quickfixes --project tsconfig.json (if configured)These are non-negotiable for library-grade Effect code:
| Constraint | Why |
|-----------|-----|
| No as any | Type escapes hide real errors |
| No silent catchAll error swallowing | Errors must be logged or propagated; use catchTag or inspect error content for selective recovery |
| No raw fetch when typed client exists | Duplicating URLs loses type safety |
| No ad-hoc mutable state in Effect paths | Use Ref for tracked state |
| Impure ops wrapped in Effect.sync / Effect APIs | Effect must track all side effects |
| No sync Node.js I/O (readFileSync, existsSync, execSync, etc.) | Use FileSystem.FileSystem or an Effect-tracked shell service; sync calls break testability and block the event loop |
| Tunable constants use Config | Hardcoded org names, timeouts, concurrency limits should use Config.string/Config.number with Config.withDefault for env-var overridability |
| Match.exhaustive not switch | Compile-time case coverage |
| Errors modeled explicitly | Schema.TaggedError with typed channels |
| Effect.fn on all service methods | Automatic tracing spans |
| Effect.annotateLogs per service module | Structured observability |
| yield* new TaggedError() in generators | Not Effect.fail(new TaggedError()) |
| Test layers use FileSystem.layerNoop | Not real filesystem; enables isolated, fast, deterministic tests |
// BEFORE (sloppy): accepts empty strings, whitespace, anything
const UserId = Schema.String.pipe(Schema.brand("UserId"))
// AFTER (idiomatic): enforces domain invariants
const UserId = Schema.NonEmptyString.pipe(
Schema.pattern(/^usr_[a-z0-9]+$/),
Schema.brand("UserId")
)
// BEFORE (sloppy): manual withSpan, no argument capture
findById: (id: UserId) =>
sql`SELECT * FROM users WHERE id = ${id}`.pipe(
Effect.flatMap(rows => decode(rows[0])),
Effect.withSpan("UserRepo.findById"),
),
// AFTER (idiomatic): Effect.fn captures args + creates span
findById: Effect.fn("UserRepo.findById")(function*(id: UserId) {
const rows = yield* sql`SELECT * FROM users WHERE id = ${id}`
if (rows.length === 0) return yield* new UserNotFound({ userId: id })
return yield* Schema.decodeUnknown(User)(rows[0])
}),
// BEFORE (sloppy): error silently disappears
const result = yield* dangerousOp.pipe(
Effect.catchAll(() => Effect.succeed(fallback))
)
// AFTER (idiomatic): error logged before fallback
const result = yield* dangerousOp.pipe(
Effect.tapError((e) => Effect.logWarning("Falling back", { error: e })),
Effect.catchAll(() => Effect.succeed(fallback))
)
After running deslopify, report:
development
Generate self-contained HTML visualizations with Plannotator theming. Use for implementation plans, PR explainers, architecture diagrams, data tables, slide decks, and any visual explanation of technical concepts. Plans and PR explainers follow Plannotator's prescriptive approach; all other visual content delegates to nicobailon/visual-explainer.
development
Turn an idea or objective into a goal package for /goal. Interviews the user, builds a reviewed fact sheet via Plannotator, then explores the codebase to produce an execution plan.
development
Open Plannotator's browser-based code review UI for the current worktree or a pull request URL, then act on the feedback that comes back.
testing
Open Plannotator on the latest rendered assistant message and use the returned annotations to revise that message or continue.