functype-developer

Implement functype data structures with functional interfaces in TypeScript.

9|1|Updated Apr 24, 2016
One-click install
npx skills add https://github.com/jordanburke/functype --skill functype-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: functype-developer
Source: https://github.com/jordanburke/functype/tree/main/.claude/skills/functype-developer
Command: npx skills add https://github.com/jordanburke/functype --skill functype-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Contributors often face challenges understanding and adhering to a library's unique architectural patterns and functional programming paradigms. This Skill streamlines the development process for functype, ensuring consistency and reducing the learning curve for new and existing contributors.

Core Features & Use Cases

  • Architectural Guidance: Understand functype's Scala-inspired patterns like Constructor, Base, and Companion, ensuring consistent code structure.
  • Interface Implementation: Get checklists and examples for correctly implementing functional interfaces such as Functor, Monad, and Foldable.
  • New Type Creation: Utilize a step-by-step guide and script to generate boilerplate for new data structures, accelerating development.
  • Use Case: When adding a new MyNewType to the library, this skill guides you through defining its interface, implementing the constructor, adding companion methods, and ensuring all functional laws are met, saving hours of trial-and-error.

Quick Start

To generate boilerplate for a new type (e.g., Result):

./claude/skills/functype-developer/scripts/new-type-template.sh Result

To run the full validation workflow before committing:

pnpm validate

Frequently Asked Questions about functype-developer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a new functional data structure in TypeScript?

Implementing a new functional data structure in TypeScript requires following functype's constructor-based, immutable design pattern. Use the provided template script to generate boilerplate, then implement required functional interfaces like Functor and Monad, add comprehensive tests with Vitest, and validate against functional laws using pnpm validate before committing.

What is the Base pattern and why does functype use it?

The Base pattern is functype's Scala-inspired architectural approach that enforces strict typing without relying on any, ensuring type safety and consistency across the library. It works with Companion utilities and higher-kinded types to provide a robust foundation for immutable data structure design.

How do I scaffold a new type in functype?

Generate boilerplate for a new type by running the new-type-template.sh script with your type name, for example ./claude/skills/functype-developer/scripts/new-type-template.sh Result. The script creates constructor definitions, companion methods, and functional interface stubs tailored to functype's architecture.

Can I use functype with existing TypeScript projects?

Yes, functype integrates with standard TypeScript tooling including pnpm for package management, Prettier for formatting, ESLint for linting, and Vitest for testing. Ensure your project supports these tools and follows constructor-based, immutable design principles for consistency.

What functional interfaces must a new functype type implement?

New functype types must implement core functional interfaces including Functor for mapping, Monad for sequential composition, and Foldable for iteration. The Skill provides checklists and examples for each interface to ensure functional laws are satisfied and library consistency is maintained.

How do I test and validate a new functype type before contributing?

Add comprehensive tests using Vitest covering your type's behavior and functional law compliance. Run pnpm validate to execute the full validation workflow including type checking, linting, formatting, and test execution before committing your changes.