This is an example custom assistant that will help you complete the Python onboarding in VS Code. After trying it out, feel free to experiment with other blocks or create your own custom assistant.
OpenAI
ollama
OpenAI
ollama
OpenAI
- Optimize indexes to improve query execution speed.
- Avoid N+1 queries and suggest more efficient alternatives.
- Recommend normalization or denormalization strategies based on use cases.
- Implement transaction management where necessary to ensure data consistency.
- Suggest methods for monitoring database performance.
-Ensure all responses align with the current codebase structure, naming conventions, and logic.
- Never assume intent. If any request is unclear, ask for clarification before generating code.
- Prioritize maintainability and integration over isolated or theoretical code snippets.
- Prefer Tailwind tokens over custom CSS.
## Tailwind Compact Rules
- Avoid `@apply` unless abstracting.
- Co-locate styles; extract patterns via `shadcn/ui`.
- Class order: layout → spacing → typography → colors → effects (use Headwind).
- Use theme tokens only (`text-primary`, no hex).
- Extend theme in `tailwind.config.ts` for brand tokens.
- Use `sm:`, `md:`, `dark:` intentionally; prefer `shadcn/ui` abstractions.
- Prefer `shadcn/ui` components; extend via `className`/variants.
- Avoid long class strings → use `cn()`.
- No CSS-in-JS or raw style duplication.
- Tooling: `eslint-plugin-tailwindcss`, `tailwindcss/nesting`, Headwind, Prettier.
- Keep config clean; only reusable tokens.
- Maintain `design.md` (tokens, breakpoints, usage).
## TypeScript Compact Rules
- Strict mode: always enable (`strict: true` in `tsconfig.json`).
- No `any`, `!`, or `as unknown as`.
- Prefer `type` over `interface` for consistency.
- Always type function args & returns explicitly.
- Use `readonly`, `Record`, and mapped types when possible.
- Narrow types early with type guards.
- Use enums sparingly; prefer union types (`'admin' | 'user'`).
- Handle `null` and `undefined` explicitly (no `| undefined` by default).
- Group types in `/types` or near usage.
- Use `zod` or `io-ts` for runtime validation.
## Lint & Tooling
- Use `typescript-eslint` with `@typescript-eslint/recommended`.
- Format with Prettier.
- Validate config with `tsc --noEmit`.
## shadcn/ui Compact Rules
- Always use `shadcn/ui` components over building from scratch.
- Customize via `className` or `class-variance-authority` (CVA) — avoid deep overrides.
- Co-locate component variants and logic; prefer colocation over global styles.
- Extend components only when shared across multiple features.
- Do not modify core shadcn components directly — clone and rename if needed.
- Use slot-aware composition (`asChild`) for wrapping custom elements.
- Keep variant names semantic (e.g., `variant="destructive"`).
- Keep visual consistency with Tailwind tokens and design system.
- Use `@/components/ui/*` alias imports for clarity and consistency.
## Supabase Compact Rules
- Use Supabase client via `createClient` in a single shared module.
- Never expose service role keys in client-side code.
- Use RLS (Row-Level Security) on all tables; assume data is public otherwise.
- Keep all Supabase queries typed via `supabase-js` TypeScript support.
- Use `upsert` with caution — avoid unexpected overwrites.
- Handle auth state via Supabase’s auth helpers or `onAuthStateChange`.
- Avoid using `useEffect` for data fetching — prefer SWR or React Query.
- Use Edge Functions for sensitive logic or server-side operations.
- Store metadata (e.g., roles, flags) in the `public.users` table, not JWTs.
- Sync schema changes with versioned SQL files or migrations.
---
description:Enforces modern, component-driven React practices with functional components, hooks, strict typing, and clean separation of concerns for maintainable and scalable applications.
alwaysApply: false
---
## React.js Compact Rules
- Use function components + hooks only.
- Keep components pure, focused, and ≤100 LOC when possible.
- Group logic via custom hooks (`useXyz`) or utils.
- Co-locate logic, styles, and tests by feature.
- Use TypeScript strictly; no `any`, no implicit `any`.
- Use `Props`/`State` interfaces; prefer `readonly` and strict null checks.
- Avoid inline functions in JSX (use `useCallback`).
- Always memoize context values (`useMemo`).
- Use `ErrorBoundary` for top-level error capture.
- Prefer controlled components for forms.
- Use `React Query` or `SWR` for data fetching—not `useEffect`+`fetch`.
## Lint & Tooling
- Use `eslint`, `eslint-plugin-react`, `eslint-plugin-react-hooks`.
- Format with Prettier.
- Optimize re-renders via `memo`, `useMemo`, `useCallback`.
Use Cargo to write a comprehensive suite of unit tests for this function
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.
Create a new Nuxt.js page based on the following description.
Create a new Next.js page based on the following description.
Please create a new Svelte component following these guidelines:
- Include JSDoc comments for component and props
- Include basic error handling and loading states
- ALWAYS add a TypeScript prop interface
Create a new LanceDB table with the description given below. It should follow these rules:
- Explicitly define the schema of the table with PyArrow
- Use dataframes to store and manipulate data
- If there is a column with embeddings, call it "vector"
Here is a basic example: ```python import lancedb import pandas as pd import pyarrow as pa
# Connect to the database db = lancedb.connect("data/sample-lancedb")
# Create a table with an empty schema schema = pa.schema([pa.field("vector", pa.list_(pa.float32(), list_size=2))]) tbl = db.create_table("empty_table", schema=schema)
# Insert data into the table data = pd.DataFrame({"vector": [[1.0, 2.0], [3.0, 4.0]]}) tbl.add(data) ```
Design a RAG (Retrieval-Augmented Generation) system with:
Document Processing:
- Text extraction strategy
- Chunking approach with size and overlap parameters
- Metadata extraction and enrichment
- Document hierarchy preservation
Vector Store Integration:
- Embedding model selection and rationale
- Vector database architecture
- Indexing strategy
- Query optimization
Retrieval Strategy:
- Hybrid search (vector + keyword)
- Re-ranking methodology
- Metadata filtering capabilities
- Multi-query reformulation
LLM Integration:
- Context window optimization
- Prompt engineering for retrieval
- Citation and source tracking
- Hallucination mitigation strategies
Evaluation Framework:
- Retrieval relevance metrics
- Answer accuracy measures
- Ground truth comparison
- End-to-end benchmarking
Deployment Architecture:
- Caching strategies
- Scaling considerations
- Latency optimization
- Monitoring approach
The user's knowledge base has the following characteristics:
Review this API route for security vulnerabilities. Ask questions about the context, data flow, and potential attack vectors. Be thorough in your investigation.
Create a client component with the following functionality. If writing this as a server component is not possible, explain why.
Analyze this code for data validation vulnerabilities. Ask about data sources, validation rules, and how the data is used throughout the application.
Generate a data processing pipeline with these requirements:
Input:
- Data loading from multiple sources (CSV, SQL, APIs)
- Input validation and schema checks
- Error logging for data quality issues
Processing:
- Standardized cleaning (missing values, outliers, types)
- Memory-efficient operations for large datasets
- Numerical transformations using NumPy
- Feature engineering and aggregations
Quality & Monitoring:
- Data quality checks at key stages
- Validation visualizations with Matplotlib
- Performance monitoring
Structure:
- Modular, documented code with error handling
- Configuration management
- Reproducible in Jupyter notebooks
- Example usage and tests
The user has provided the following information:
Create or update a database schema with the following models and relationships. Include necessary fields, relationships, and any relevant enums.
Your task is to analyze the user's code to help them understand it's current caching behavior, and mention any potential issues.
Be concise, only mentioning what is necessary.
Use the following as a starting point for your review:
1. Examine the four key caching mechanisms:
- Request Memoization in Server Components
- Data Cache behavior with fetch requests
- Full Route Cache (static vs dynamic rendering)
- Router Cache for client-side navigation
2. Look for and identify:
- Fetch configurations (cache, revalidate options)
- Dynamic route segments and generateStaticParams
- Route segment configs affecting caching
- Cache invalidation methods (revalidatePath, revalidateTag)
3. Highlight:
- Potential caching issues or anti-patterns
- Opportunities for optimization
- Unexpected dynamic rendering
- Unnecessary cache opt-outs
4. Provide clear explanations of:
- Current caching behavior
- Performance implications
- Recommended adjustments if needed
Lastly, point them to the following link to learn more: https://nextjs.org/docs/app/building-your-application/caching
<!-- Sequential Thinking Workflow -->
<assistant>
<toolbox>
<mcp_server name="sequential-thinking"
role="workflow_controller"
execution="sequential-thinking"
description="Initiate the sequential-thinking MCP server">
<tool name="STEP" value="1">
<description>Gather context by reading the relevant file(s).</description>
<arguments>
<argument name="instructions" value="Seek proper context in the codebase to understand what is required. If you are unsure, ask the user." type="string" required="true"/>
<argument name="should_read_entire_file" type="boolean" default="true" required="false"/>
</arguments>
<result type="string" description="Context gathered from the file(s). Output can be passed to subsequent steps."/>
</tool>
<tool name="STEP" value="2">
<description>Generate code changes based on the gathered context (from STEP 1).</description>
<arguments>
<argument name="instructions" value="Generate the proper changes/corrections based on context from STEP 1." type="string" required="true"/>
<argument name="code_edit" type="object" required="true" description="Output: The proposed code modifications."/>
</arguments>
<result type="object" description="The generated code changes (code_edit object). Output can be passed to subsequent steps."/>
</tool>
<tool name="STEP" value="3">
<description>Review the generated changes (from STEP 2) and suggest improvements.</description>
<arguments>
<argument name="instructions" type="string" value="Review the changes applied in STEP 2 for gaps, correctness, and adherence to guidelines. Suggest improvements or identify any additional steps needed." required="true"/>
</arguments>
<result type="string" description="Review feedback, suggested improvements, or confirmation of completion. Final output of the workflow."/>
</tool>
</mcp_server>
</toolbox>
</assistant>
Add login required decorator
No Data configured
docker run -i --rm mcp/postgres ${{ secrets.michaelroodt/lovable2/docker/mcp-postgres/POSTGRES_CONNECTION_STRING }}
npx -y @executeautomation/playwright-mcp-server
npx -y @browsermcp/mcp@latest
npx -y @modelcontextprotocol/server-memory
npx -y @modelcontextprotocol/server-postgres ${{ secrets.michaelroodt/lovable2/anthropic/postgres-mcp/CONNECTION_STRING }}
docker run --rm -i mcp/sequentialthinking
npx -y @modelcontextprotocol/server-github
npx -y @modelcontextprotocol/server-filesystem ${{ secrets.michaelroodt/lovable2/anthropic/filesystem-mcp/PATH }}
npx -y @modelcontextprotocol/server-brave-search
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/github
docker run --rm -i --mount type=bind,src=${{ secrets.michaelroodt/lovable2/docker/mcp-git/GIT_DIR }},dst=${{ secrets.michaelroodt/lovable2/docker/mcp-git/GIT_DIR }} mcp/git