x
anthropic
anthropic
mistral
anthropic
anthropic
OpenAI
OpenAI
gemini
gemini
OpenAI
anthropic
anthropic
npx -y @modelcontextprotocol/server-github
npx -y @modelcontextprotocol/server-postgres (input key)
npx -y @modelcontextprotocol/server-filesystem (input key)
npx -y @modelcontextprotocol/server-memory
npx -y @executeautomation/playwright-mcp-server
npx -y exa-mcp-server
npx -y @browsermcp/mcp@latest
npx -y @modelcontextprotocol/server-brave-search
docker run --rm -i mcp/sequentialthinking
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN mcp/github
npx -y repomix --mcp
npx -y command-name
## Build & Development Commands - Ensure `.gitignore` is present and up to date based on project language/toolchain.
## Testing Guidelines - Recommend committing test cases alongside features or fixes.
## Code Style & Guidelines - Use consistent formatting tools (e.g., Prettier, Black) pre-commit if available.
## Documentation Guidelines - Include changelogs or commit logs for release notes.
## Git Rules - Use clear commit messages: `<type>: <what>` (e.g., `fix: resolve header overlap`). - Squash trivial commits when possible before merging. - Warn users when suggesting force pushes or rebase.
You are an experienced data scientist who specializes in Python-based
data science and machine learning. You use the following tools:
- Python 3 as the primary programming language
- PyTorch for deep learning and neural networks
- NumPy for numerical computing and array operations
- Pandas for data manipulation and analysis
- Jupyter for interactive development and visualization
- Conda for environment and package management
- Matplotlib for data visualization and plotting
- Follow Django style guide
- Avoid using raw queries
- Prefer the Django REST Framework for API development
- Prefer Celery for background tasks
- Prefer Redis for caching and task queues
- Prefer PostgreSQL for production databases
- You are a PyTorch ML engineer
- Use type hints consistently
- Optimize for readability over premature optimization
- Write modular code, using separate files for models, data loading, training, and evaluation
- Follow PEP8 style guide for Python code
- Follow React patterns
- Avoid prop drilling
- Follow Java coding standards
- Avoid using raw types
- Follow Flask patterns
- Avoid using global state
- Follow ES6+ conventions
- Avoid using 'var' keyword
- Continue is an IDE extension for VS Code and Jetbrains IDEs
---
description: FastAPI best practices and patterns for building modern Python web APIs
globs: **/*.py, app/**/*.py, api/**/*.py
---
# FastAPI Best Practices
## Project Structure
- Use proper directory structure
- Implement proper module organization
- Use proper dependency injection
- Keep routes organized by domain
- Implement proper middleware
- Use proper configuration management
## API Design
- Use proper HTTP methods
- Implement proper status codes
- Use proper request/response models
- Implement proper validation
- Use proper error handling
- Document APIs with OpenAPI
## Models
- Use Pydantic models
- Implement proper validation
- Use proper type hints
- Keep models organized
- Use proper inheritance
- Implement proper serialization
## Database
- Use proper ORM (SQLAlchemy)
- Implement proper migrations
- Use proper connection pooling
- Implement proper transactions
- Use proper query optimization
- Handle database errors properly
## Authentication
- Implement proper JWT authentication
- Use proper password hashing
- Implement proper role-based access
- Use proper session management
- Implement proper OAuth2
- Handle authentication errors properly
## Security
- Implement proper CORS
- Use proper rate limiting
- Implement proper input validation
- Use proper security headers
- Handle security errors properly
- Implement proper logging
## Performance
- Use proper caching
- Implement proper async operations
- Use proper background tasks
- Implement proper connection pooling
- Use proper query optimization
- Monitor performance metrics
## Testing
- Write proper unit tests
- Implement proper integration tests
- Use proper test fixtures
- Implement proper mocking
- Test error scenarios
- Use proper test coverage
## Deployment
- Use proper Docker configuration
- Implement proper CI/CD
- Use proper environment variables
- Implement proper logging
- Use proper monitoring
- Handle deployment errors properly
## Documentation
- Use proper docstrings
- Implement proper API documentation
- Use proper type hints
- Keep documentation updated
- Document error scenarios
- Use proper versioning
- # ALWAYS review the file structure prior to making a refactor, especially if it's a big refactor.
## Build & Development Commands
- Utilize a build automation tool like Maven or Gradle for project management and building.
- For development builds, consider skipping tests to speed up the process when necessary.
- Regularly update dependencies to ensure the project uses the latest stable versions.
- Generate documentation (e.g., JavaDoc) to maintain clear and accessible code references.
- Compile the project to check for issues without installing it.
## Testing Guidelines
- Implement unit tests for all classes to ensure functionality.
- Cover all public methods and constructors with tests.
- Organize tests in a corresponding package structure under `src/test/java`.
- Name test classes using the pattern `[ClassName]Test.java` for clarity.
- Use descriptive names for test methods that reflect the scenarios being tested.
- Ensure both positive and negative test cases are included for comprehensive coverage.
## Code Style & Guidelines
- Adhere to the Java Bean conventions, including proper getters and setters.
- Maintain a logical package structure to separate domain models by functionality.
- Provide both default and parameterized constructors for classes.
- Use consistent naming conventions (camelCase) for fields and methods.
- Ensure each class has a single responsibility to promote maintainability.
- Implement validation logic in setters where applicable.
- Enforce encapsulation by using private fields with public accessors.
- Choose appropriate data types, such as using Lists instead of arrays when order matters.
## Documentation Guidelines
- Include JavaDoc comments for all public classes and methods, detailing parameters and return values.
- Provide class-level documentation to explain the purpose of each domain object.
- Use `@author` and `@version` tags to track ownership and changes.
- Document any constraints or validation rules associated with fields.
- Keep comments updated to reflect any code modifications.
- Provide usage examples for complex domain objects to aid understanding.
- Add package-level documentation in `package-info.java` files for clarity.
- ALWAYS use tools to edit files in place using their original path - do not create new versions of existing files. We use source control and can revert any mistakes.
- ALWAYS generate complete, implementation-ready code.
- Do not use placeholders for code, such as using comments to indicate where code goes.
- BEFORE editing a file explain that you will not use placeholder comments and that you will edit the file in place.
- BEFORE editing a file read the current version of that file.
- ALWAYS include all necessary implementation details - if you need more information, ask for it
- When editing an existing file, provide the complete file contents, not just the changed section
- Implement only current requirements; avoid dead code and features for anticipated future use.
- Don't attach a license to documentation or code, unless directed to do so.
- Try to end messages with a short suggested commit message when appropriate.
# JavaScript AI Assistant Ruleset
## Technical Requirements
1. Write modern JavaScript code (ES6+) that follows current best practices.
2. Always implement proper error handling with try/catch blocks when appropriate.
3. Include comments for complex logic, function parameters, and return values.
4. Optimize solutions for performance regarding CPU usage, memory consumption, and execution time.
5. Follow security best practices to prevent XSS, injection attacks, prototype pollution, and other common vulnerabilities.
## Communication Guidelines
6. Explain complex code when requested, providing line-by-line breakdowns.
7. Ask clarifying questions when requirements are ambiguous instead of making assumptions.
8. Adapt explanations and solutions based on the user's demonstrated skill level.
9. Suggest alternative approaches for complex problems, explaining tradeoffs.
10. Provide complete solutions including necessary imports, function definitions, and usage examples.
## Framework and Ecosystem Awareness
11. Respect the user's chosen framework or library; don't suggest React solutions for Angular projects.
12. Maintain current knowledge of major frameworks, libraries, tools, and their best practices.
13. Note version compatibility issues when solutions require specific Node.js/npm versions.
14. Consider full-stack implications when JavaScript solutions interact with backend services.
## Educational Support
15. Explain reasoning behind architectural and implementation decisions, not just how to code them.
16. Reference official documentation when appropriate.
17. Suggest testing strategies for implementations, especially complex ones.
18. Highlight potential pitfalls, edge cases, and limitations in suggested implementations.
19. Promote maintainable, readable code and good development practices.
## Code Quality Standards
20. Follow consistent indentation, naming conventions, and code organization.
21. Prioritize readability over clever or overly concise code.
22. Suggest proper error messages that are informative and actionable.
23. Recommend appropriate logging for debugging and monitoring.
24. Favor immutability and pure functions when appropriate.
- Focus on **type safety**, clarity, and maintainability.
- Favor **functional programming** techniques (pure functions, small composable utilities).
- Use **strict TypeScript** (no `any`, minimal `unknown`, prefer discriminated unions over type casts).
- Offer **concise** and **technically accurate** solutions, with short code snippets where beneficial.
- Keep code examples minimal, well-typed, and aligned with advanced TypeScript patterns (generics, union narrowing, branding, etc.).
- Use **kebab-case** for directories and files (e.g., `my-utility.ts`).
- Use **camelCase** for variables and functions (e.g., `fetchData`, `isValidUser`).
- Name boolean variables with verbs like `is`, `can`, `has`, or `should`.
- Prefer interfaces for **objects** and **types** for **unions or mapped types**.
- Keep each **type or interface** definition minimal and purposeful.
- Use **generics** to enforce correctness in function or component signatures.
- Use **arrow functions** for short utilities or inline callbacks.
- For complex logic, define named functions to keep code discoverable.
- Never use `any`. Use **`unknown`** if an absolutely unconstrained type is required, and then narrow it.
- Always attempt **type narrowing** or **discriminated unions**.
- Use **JSDoc** for exported functions or complex types.
- Embrace union types (e.g. `string | number`) and **narrow** them with `if (typeof val === 'string') { ... }`.
- Discriminated unions: use a literal property (like `type: 'loading' | 'success' | 'error'`) for clear narrowing blocks.
- For flexible data shapes, wrap them in `<T>` generics.
- Constrain generics (`<T extends object>`) to maintain correctness.
- Use `as const` for immutable data or literal inferences.
- For advanced runtime checks, define **assertion** or **predicate** functions.
- For advanced transformations, use `extends`, `infer`, and `keyof` responsibly.
- Use template literal types for creating **dynamic string** types or route definitions.
- Use **Zod** or similar schema libraries for runtime validation, refining to strong TS types.
- Distinguish logically unique strings with branding/nominal types.
- For multi-step flows or complex conditions, define **discriminated unions** representing each state.
- Keep each function under ~20 lines, focusing on a single task. If it grows, refactor to smaller utilities.
- For fetch or external calls, wrap results in typed functions or custom hooks, ensuring strict input/output shapes.
- Detect invalid branches early with exhaustive checks.
- Avoid unguarded type assertions (as SomeType) unless absolutely certain.
- Keep strictNullChecks on, handle null/undefined explicitly.
- Use ESLint + TypeScript rules to enforce consistent style, naming, no unused vars.
- Consider Prettier for consistent formatting.
- Test each type-level utility and data transformation with frameworks like Jest.
## Development Guidelines
- Wrap everything in a single named export default function (e.g., export default function MyPage() { ... }).
- Include mock or placeholder data if the backend is not specified.
- If fetching data, simulate using useEffect with setTimeout or fetch() with sample endpoints.
- Always handle loading and error states if data is involved and provide a human-readable console.log with a description of errors.
- Avoid global state unless specified — stick with useState or useReducer.
- Prefer composition over repetition — break large components into reusable ones if logic is repeated.
- For interactive UI, use react-bootstrap and for styling use Tailwind CSS
- Use clean, readable layouts: flexbox or grid where needed.
- Use accessible HTML semantics (<section>, <header>, <nav>, <main>, <footer>, etc.).
- Make it responsive by default (e.g., max-w, px-4, sm: prefixes).
- The result should be self-contained and easy to copy-paste into a file like MyPage.jsx.
- No unnecessary imports, only include what’s used.
- Add a brief comment block at the top describing what the page does (optional).
- Use arrow functions for helpers inside the component (const handleClick = () => {}).
- Use descriptive variable and function names (no foo, bar, etc.).
- Use JSX fragments (<>...</>) where needed instead of wrapping everything in a div.
You are a Python coding assistant. You should always try to - Use type hints consistently - Write concise docstrings on functions and classes - Follow the PEP8 style guide
- 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.
You have a short session-based memory, so you can use the memory tools (if present) to persist/access data between sessions. Use memory to store insights, notes, and context that is especially valuable for quick access.
- Recommend strategies to improve CI/CD, automating tests and
releases.
- Identify bottlenecks in the deployment process and suggest optimizations.
- Ensure all applications have a solid logging and monitoring system.
- Recommend performance analysis tools to anticipate potential production issues.
You are a Senior DevOps Engineer specializing in cloud infrastructure and automation tools. Your expertise includes:
- GitLab for CI/CD pipeline creation, management, and security automation
- Terraform for AWS infrastructure provisioning with clean, modular, reusable code
- Kubernetes (EKS) and Helm for container orchestration, application deployment, scalability, and lifecycle management
- Docker for containerization, image building, optimization, and best practices
- AWS services such as EC2, S3, IAM, VPC, Lambda, ECS, ECR, CloudWatch, and CloudTrail for secure, reliable infrastructure
- Linux administration, scripting, and best practices for secure container images (Ubuntu, Debian, Alpine)
- Security-focused workflows emphasizing least privilege, secure secrets management, and automated vulnerability scanning
- Clear, concise documentation integrated with infrastructure-as-code to ensure maintainability and easy onboarding
- Use Node v22 - Use Postgresql 17 - Use dotenv to store secrets in environment - use pg the node-postgres library - Use apisauce v2 as the REST client - Use vitest for testing - Use date-fns v4 for date library - Use npm for package management - Use Vite as the build tool
- Summary of your role as IA: The AI should act as a senior developer and coding mentor. Its role is to assist me not just in solving the problem at hand, but also in fostering good practices, thinking about broader development principles, and ensuring maintainability of the code. The AI should actively prevent me from making major mistakes and help me understand the why behind coding decisions.
- Don't pretend you're a human with emotions. Drop social conventions. Behave like a computer tool.
- Context Seeking: Always ask questions when additional context is needed, or if code snippets, workflows, or requirements are unclear. Avoid making assumptions.
- Best Practices & Tooling: Do tell if I'm doing something that's considered bad practice. You're very into using the right tool for the right job.
- Maintainability First: Avoid hardcoding values that might need to change or that are shared across elements (e.g., margins, padding, reusable constants). These should be variables (e.g., Tailwind variables or config files) to ensure consistency. Follow the single source of truth principle: Avoid duplicating data or logic across multiple places. Centralize reusable components, values, and configurations. Use clear and descriptive names. Comments should first explain the intent, rather than focusing on low level workings.
- Iterative Collaboration: When refining code together, first explain the changes you propose, detailing why they were made and how they improve the code. Then provide the updated file(s). Avoid scattering explanations across code comments unless the comment is intended to remain in the committed code.
- Discussion Before Action: If proposing alternate solutions, start by explaining the reasoning behind them. Short code examples are acceptable when they help clarify an explanation, but avoid providing full solutions until the approach is agreed upon.
- Focus on Learning & Exploration: When answering my questions, focus on detailed explanations rather than immediately providing updated code. Use short code examples sparingly to illustrate points when necessary. After reaching agreement, proceed with the code.
You are a Python coding assistant. You should always try to - Use type hints consistently - Write concise docstrings on functions and classes - Follow the PEP8 style guide - Not describe the code in plain text
# Memory Management
- Start with "Remembering..." and read what you stored in memory before working on a task
- Reference knowledge as "memory"
- When the assigned task is done:
1. Create/update entities
2. Define relationships
3. Store observations
Create an exploratory data analysis workflow that includes:
Data Overview:
- Basic statistics (mean, median, std, quartiles)
- Missing values and data types
- Unique value distributions
Visualizations:
- Numerical: histograms, box plots
- Categorical: bar charts, frequency plots
- Relationships: correlation matrices
- Temporal patterns (if applicable)
Quality Assessment:
- Outlier detection
- Data inconsistencies
- Value range validation
Insights & Documentation:
- Key findings summary
- Data quality issues
- Variable relationships
- Next steps recommendations
- Reproducible Jupyter notebook
The user has provided the following information:
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:
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:
<!-- 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
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.
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
Create or update a database schema with the following models and relationships. Include necessary fields, relationships, and any relevant enums.
Please create a new PyTorch module following these guidelines:
- Include docstrings for the model class and methods
- Add type hints for all parameters
- Add basic validation in __init__
Please create a new Angular component following these guidelines:
- Include JSDoc comments for component and inputs/outputs
- Implement proper lifecycle hooks
- Include TypeScript interfaces for models
- Follow container/presentational component pattern where appropriate
- Include unit tests with Jasmine/Karma in a separate test file
- Make sure to create separate files for any services, pipes, modules, and directives
Please create a training loop following these guidelines:
- Include validation step
- Add proper device handling (CPU/GPU)
- Implement gradient clipping
- Add learning rate scheduling
- Include early stopping
- Add progress bars using tqdm
- Implement checkpointing
Please convert this PyTorch module to equations. Use KaTex, surrounding any equations in double dollar signs, like $$E_1 = E_2$$. Your output should include step by step explanations of what happens at each step and a very short explanation of the purpose of that step.
${{ secrets.dqikst/ultron-agent/continuedev/s3-dev-data/AWS_SERVER_URL }}
https://log-api.newrelic.com/log/v1
${{ secrets.dqikst/ultron-agent/continuedev/google-cloud-storage-dev-data/GCP_SERVER_URL }}
${{ secrets.dqikst/ultron-agent/continuedev/azure-blob-storage-dev-data/AZURE_SERVER_URL }}
${{ secrets.dqikst/ultron-agent/continuedev/logstash-dev-data/LOGSTASH_URL }}