solid-generic
SOLID principles for generic TypeScript, Bun, and Node.js projects. Files < 100 lines, interfaces separated, JSDoc mandatory. Use for CLI tools, libraries, scripts, hooks, and non-framework TypeScript code.
Best use case
solid-generic is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
SOLID principles for generic TypeScript, Bun, and Node.js projects. Files < 100 lines, interfaces separated, JSDoc mandatory. Use for CLI tools, libraries, scripts, hooks, and non-framework TypeScript code.
Teams using solid-generic should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/solid-generic/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How solid-generic Compares
| Feature / Agent | solid-generic | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
SOLID principles for generic TypeScript, Bun, and Node.js projects. Files < 100 lines, interfaces separated, JSDoc mandatory. Use for CLI tools, libraries, scripts, hooks, and non-framework TypeScript code.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# SOLID Generic - TypeScript / Bun / Node.js ## Agent Workflow (MANDATORY) Before ANY implementation, use `TeamCreate` to spawn 3 agents: 1. **fuse-ai-pilot:explore-codebase** - Analyze project structure and existing patterns 2. **fuse-ai-pilot:research-expert** - Verify latest TypeScript/Bun docs via Context7 3. **mcp__context7__query-docs** - Check integration compatibility After implementation, run **fuse-ai-pilot:sniper** for validation. --- ## DRY - Reuse Before Creating (MANDATORY) **Before writing ANY new code:** 1. **Grep the codebase** for similar function names, patterns, or logic 2. Check shared locations: `modules/cores/lib/`, `modules/cores/interfaces/`, `modules/cores/errors/` 3. If similar code exists -> extend/reuse instead of duplicate 4. If code will be used by 2+ modules -> create in `modules/cores/` 5. Extract repeated logic (3+ occurrences) into shared helpers --- ## Absolute Rules (MANDATORY) ### 1. Files < 100 lines - **Split at 90 lines** - Never exceed 100 - Modules < 80 lines - Services < 60 lines - Validators < 40 lines ### 2. Interfaces Separated (Modular MANDATORY) ```text modules/[feature]/src/interfaces/ # Feature types |- user.interface.ts \- service.interface.ts modules/cores/interfaces/ # Shared types \- shared.interface.ts ``` **NEVER put interfaces in implementation files.** **NEVER use flat `src/` structure - always `modules/`.** ### 3. JSDoc Mandatory ```typescript /** * Parse configuration from file path. * * @param filePath - Absolute path to config file * @returns Parsed configuration object * @throws ConfigError if file is invalid */ export function parseConfig(filePath: string): Config ``` --- ## SOLID Principles (Detailed Guides) | # | Principle | Reference | Key Rule | |---|-----------|-----------|----------| | S | Single Responsibility | [single-responsibility.md](references/single-responsibility.md) | One file = one reason to change | | O | Open/Closed | [open-closed.md](references/open-closed.md) | Extend via composition, not modification | | L | Liskov Substitution | [liskov-substitution.md](references/liskov-substitution.md) | Implementations honor interface contracts | | I | Interface Segregation | [interface-segregation.md](references/interface-segregation.md) | Many focused interfaces > one fat interface | | D | Dependency Inversion | [dependency-inversion.md](references/dependency-inversion.md) | Depend on abstractions, inject dependencies | See [solid-principles.md](references/solid-principles.md) for overview and [architecture-patterns.md](references/architecture-patterns.md) for project structure. --- ## Code Templates | Template | Usage | Max Lines | |----------|-------|-----------| | [module.md](references/templates/module.md) | TypeScript/Bun module | 80 | | [service.md](references/templates/service.md) | Service with DI | 60 | | [interface.md](references/templates/interface.md) | TypeScript interfaces | - | | [validator.md](references/templates/validator.md) | Zod validation schemas | 40 | | [factory.md](references/templates/factory.md) | Factory pattern | 60 | | [error.md](references/templates/error.md) | Custom error classes | 40 | | [test.md](references/templates/test.md) | Bun test / Vitest | - | --- ## Forbidden - Files > 100 lines - Interfaces in implementation files - Business logic in entry points - Missing JSDoc on exports - `any` type - Barrel exports (index.ts re-exports) - Duplicating existing utility without Grep search first - Copy-pasting logic blocks instead of extracting shared function - Concrete dependencies without interface abstraction
Related Skills
solidstart-websocket
SolidStart WebSocket: experimental WebSocket endpoints, connection handling, message events, real-time communication, bidirectional data flow.
solidstart-api-routes
SolidStart API routes: export GET/POST/PATCH/DELETE functions, handle APIEvent with request/params/fetch, GraphQL and tRPC integration, session management.
solidjs
Builds UIs with SolidJS including signals, effects, memos, and fine-grained reactivity. Use when creating high-performance reactive applications, building without virtual DOM, or needing granular updates.
solid-core-rendering
SolidJS rendering: render for client apps, hydrate for SSR, renderToString for server rendering, renderToStream for streaming, isServer checks.
code-review-generic
Generic code review instructions that can be customized for any project using GitHub Copilot Triggers on: **
acc-analyze-solid-violations
Analyzes PHP codebase for SOLID principle violations. Detects God classes (SRP), type switches (OCP), broken contracts (LSP), fat interfaces (ISP), and concrete dependencies (DIP). Generates actionable reports with severity levels and remediation recommendations.
128-java-generics
Use when you need to review, improve, or refactor Java code for generics quality — including avoiding raw types, applying the PECS (Producer Extends Consumer Super) principle for wildcards, using bounded type parameters, designing effective generic methods, leveraging the diamond operator, understanding type erasure implications, handling generic inheritance correctly, preventing heap pollution with @SafeVarargs, and integrating generics with modern Java features like Records, sealed types, and pattern matching. Part of the skills-for-java project
solidstart-optimistic-ui
SolidStart optimistic UI: use useSubmissions to show pending data immediately, combine server data with pending submissions, filter by pending state, handle rollback on errors.
solid-core-stores
SolidJS stores: createStore for complex state, direct property access, path syntax for updates, produce for immutable mutations, reconcile for diffing, createMutable for proxy-based stores, unwrap for raw data.
solidstart-middleware-auth
SolidStart middleware, sessions, authentication: createMiddleware with onRequest/onBeforeResponse, useSession for cookies, protected routes, WebSocket endpoints.
solidstart-data-mutation
SolidStart data mutation: form submissions with actions, validation, error handling, pending states, optimistic UI, redirects, database operations, programmatic triggers.
solidstart-advanced-server
SolidStart advanced server: getRequestEvent for request context, static assets handling, returning responses, request events and nativeEvent access.