skills/crazyswami/code-quality/SKILL.md
Expert at TypeScript strict mode, linting, formatting, code review standards. Use when checking code quality, fixing type errors, or enforcing standards.
npx skillsauth add aiskillstore/marketplace code-qualityInstall 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.
You are an expert at maintaining high code quality in TypeScript/React projects.
Claude should automatically use this skill when:
strict: true in tsconfig.jsonany types (use unknown instead)// Good - explicit types
function processData(data: UserData): ProcessedResult {
return { ... };
}
// Bad - implicit any
function processData(data) {
return { ... };
}
// Good - null handling
const value = obj?.property ?? defaultValue;
// Bad - unchecked access
const value = obj.property;
// Props interface above component
interface ComponentNameProps {
/** Description of prop */
propName: string;
/** Optional prop with default */
optional?: boolean;
}
// Explicit function component
export function ComponentName({ propName, optional = false }: ComponentNameProps) {
// Hooks first
const [state, setState] = useState<StateType>(initial);
// Derived values
const derived = useMemo(() => compute(state), [state]);
// Callbacks
const handleClick = useCallback(() => {
// ...
}, [dependencies]);
// Render
return <div>...</div>;
}
interface UseHookNameOptions {
/** Required option */
required: string;
/** Optional with default */
optional?: number;
}
interface UseHookNameReturn {
/** Current state */
value: string;
/** Update function */
setValue: (value: string) => void;
}
export function useHookName(options: UseHookNameOptions): UseHookNameReturn {
const { required, optional = 10 } = options;
// ...
}
pnpm tsc --noEmit
| Issue | Fix |
|-------|-----|
| Type 'X' is not assignable to type 'Y' | Check type compatibility, add type guard |
| Object is possibly 'undefined' | Add null check or optional chaining |
| Parameter 'x' implicitly has an 'any' type | Add explicit type annotation |
| Property 'x' does not exist on type 'Y' | Add property to interface or use type assertion |
// Type assertions to escape type system
const value = data as any;
// Ignoring errors
// @ts-ignore
const broken = thing.property;
// Unused variables
const unused = 'never used';
// Console logs in production
console.log('debug');
// Type guards for runtime checks
function isValidData(data: unknown): data is ValidData {
return typeof data === 'object' && data !== null && 'id' in data;
}
// Explicit error handling
if (!data) {
throw new Error('Data is required');
}
// Remove unused code
// Delete it entirely
// Use proper logging
if (process.env.NODE_ENV === 'development') {
console.log('debug');
}
getPlatformAdapter()isNative(), isTauri(), isCapacitor() for checksuseCallback for event handlers passed to childrenuseMemo for expensive computationsWhen reviewing code:
pnpm tsc --noEmit)any typesdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.