/harness-claude:nestjs-graphql-integrationfrom harness-claude
Builds GraphQL APIs in NestJS using code-first decorators (@Resolver, @Query, @Mutation, @ObjectType) and DataLoader for N+1 prevention.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:nestjs-graphql-integration still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Build GraphQL APIs with GraphQLModule, @Resolver, @Query/@Mutation, @ObjectType, and DataLoader
npm install @nestjs/graphql @nestjs/apollo @apollo/server graphql
@Module({
imports: [
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/schema.gql'),
sortSchema: true,
playground: true,
}),
],
})
export class AppModule {}
@ObjectType()
export class User {
@Field(() => ID) id: string;
@Field() email: string;
@Field({ nullable: true }) displayName?: string;
@Field(() => [Post]) posts: Post[];
}
@Resolver(() => User)
export class UsersResolver {
constructor(
private usersService: UsersService,
private postsService: PostsService
) {}
@Query(() => User, { nullable: true })
user(@Args('id', { type: () => ID }) id: string): Promise<User | null> {
return this.usersService.findOne(id);
}
@Query(() => [User])
users(): Promise<User[]> {
return this.usersService.findAll();
}
@Mutation(() => User)
createUser(@Args('input') input: CreateUserInput): Promise<User> {
return this.usersService.create(input);
}
@ResolveField(() => [Post])
posts(@Parent() user: User): Promise<Post[]> {
return this.postsService.findByUser(user.id);
}
}
@InputType()
export class CreateUserInput {
@Field() @IsEmail() email: string;
@Field() @MinLength(8) password: string;
}
@Injectable({ scope: Scope.REQUEST })
export class PostsLoader {
constructor(private postsService: PostsService) {}
readonly loader = new DataLoader<string, Post[]>(async (userIds) => {
const posts = await this.postsService.findByUserIds([...userIds]);
return userIds.map((id) => posts.filter((p) => p.userId === id));
});
}
Code-first vs schema-first: Code-first (above) generates the SDL from TypeScript decorators. Schema-first starts from a .graphql file and maps resolvers to it. Code-first is preferred for TypeScript teams because types are unified.
@Field(() => Type) explicit types: When TypeScript reflection cannot determine the type (arrays, enums, circular references), the explicit arrow function syntax is required. For nullable fields: @Field({ nullable: true }).
Auth on resolvers: Apply guards with @UseGuards(JwtAuthGuard) on the class or individual query/mutation. Access the current user via @Context() ctx: GqlContext where ctx.req.user is populated by the guard.
Subscriptions: Add installSubscriptionHandlers: true and use @Subscription(() => Post) with pubSub.asyncIterator('postCreated') for real-time updates via WebSocket.
Complexity and depth limiting: In production, configure validationRules: [depthLimit(5), createComplexityRule(...)] to prevent expensive queries from exhausting server resources.
https://docs.nestjs.com/graphql/quick-start
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job