skills/standards-typescript/SKILL.md
TypeScript project conventions. Auto-load when editing *.ts or *.tsx files.
npx skillsauth add paulund/skills standards-typescriptInstall 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.
Always derive TypeScript types from Zod schemas. Never declare the same shape twice.
export const createPostSchema = z.object({ content: z.string().min(1) })
export type CreatePostInput = z.infer<typeof createPostSchema>
Use Prisma.<Model>GetPayload<...> for query result shapes. Never re-declare them.
import type { Prisma } from '@prisma/client'
type Post = Prisma.PostGetPayload<Record<string, never>>
type PostWithProject = Prisma.PostGetPayload<{ include: { project: true } }>
import type { Project, Post } from '@prisma/client'
tsconfig.jsonany — use unknown and narrow it@ts-ignore — use @ts-expect-error with a justifying comment if truly unavoidableWhen the same constant appears in more than one file, extract it to src/lib/ and import it. Client components can import shared constants directly without receiving them as props.
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
development
Use when writing or fixing PHP code, implementing classes, traits, or interfaces, applying PSR standards, or working with PHP 8.3+ patterns like readonly properties, enums, named arguments, match expressions, and union types.
tools
Next.js 15 App Router project conventions. Auto-load when working in app/, src/app/, components/, server actions, or route handlers.
development
Use when building or modifying Laravel applications, including routes, controllers, models, migrations, jobs, actions, and API resources.