milojarow/js icon
public
Published on 5/2/2025
js_assistant

Rules
Prompts
Models
Context
relace Relace Instant Apply model icon

Relace Instant Apply

relace

40kinput·32koutput
anthropic Claude 3.7 Sonnet model icon

Claude 3.7 Sonnet

anthropic

200kinput·8.192koutput
anthropic Claude 3.5 Sonnet model icon

Claude 3.5 Sonnet

anthropic

200kinput·8.192koutput
mistral Codestral model icon

Codestral

mistral

voyage voyage-code-3 model icon

voyage-code-3

voyage

voyage Voyage AI rerank-2 model icon

Voyage AI rerank-2

voyage

- Follow Next.js patterns, use app router and correctly use server and client components.
- Use Tailwind CSS for styling.
- Use Shadcn UI for components.
- Use TanStack Query (react-query) for frontend data fetching.
- Use React Hook Form for form handling.
- Use Zod for validation.
- Use React Context for state management.
- Use Prisma for database access.
- Follow AirBnB style guide for code formatting.
- Use PascalCase when creating new React files. UserCard, not user-card.
- Use named exports when creating new react components.
- DO NOT TEACH ME HOW TO SET UP THE PROJECT, JUMP STRAIGHT TO WRITING COMPONENTS AND CODE.
- Follow NestJS's modular architecture to ensure scalability and
maintainability.
- Use DTOs (Data Transfer Objects) to validate and type API requests.
- Implement Dependency Injection for better service management.
- Use the Repository pattern to separate data access logic from the rest of the application.
- Ensure that all REST APIs are well-documented with Swagger.
- Implement caching strategies to reduce database load.
- Suggest optimizations to improve PostgreSQL query performance.
Next.jshttps://nextjs.org/docs/app
Vercel AI SDK Docshttps://sdk.vercel.ai/docs/
Reacthttps://react.dev/reference/
React Testing Library Docshttps://testing-library.com/docs/react-testing-library/intro/

Prompts

Learn more
Page
Creates a new Next.js page based on the description provided.
Create a new Next.js page based on the following description.
Client component
Create a client component.
Create a client component with the following functionality. If writing this as a server component is not possible, explain why.
API route inspection
Analyzes API routes for security issues
Review this API route for security vulnerabilities. Ask questions about the context, data flow, and potential attack vectors. Be thorough in your investigation.
Data validation check
Checks input validation and sanitization
Analyze this code for data validation vulnerabilities. Ask about data sources, validation rules, and how the data is used throughout the application.
Next.js Security Review
Check for any potential security vulnerabilities in your code
Please review my Next.js code with a focus on security issues.

Use the below as a starting point, but consider any other potential issues

You do not need to address every single area below, only what is relevant to the user's code.

1. Data Exposure:
- Verify Server Components aren't passing full database objects to Client Components
- Check for sensitive data in props passed to 'use client' components
- Look for direct database queries outside a Data Access Layer
- Ensure environment variables (non NEXT_PUBLIC_) aren't exposed to client

2. Server Actions ('use server'):
- Confirm input validation on all parameters
- Verify user authentication/authorization checks
- Check for unencrypted sensitive data in .bind() calls

3. Route Safety:
- Validate dynamic route parameters ([params])
- Check custom route handlers (route.ts) for proper CSRF protection
- Review middleware.ts for security bypass possibilities

4. Data Access:
- Ensure parameterized queries for database operations
- Verify proper authorization checks in data fetching functions
- Look for sensitive data exposure in error messages

Key files to focus on: files with 'use client', 'use server', route.ts, middleware.ts, and data access functions.

Context

Learn more
@diff
Reference all of the changes you've made to your current branch
@codebase
Reference the most relevant snippets from your codebase
@url
Reference the markdown converted contents of a given URL
@folder
Uses the same retrieval mechanism as @Codebase, but only on a single folder
@terminal
Reference the last command you ran in your IDE's terminal and its output
@code
Reference specific functions or classes from throughout your project
@file
Reference any file in your current workspace

No Data configured

MCP Servers

Learn more

Memory

npx -y @modelcontextprotocol/server-memory

GitHub

npx -y @modelcontextprotocol/server-github

Filesystem

npx -y @modelcontextprotocol/server-filesystem ${{ secrets.milojarow/js/anthropic/filesystem-mcp/PATH }}

Brave Search

npx -y @modelcontextprotocol/server-brave-search

Postgres

npx -y @modelcontextprotocol/server-postgres ${{ secrets.milojarow/js/anthropic/postgres-mcp/CONNECTION_STRING }}