scan-effect-solutions
Effect Solutions Compliance Audit
Audit a repository against Effect TypeScript best practices from effect.solutions. Follow this skill to produce a consistent, evidence-based compliance report.
Prerequisites
Load current effect.solutions recommendations:
effect-solutions list
Load guidance used by this checklist:
effect-solutions show tsconfig
effect-solutions show services-and-layers
effect-solutions show data-modeling
effect-solutions show error-handling
effect-solutions show config
effect-solutions show testing
Load the effect-ts skill for Effect-specific implementation patterns:
skill({ name: "effect-ts" })
Audit Checklist
1. TypeScript Configuration
Inspect tsconfig.base.json (or tsconfig.json) and verify:
exactOptionalPropertyTypes: truestrict: truenoUnusedLocals: truedeclarationMap: truesourceMap: true- Confirm Effect Language Service plugin is configured.
- Confirm
modulesetting matches project type (preserve/bundler for apps, NodeNext for libraries).
Reference: effect-solutions show tsconfig
2. Services & Layers Pattern
Search for Effect services and verify:
- Confirm services are defined with
Context.Tag. - Confirm tag identifiers follow
@path/ServiceNamepattern. - Confirm layers use
Layer.effectorLayer.sync. - Confirm a single
Effect.provideis applied at the entry point.
Reference: effect-solutions show services-and-layers
3. Data Modeling
Inspect data modeling and verify:
- Confirm
Schema.Classis used for records. - Confirm
Schema.TaggedClassis used for variants. - Confirm branded types are used for primitives (IDs, emails, and similar values).
- Confirm pattern matching uses
Match.valueTags.
Reference: effect-solutions show data-modeling
4. Error Handling
Inspect error handling and verify:
- Confirm
Schema.TaggedErroris used for domain errors. - Confirm error recovery uses
catchTag/catchTagswhere appropriate. - Confirm defects and typed errors are separated intentionally.
Reference: effect-solutions show error-handling
5. Configuration
Inspect configuration patterns and verify:
- Confirm
Schema.Configis used for validation. - Confirm a config service layer pattern is present.
- Confirm secrets use
Config.redacted.
Reference: effect-solutions show config
6. Testing
Inspect tests and verify:
- Confirm tests use
@effect/vitest. - Confirm Effect tests use
it.effect(). - Confirm test layer composition follows Effect layer patterns.
Reference: effect-solutions show testing
7. Runtime Execution Anti-Pattern (Effect.runPromise / Effect.runSync in Application Code)
Search application code for direct Effect.runPromise and Effect.runSync usage. Exclude test-only files and test helpers (__tests__/, *.test.ts, *.spec.ts, fixture directories).
Treat bare Effect.runPromise / Effect.runSync as findings when they bypass the project runtime composition. Bare execution typically uses the default runtime without project-provided layers (for tracing, config, logging, or domain services).
Apply project-aware evaluation:
- Prefer the project's runtime entrypoint (for example
runtime.runPromise) in application code. - Accept explicit layer provisioning when runtime usage is not feasible (for example during bootstrap or dependency-cycle constraints).
- Exempt tests that intentionally provide dedicated test layers.
Template-ts convention example (use only when applicable in the audited repo):
ManagedRuntimeineffect-runtime.tsAppLayercompositionSentryTracingLivein runtime-provided observability
Search patterns:
Effect.runPromise(under application source directories (for examplesrc/,apps/*/src/,packages/*/src/)Effect.runSync(under application source directories (same scope)
Report each occurrence with:
- File path and line
- Whether it's using
runtime.runPromise(✅) or bareEffect.runPromise(❌) - Whether required observability/config layers are provided by runtime or explicit
Effect.providefallback
Reference: effect-solutions show services-and-layers
8. Option/Either Internal Tag Anti-Patterns
Inspect direct _tag branching on Option/Either in application code and tests.
- Production code: report all direct
_tagusage as findings with replacement recommendation - Tests: allow
_tagassertions for domain error identity, but flag control-flow branching patterns that should use helpers - Prefer:
Either.match,Either.isLeft,Either.isRightOption.match,Option.isSome,Option.isNone,Option.getOrElse
Search patterns to include:
if (.*\._tag === "Left")if (.*\._tag === "Right")if (.*\._tag === "Some")if (.*\._tag === "None")expect\(.*\._tag\)
Reference: effect-solutions show error-handling
Output Format
Provide a structured report with:
-
Summary: Overall compliance score using the rubric below.
Scoring rubric (0-16 total):
- Evaluate each checklist section (1-8) on a 0-2 scale.
2: Fully compliant or only minor cosmetic gaps.1: Partially compliant, meaningful gaps present.0: Non-compliant or pattern missing.- Total score = sum of all section scores.
- Provide percentage =
(total / 16) * 100, rounded to whole number.
-
What's Working Well: List patterns that follow best practices
-
Improvements Needed: List specific issues with:
- File location
- Current pattern
- Recommended pattern
- Priority (high/medium/low)
- Scope label:
productionortest
-
Quick Wins: Easy fixes that can be done immediately
-
Next Steps: Recommended order of improvements
Related Skills
effect-ts— Effect services, layers, error handling, config patternstesting-patterns— Vitest and @effect/vitest test patternscode-review— General code review methodology (includes Effect section)
More from blogic-cz/blogic-marketplace
marketing-expert
This skill should be used when writing or rewriting marketing copy for software products, including positioning, messaging, homepage rewrite work, landing pages, product descriptions, conversion-focused updates, and sales-enablement content. Produces clear, truthful, high-performing SaaS copy.
97requirements
This skill should be used when clarifying a feature, writing a requirements spec, running a structured discovery session, or when users mention requirements-start, requirements-status, requirements-current, requirements-list, requirements-remind, or requirements-end.
78frontend-design
This skill should be used when a task requires designing or implementing frontend UI (components, pages, layouts, styling) and no more specialized frontend skill is a better fit. It guides production-grade, brand-consistent visual implementation with distinctive but controlled aesthetics.
77testing-patterns
This skill should be used when implementing or reviewing testing workflows in template-ts projects, especially for testing, Vitest, Playwright, integration test, and mocking scenarios.
76git-workflow
Automates the full PR lifecycle — create or update a pull request, then aggressively monitor CI checks and review feedback in a continuous loop, fixing failures and addressing comments until the PR is fully green. Also covers push, branch creation, and branch sync workflows.
76debugging-with-opensrc
Load this skill when debugging behavior in external libraries by reading local OpenSrc mirrors (Effect, TanStack, TRPC, Drizzle, Better Auth, Sentry, Pino), or when docs conflict with runtime behavior and source-level verification is required.
75