composable-functions-skill

The composable functions pattern uses:

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "composable-functions-skill" with this command: npx skills add darna-digital/skills/darna-digital-skills-composable-functions-skill

Pattern

The composable functions pattern uses:

  • Interfaces defining dependencies (data + side effects) and function contracts

  • Pure functions that receive injected dependencies

  • Mock factories for testing

  • Adapters (RSC/Hooks) that wire up real dependencies

Workflow

  • Read the example structure in example/ to understand the patterns

  • Ask the user for the feature name

  • Generate minimal boilerplate in src/features/<feature-name>/ with:

  • entity/<feature>.interfaces.ts

  • dependency and function interfaces

  • functions/<feature>.functions.ts

  • pure functions with DI

  • functions/<feature>.functions.mock.ts

  • mock factory

  • functions/<feature>.functions.test.ts

  • test file

  • Ask the user what adapter type to create:

  • RSC (React Server Components) - default

  • React Hooks - default

  • Other (API, proxy-handler, etc.) - search codebase for examples, otherwise improvise

  • Generate the adapter in adapters/<feature>.<type>.adapter.ts

Do not implement business logic - generate bare minimum boilerplate only.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-standards-skill

No summary provided by upstream source.

Repository SourceNeeds Review
General

nano-banana-2

Nano Banana 2 - Gemini 3.1 Flash Image Preview

Repository Source
15339.7K
inferen-sh
General

p-video

Pruna P-Video Generation

Repository Source
15339.5K
inferen-sh