Guides implementation and refactoring of TypeScript codebases using Effect-TS, Drizzle ORM, Hono, and Bun with event-sourced persistence and barrel-module architecture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pproenca-dot-skills-1:opencode-tsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Code like the opencode core team. This skill contains real code extracted from the repo — complete implementations, not abstract rules. Follow the workflow below based on your task.
Code like the opencode core team. This skill contains real code extracted from the repo — complete implementations, not abstract rules. Follow the workflow below based on your task.
Follow these phases in order:
Load architecture.md. Find:
Load helpers-deep-dive.md. Before writing ANY utility:
util/, effect/, bus/, sync/For quick lookups: primitives.md (shorter, import paths + signatures only)
Load the reference that matches what you're building:
| Building... | Load this |
|---|---|
| Service module (namespace + Effect service + schemas + events) | service-module.md |
| Tool or modifying tool behavior | tool-module.md |
| Database tables, schemas, events, error types | schemas-and-state.md |
| Server routes, config, plugins, project lifecycle | server-and-routes.md |
| Tests | test-writing.md |
Load style-dna.md. If ANY of the following fail, fix the code before proceeding to Review:
try/catch, no else, no any, no unnecessary destructuringconst + ternary over let + mutation.annotate({ identifier }) on boundary schemas, .annotate({ description }) on fieldsSchema.Struct/Schema.Schema.Type) for DTOs, events, tool params — not Zodexport * as X from "." — no in-file export namespace X {}DO NOT proceed if any check fails. Go back to phase 3 and fix.
Load review-voice.md. The diff MUST NOT contain any of the following. If it does, fix before submitting:
as any or as unknown as casts@/util/* helpersLoad architecture.md. Map the blast radius before changing anything.
Load refactoring-patterns.md. Start with the Decision Matrix at the top — match the code smell you see to the correct pattern. Then read the specific pattern section for real before/after diffs:
Load helpers-deep-dive.md. The best refactor often replaces 20 lines with one utility call.
Same as implement phases 4-5: style-dna.md then review-voice.md.
Context.Service / Layer / makeRuntime. No plain async classes.Interface, Service, layer, defaultLayer), then close the file with export * as X from ".". Consumers still write import { X } from "@/x" → X.Service; the barrel is the namespace. opencode dropped in-file export namespace X {}.Schema.Struct + Schema.Schema.Type<typeof X> for DTOs, events, and tool params; .annotate({ identifier }) on boundary schemas, .annotate({ description }) on fields. Schema.TaggedErrorClass for Effect errors. Newtype<Self>()("Name", Schema.String.check(...)) (from @opencode-ai/core/schema) for branded IDs. Zod is no longer the boundary tool.SyncEvent.run → projectors → SQLite. Direct DB writes only for non-event-sourced features.tmpdir + Instance.provide + real services. Mocks only for external SDKs.state, pending, info, row, cfg, tx. Multi-word only when genuinely ambiguous.| File | Size | What it contains |
|---|---|---|
| style-dna.md | 18K | Mandatory style rules, naming, control flow, 14 review traps |
| primitives.md | 22K | Quick-lookup: every utility with import path + signature |
| helpers-deep-dive.md | ~40K | Full deep-dive: every utility, every usage site, when NOT to use |
| architecture.md | ~30K | Module map, dependency graph, data flow, file conventions |
| service-module.md | 27K | Complete Question + Permission implementations |
| tool-module.md | 28K | Full tool implementations, registry, prompt loop |
| test-writing.md | 42K | 5 complete test files with all fixture patterns |
| schemas-and-state.md | 36K | SQL tables, Effect Schema (Struct/annotate/Newtype), SyncEvent flow, errors |
| server-and-routes.md | 32K | Routes, config, plugins, project lifecycle |
| review-voice.md | ~25K | Real PR review comments from Dax + Aiden |
| refactoring-patterns.md | ~25K | Real before/after diffs from cleanup commits |
npx claudepluginhub pproenca/dot-skillsExpert guidance for nontrivial Effect-TS work: services/layers, typed errors, Schema/JSONSchema, Config, runtime/concurrency, @effect/vitest, @effect/ai, @effect/sql, or @prb/effect-next.
Guides Effect-TS v3 and v4 development with correct API tables, version detection, and links to primary docs for building, debugging, and reviewing Effect code.
Provides best practices and reference files for Effect-TS: typed errors, services/layers, Schema validation, fiber concurrency, Stream/Sink, and migration from Promises/fp-ts/neverthrow.