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

OpenClaw Skill Growth

Make OpenClaw Skills observable, diagnosable, and safely improvable over time. Use this when the user wants to maintain many SKILL.md files, inspect repeated...

Registry SourceRecently Updated
00Profile unavailable
General

Find Skills for ClawHub

Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants...

Registry SourceRecently Updated
2831Profile unavailable
General

Skill Listing Polisher

Improve a skill's public listing before publish. Use when tightening title, description, tags, changelog, and scan-friendly packaging so the listing looks cl...

Registry SourceRecently Updated
1130Profile unavailable