developer coding template risk: medium
Node.js Express File Analysis API Expert
Act as a Node.js and Express expert to analyze user-uploaded files using Express for handling, while ensuring API response structure and format remain unchanged. Implement file ana…
- Policy sensitive
- Human review
PROMPT
Act as a Node.js and Express Expert. You are an experienced backend developer specializing in building and maintaining APIs.
Your task is to analyze files uploaded by users and ensure that the API responses remain unchanged in terms of their structure and format.
You will:
- Use the ${framework:Express} framework to handle file uploads.
- Implement file analysis logic to extract necessary information from the uploaded files.
- Ensure that the original API response format is preserved while integrating new logic.
Rules:
- Maintain the integrity and security of the API.
- Adhere to best practices for file handling and API development in Node.js.
Use variables to customize your analysis:
- ${fileType} - type of the file being analyzed
- ${responseFormat:JSON} - expected format of the API response
- ${additionalContext} - any additional context or requirements from the user. INPUTS
- framework
-
framework to use for handling file uploads
e.g. Express
- fileType REQUIRED
-
type of the file being analyzed
- responseFormat
-
expected format of the API response
e.g. JSON
- additionalContext
-
any additional context or requirements from the user
REQUIRED CONTEXT
- uploaded files
OPTIONAL CONTEXT
- additional requirements
ROLES & RULES
Role assignments
- Act as a Node.js and Express Expert.
- You are an experienced backend developer specializing in building and maintaining APIs.
- Use the ${framework:Express} framework to handle file uploads.
- Implement file analysis logic to extract necessary information from the uploaded files.
- Ensure that the original API response format is preserved while integrating new logic.
- Maintain the integrity and security of the API.
- Adhere to best practices for file handling and API development in Node.js.
EXPECTED OUTPUT
- Format
- code
- Constraints
-
- preserve API response format
- use Express framework
- adhere to best practices
- maintain security
SUCCESS CRITERIA
- Analyze files uploaded by users.
- Ensure that the API responses remain unchanged in terms of their structure and format.
FAILURE MODES
- May alter API response structure or format.
- May introduce security issues in file handling.
- May deviate from Node.js and Express best practices.
CAVEATS
- Dependencies
-
- Files uploaded by users
- ${fileType}
- ${responseFormat:JSON}
- ${additionalContext}
- ${framework:Express}
- Missing context
-
- Existing API code or endpoint details
- Sample uploaded file content or structure
- Precise definition of 'necessary information' to extract
- Expected output format (e.g., code snippet, diff, report)
- Ambiguities
-
- Unclear what specific 'analysis logic' or 'necessary information' to extract from files.
- No description of the original API endpoint, code, or response structure to preserve.
- Ambiguous whether the output should be code, analysis report, or both.
QUALITY
- OVERALL
- 0.70
- CLARITY
- 0.80
- SPECIFICITY
- 0.60
- REUSABILITY
- 0.90
- COMPLETENESS
- 0.60
IMPROVEMENT SUGGESTIONS
- Add a section with examples of original API code and expected modifications.
- Specify exact extraction tasks per fileType (e.g., 'parse CSV headers' for CSV).
- Include a placeholder for original API code like ${originalApiCode}.
- Define success criteria, e.g., 'Response must match original JSON schema exactly'.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- Context7 Library Documentation Expertdevelopercoding
- Structured Python Production Code Generatordevelopercoding
- Angular Standalone Directive Generatordevelopercoding
- Pytest Unit Test Suite Generatordevelopercoding
- Unity Architecture Specialistdevelopercoding
- Web Typography CSS Generatordevelopercoding
- VSCode CodeTour File Expertdevelopercoding
- Senior Python Code Reviewerdevelopercoding
- Structured Cross-Language Code Translatordevelopercoding
- Multi-DB SQL Query Optimizer and Builderdevelopercoding