with one click
getting-started
Use when configuring Redis caching in NestJS APIs.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Use when configuring Redis caching in NestJS APIs.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when scanning NestJS providers with DiscoveryService-backed utilities.
Use when working with the @wisemen/nestjs-custom-fields package — developer-defined custom fields in NestJS with TypeORM persistence and runtime validation. Covers registering the CustomFieldDefinition entity, authoring definitions with customFieldDefinition(), storing resolved values via @CustomFieldValueColumn(), exposing them through CustomFieldValueDto / @IsCustomFields(), and validating submissions with CustomFieldDefinitionsRepository + validateCustomFieldValues(). Use this whenever a task involves custom field definitions, CustomFieldValue columns, custom-field DTOs, or tenant-scoped field definitions, even if the package is not named explicitly.
Use when defining Typesense collections, collectors, and search queries in NestJS APIs.
Generate PDFs through API2PDF in NestJS. Use when converting HTML or URLs to PDFs in apis.
Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator.
Use when configuring NATS messaging, subscribers, or the simple NatsClient in NestJS applications.
| name | getting-started |
| description | Use when configuring Redis caching in NestJS APIs. |
Use RedisModule.forRootAsync(...) to register a shared Redis client, then
extend RedisCache for scoped keys and inject RedisClient for reads and
writes.
import { Module } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import { captureException } from '@wisemen/opentelemetry'
import { RedisModule } from '@wisemen/nestjs-redis'
@Module({
imports: [RedisModule.forRootAsync({
inject: [ConfigService],
useFactory: (config: ConfigService) => ({
url: config.getOrThrow('REDIS_URL'),
pingInterval: config.get('REDIS_PING_INTERVAL'),
ttl: config.get('REDIS_DEFAULT_TTL'),
onClientError: (error) => {
captureException(error)
}
})
})],
exports: [RedisModule]
})
export class DefaultRedisModule {}
import { Injectable } from '@nestjs/common'
import { RedisCache, RedisClient } from '@wisemen/nestjs-redis'
@Injectable()
export class ExampleCache extends RedisCache {
readonly prefix = 'user'
constructor(private readonly redis: RedisClient) {}
async getCachedUser(uuid: UserUuid): Promise<User | null> {
return this.redis.getCachedValue<User>(this.buildCacheKey(uuid))
}
async cacheUser(user: User): Promise<void> {
await this.redis.putCachedValue(this.buildCacheKey(user.uuid), user, 3600)
}
}
Use RedisClient.client only when you need raw Redis commands that the cache
helpers do not cover.