From mcollina-skills-1
Designs complex TypeScript generics and utility types, refactors 'any' to strict alternatives, creates type guards, and resolves compiler errors for inference, conditional types, and more.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin mcollina-skills-1This skill uses the workspace's default tool permissions.
Use this skill for:
rules/array-index-access.mdrules/as-const-typeof.mdrules/builder-pattern.mdrules/conditional-types.mdrules/deep-inference.mdrules/error-diagnosis.mdrules/function-overloads.mdrules/generics-basics.mdrules/infer-keyword.mdrules/mapped-types.mdrules/opaque-types.mdrules/template-literal-types.mdrules/type-narrowing.mdrules/utility-types.mdtile.jsonSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Use this skill for:
any types from codebasesWhen invoked:
tsc --noEmit to capture the full error output before making changesany, etc.)any types with proper typing — validate each replacement still satisfies call sitestsc --noEmit passCapabilities include:
For every TypeScript challenge:
any with genericsBefore
function getProperty(obj: any, key: string): any {
return obj[key];
}
After
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
return obj[key];
}
// getProperty({ name: "Alice" }, "name") → inferred as string ✓
Before
async function fetchUser(): Promise<any> {
const res = await fetch("/api/user");
return res.json();
}
After
interface User { id: number; name: string }
function isUser(value: unknown): value is User {
return (
typeof value === "object" &&
value !== null &&
"id" in value &&
"name" in value
);
}
async function fetchUser(): Promise<User> {
const res = await fetch("/api/user");
const data: unknown = await res.json();
if (!isUser(data)) throw new Error("Invalid user shape");
return data;
}
Read individual rule files for detailed explanations and code examples:
as const and typeof[number] indexinginfer to extract types within conditional types