This skill should be used when the user asks to "create a library", "scaffold a new lib", "add a local library", "create a namespace module", "set up _.ts and __.ts", or needs to create a new TypeScript library following the _.ts/__.ts namespace pattern. Handles both simple (single file) and complex (barrel) library structures.
/plugin marketplace add jasonkuhrt/claude-marketplace/plugin install library-standards@jasonkuhrtThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Scaffold new TypeScript libraries following the namespace module conventions.
Before creating any library, read the appropriate convention documents:
~/.claude/docs/conventions/namespace-module.md — The abstract _.ts/__.ts pattern/src/lib/*): ~/.claude/docs/conventions/library-local.md~/.claude/docs/conventions/library-package.md_.ts — Namespace module (REQUIRED)__.ts — Barrel module (only if multiple implementation files)_.test.ts — Public API tests_.test.fixture.ts — Shared test fixtures (exports namespace Fx)Use when library has one implementation file.
Structure:
src/lib/<name>/
├── _.ts # export * as Name from './<name>.js'
├── <name>.ts # Implementation
└── _.test.ts # Tests
Steps:
src/lib/<name>/ (kebab-case)<name>.ts with implementation_.ts with: export * as <PascalName> from './<name>.js'_.test.ts importing from ./_.jspackage.json imports: "#<name>": "./build/lib/<name>/_.js"tsconfig.json paths: "#<name>": ["src/lib/<name>/_.ts"]Use when library has multiple implementation files.
Structure:
src/lib/<name>/
├── _.ts # export * as Name from './__.js'
├── __.ts # Barrel: exports from all implementation files
├── foo.ts # Implementation
├── bar.ts # Implementation
└── _.test.ts # Tests
Steps:
src/lib/<name>/ (kebab-case)__.ts with re-exports from all implementation files_.ts with: export * as <PascalName> from './__.js'_.test.ts importing from ./_.js// src/lib/mask/mask.ts
export const create = (pattern: string): Mask => ({ pattern })
export const apply = (mask: Mask, value: string): string => value
export interface Mask {
pattern: string
}
// src/lib/mask/_.ts
export * as Mask from './mask.js'
// src/lib/mask/_.test.ts
import { Mask } from './_.js'
test('.create', () => {/* ... */})
// src/lib/parser/tokenizer.ts
export const tokenize = (input: string): Token[] => []
// src/lib/parser/lexer.ts
export const lex = (tokens: Token[]): Lexeme[] => []
// src/lib/parser/__.ts
export { lex, type Lexeme } from './lexer.js'
export { type Token, tokenize } from './tokenizer.js'
// src/lib/parser/_.ts
export * as Parser from './__.js'
| Element | Case | Example |
|---|---|---|
| Directory | kebab-case | my-lib/ |
| Files | kebab-case | my-lib.ts |
| Namespace | PascalCase | MyLib |
{
"imports": {
"#<name>": "./build/lib/<name>/_.js"
}
}
{
"compilerOptions": {
"paths": {
"#<name>": ["src/lib/<name>/_.ts"]
}
}
}
.js extension in imports (ESM requirement)_.ts, never from implementation files#<name> subpath importsThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.