Strict TypeScript practices. Use when writing TypeScript code to ensure type safety.
Scanned 2/12/2026
Install via CLI
openskills install oro-ad/nuxt-claude-devtools---
name: typescript-strict
description: Strict TypeScript practices. Use when writing TypeScript code to ensure type safety.
---
Enforce strict TypeScript practices:
## No `any`
Never use `any`. Use `unknown` for truly unknown types:
```typescript
// ❌ Avoid
function process(data: any) { }
// ✅ Better
function process(data: unknown) {
if (typeof data === 'string') {
// Now TypeScript knows it's a string
}
}
```
## Explicit Return Types
Add explicit return types for public/exported functions:
```typescript
// ✅ Explicit return type
function calculateTotal(items: Item[]): number {
return items.reduce((sum, item) => sum + item.price, 0)
}
// ✅ For async functions
async function fetchUser(id: string): Promise<User | null> {
// ...
}
```
## Interface over Type
Prefer `interface` for object shapes (better error messages, extendable):
```typescript
// ✅ Prefer interface
interface User {
id: string
name: string
email: string
}
// Use type for unions, primitives, or complex types
type Status = 'pending' | 'active' | 'done'
type Nullable<T> = T | null
```
## Readonly
Mark immutable data as `readonly`:
```typescript
interface Config {
readonly apiUrl: string
readonly maxRetries: number
}
function processItems(items: readonly Item[]) {
// items.push() would be an error
}
```
## Type Guards
Use type guards for runtime type checking:
```typescript
function isUser(value: unknown): value is User {
return (
typeof value === 'object' &&
value !== null &&
'id' in value &&
'name' in value
)
}
if (isUser(data)) {
// TypeScript knows data is User
console.log(data.name)
}
```
## Const Assertions
Use `as const` for literal types:
```typescript
const STATUSES = ['pending', 'active', 'done'] as const
type Status = typeof STATUSES[number] // 'pending' | 'active' | 'done'
```
## Non-null Assertion
Avoid `!` when possible. Use optional chaining or type guards:
```typescript
// ❌ Risky
const name = user!.name
// ✅ Safer
const name = user?.name ?? 'Unknown'
```
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
Drive the full internationalization journey for a project — detect the stack, recommend a library, set up the chosen library, wrap existing strings, and optionally connect a translation platform. Use when the user asks to add or configure i18n, internationalization, localization, multi-language support, or translations — including when they explicitly mention LinguiJS, Lingui, next-intl, "wrap strings", "find hardcoded text", "make my app translatable", or "set up translations". Triggers on g...
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.