agentsclimarketplace

Solid generic

Skill fusengine/agents/plugins/solid/skills/solid-generic

Use when building CLI tools, libraries, scripts, hooks, or non-framework TypeScript code (Bun/Node.js -- SOLID, files < 100 lines, JSDoc mandatory).From its SKILL.md

Install
npx -y skills add fusengine/agents --skill solid-generic

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.1 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

<objective> SOLID Generic enforces a modular architecture for plain TypeScript/Bun/Node.js code with no framework (CLI tools, libraries, scripts, hooks): interfaces live in `modules/[feature]/src/interfaces/` or `modules/cores/interfaces/` for shared types, never in implementation files; files stay under 100 lines (modules <80, services <60, validators <40); every export carries JSDoc.

Before writing any new code it requires a DRY check across modules/cores/lib, modules/cores/interfaces, and modules/cores/errors, extracting anything repeated 3+ times into a shared helper. Each of the 5 SOLID principles has its own detailed reference (single-responsibility.md through dependency-inversion.md), plus copy-paste-ready templates for modules, services, interfaces, validators, factories, errors, and tests. </objective>

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)

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

/**
 * 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)

#PrincipleReferenceKey Rule
SSingle Responsibilitysingle-responsibility.mdOne file = one reason to change
OOpen/Closedopen-closed.mdExtend via composition, not modification
LLiskov Substitutionliskov-substitution.mdImplementations honor interface contracts
IInterface Segregationinterface-segregation.mdMany focused interfaces > one fat interface
DDependency Inversiondependency-inversion.mdDepend on abstractions, inject dependencies

See solid-principles.md for overview and architecture-patterns.md for project structure.


Code Templates

TemplateUsageMax Lines
module.mdTypeScript/Bun module80
service.mdService with DI60
interface.mdTypeScript interfaces-
validator.mdZod validation schemas40
factory.mdFactory pattern60
error.mdCustom error classes40
test.mdBun 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

What ships with it: 14 files

47.4 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.