skills/imcomplete-library-class/SKILL.md
Extend third-party libraries safely without modifying their source using Foreign Methods or Local Extensions. Trigger: When a library class lacks a needed method and cannot be modified directly.
npx skillsauth add johnnystefan/test-saas-business imcomplete-library-classInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables the agent to identify when a third-party library or framework no longer meets the project's needs and provides strategies to extend it without access to the original source code.
// THIRD-PARTY LIBRARY (Read-Only)
class ExternalDate {
getYear() {
return 2024;
}
getMonth() {
return 10;
}
}
// FOREIGN METHOD — solution for 1-2 missing methods
class DateUtil {
static nextDay(date: ExternalDate): ExternalDate {
// Logic to calculate next day without modifying ExternalDate
return date;
}
}
// LOCAL EXTENSION — solution for many missing methods
class ExtendedDate extends ExternalDate {
isWeekend(): boolean {
/* ... */
}
addDays(n: number): ExtendedDate {
/* ... */
}
format(pattern: string): string {
/* ... */
}
}
tools
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
databases
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
development
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
tools
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.