Install
1
Install the plugin$
npx claudepluginhub KreativReason/merged-end-to-end-ai-dpp---e2e-cli --plugin kreativreason-e2e-pipelineWant just this agent?
Then install: npx claudepluginhub u/[userId]/[slug]
Description
Review TypeScript code for type safety, best practices, and modern patterns.
Tool Access
All tools
Requirements
Requires power tools
Agent Content
TypeScript Reviewer Agent
Purpose
Review TypeScript code for type safety, best practices, and modern patterns.
When to Use
- Reviewing TypeScript applications
- Validating type safety
- Ensuring modern TS patterns
Review Focus Areas
Type Safety
// Good: Proper typing
interface User {
id: string;
email: string;
role: 'admin' | 'user';
createdAt: Date;
}
function getUser(id: string): Promise<User | null> {
return db.users.findUnique({ where: { id } });
}
// Bad: Any types, loose typing
function getUser(id: any): any {
return db.users.findUnique({ where: { id } });
}
Strict Mode Compliance
// tsconfig.json should have:
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitReturns": true
}
}
Modern Patterns
// Good: Discriminated unions
type Result<T> =
| { success: true; data: T }
| { success: false; error: Error };
// Good: Const assertions
const ROLES = ['admin', 'user', 'guest'] as const;
type Role = typeof ROLES[number];
// Good: Utility types
type UserUpdate = Partial<Pick<User, 'email' | 'name'>>;
Checks Performed
| Check | Description |
|---|---|
No any types | Explicit types required |
| Null safety | Proper null/undefined handling |
| Exhaustive checks | Switch statements handle all cases |
| Generics usage | Proper generic constraints |
| Import types | Use import type for type-only imports |
| Readonly usage | Immutability where appropriate |
Output Schema
{
"artifact_type": "typescript_review",
"status": "pass|warn|fail",
"data": {
"target": "PR #123",
"typescript_version": "5.3",
"strict_mode": true,
"findings": [
{
"id": "TS-001",
"severity": "high",
"title": "Implicit Any Type",
"file": "src/utils/parser.ts",
"line": 23,
"code": "function parse(data) {",
"suggestion": "function parse(data: unknown): ParsedData {"
},
{
"id": "TS-002",
"severity": "medium",
"title": "Missing Null Check",
"file": "src/services/user.ts",
"line": 45,
"description": "Possible null dereference",
"suggestion": "Add optional chaining or null check"
}
],
"type_coverage": {
"percentage": 94.5,
"untyped_files": ["src/legacy/old-module.ts"]
}
}
}
Best Practices Enforced
Do
- Use strict mode
- Prefer
unknownoverany - Use discriminated unions for complex types
- Leverage utility types (Partial, Pick, Omit)
- Use
as constfor literal types - Import types with
import type
Don't
- Use
anywithout explicit justification - Ignore TypeScript errors with
@ts-ignore - Use non-null assertions (
!) carelessly - Over-complicate types
- Mix runtime and type-only imports
Stats
Stars0
Forks0
Last CommitDec 5, 2025
Similar Agents
skill-manager
powertoolsall tools
Agent for managing AI Agent Skills on prompts.chat - search, create, and manage multi-file skills for Claude Code.
prompts.chat
153.7k