creating-libraries

Scaffold TypeScript libraries with namespace-module conventions and file naming.

1|Updated Oct 21, 2016
One-click install
npx skills add https://github.com/jasonkuhrt/dotfiles --skill creating-libraries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-libraries
Source: https://github.com/jasonkuhrt/dotfiles/tree/main/claude/todo/library-standards/skills/creating-libraries
Command: npx skills add https://github.com/jasonkuhrt/dotfiles --skill creating-libraries

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides engineers to scaffold TypeScript libraries using the namespace/module conventions, reducing boilerplate and enforcing a consistent project structure.

Core Features & Use Cases

  • Scaffolds both simple libraries (one implementation file) and complex libraries (multiple implementation files with a barrel).
  • Enforces file naming conventions: _.ts for the namespace module, __.ts for the barrel, _.test.ts for tests, and _.test.fixture.ts for shared test fixtures.
  • Provides step-by-step guidance for wiring exports and configuring builds, including package.json imports and tsconfig.json paths.

Quick Start

Use the creating-libraries skill to scaffold a new TypeScript library following the namespace-module conventions. The tool will create the appropriate src/lib/<name>/ structure, including _.ts, __.ts (when needed), and _.test.ts, and will outline the necessary package.json and tsconfig updates per the conventions.

Frequently Asked Questions about creating-libraries

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

FAQPage Schema
How do I scaffold a TypeScript library with namespace-module conventions?

To scaffold a TypeScript library with namespace-module conventions, use a tool that automates creating the src/lib/<name>/ structure, including implementation files, barrel exports, and test files, while outlining package.json and tsconfig updates.

What file naming conventions should I use for a TypeScript library?

TypeScript library file naming conventions should use _.ts for the namespace module, __.ts for the barrel export, _.test.ts for tests, and _.test.fixture.ts for shared test fixtures to maintain a consistent project structure.

How do I configure package.json imports and tsconfig paths for a new TypeScript package?

Configuring package.json imports and tsconfig paths for a new TypeScript package requires wiring exports to match the namespace-module structure, ensuring the build configuration correctly resolves the barrel files and implementation modules.

Can I scaffold both simple and complex TypeScript library structures?

Yes, you can scaffold both simple TypeScript libraries with one implementation file and complex libraries with multiple implementation files, automatically generating a barrel export file when needed to manage the module structure.

What is the best way to reduce boilerplate when creating a TypeScript package?

The best way to reduce boilerplate when creating a TypeScript package is to use a scaffolding tool that enforces a consistent project structure, automating file naming, export barrels, and build configuration according to documented conventions.

Why do I need barrel exports in my TypeScript library?

Barrel exports, designated by __.ts files, are needed in TypeScript libraries to aggregate multiple module exports into a single entry point, simplifying imports and ensuring the namespace-module conventions are properly maintained.