DeepSeek Prompt for DeepSeek Optimized
A DeepSeek-optimized debugging prompt for identifying and fixing cross-origin security issues in a TypeScript customer support portal.
I need help debugging and fixing a cross-origin security issue in my TypeScript customer support portal project. **Leverage DeepSeek strengths:** Debugging requires systematic reasoning, understanding complex code interactions, and producing correct fixes, which are your strengths. **Tech stack:** Nest.js + GraphQL **My experience level:** junior developer ## Debugging Session Framework ### Step 1: Problem Description Template Help me describe the bug systematically: - **Expected behavior:** What should happen - **Actual behavior:** What is happening instead - **Reproduction steps:** Minimal steps to trigger the issue - **Frequency:** Always, intermittently, or under specific conditions - **Environment:** Development, staging, or production - **Recent changes:** What changed before the bug appeared ### Step 2: Diagnostic Approach for cross-origin security Issues Walk me through a systematic debugging process: 1. What information to gather first 2. Which logs, metrics, or traces to examine 3. How to narrow down the root cause 4. Common causes of cross-origin security issues in TypeScript with Nest.js + GraphQL 5. Debugging tools and commands specific to this stack ### Step 3: Common cross-origin security Patterns in TypeScript List the top 10 most common causes of cross-origin security bugs in TypeScript applications: For each pattern: - Description of the bug pattern - Code example showing the buggy code - Explanation of why it causes problems - Corrected code with the fix - How to prevent it in the future (linting rules, testing, code review checklist) ### Step 4: Fix Implementation Guide When I share my specific code, analyze it for: - The root cause of the cross-origin security issue - Any related bugs that might be lurking nearby - The minimal fix that resolves the immediate issue - A more thorough fix that prevents the class of bugs - Regression test to ensure the bug does not return ### Step 5: Prevention Strategies - Testing patterns that would have caught this cross-origin security bug - Static analysis or linting rules to add - Code review checklist items for cross-origin security issues - Monitoring and alerting to detect this issue in production - Architectural patterns that make cross-origin security bugs less likely ### Step 6: Knowledge Capture - Document the root cause and fix for the team - Create a runbook for diagnosing similar issues - Update development guidelines to prevent recurrence Please share your code and error messages, and I will walk through this framework with you step by step.
More prompts for DeepSeek Optimized.
Uses DeepSeek to analyze system architectures and identify performance bottlenecks, scalability issues, and optimization opportunities.
A DeepSeek-optimized refactoring prompt to improve monolith to modular in a Java learning management system codebase.
A DeepSeek-optimized debugging prompt for identifying and fixing data corruption issues in a TypeScript job board.
A DeepSeek-optimized refactoring prompt to improve single tenant to multi-tenant in a Java survey builder codebase.
A DeepSeek-optimized debugging prompt for identifying and fixing database query optimization issues in a TypeScript learning management system.
A DeepSeek-optimized refactoring prompt to improve single tenant to multi-tenant in a Python survey builder codebase.