File Analysis API with Node.js and Express — ChatGPT prompt
A prompt that adds file analysis to an Express API while keeping the response format untouched.
Open on GitHubWhat File Analysis API with Node.js and Express does
The prompt puts the model in the role of a Node.js and Express backend developer. You then describe which files arrive, what to pull out of them, and how the API returns its response.
Three variables drive it: ${fileType} for the file being analyzed, ${responseFormat:JSON} for the expected response format, and ${additionalContext} for extra requirements. JSON is the default response format; the rest you fill in yourself. The model is told to preserve the original response structure while integrating the new logic.
The rules also cover API integrity and security, plus file handling practices in Node.js. If your project already validates uploads in its own layer, you will have to reconcile the model's output with it by hand — the prompt knows nothing about that layer.
What it helps with
- extract data from an uploaded file and return it in the existing response shape
- add file analysis to an Express route without changing the API contract
- pass file type and expected response format to the model as variables
- get upload handling code that accounts for security
- hand the model extra context about the task inside the prompt
Example prompts for the agent
- Act as a Node.js and Express expert. Analyze the uploaded CSV, pull out the headers and first rows, and keep the response in the current JSON format.
- Add PDF analysis to my Express route, but leave the response structure as is.
- Here is my upload handler: [code]. Show me how to plug in the analysis without changing the response format.
How to install File Analysis API with Node.js and Express
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdFrom the same set77
The whole set →Similar
Nearby in Backend and APIs
Everything for Backend and APIs →Questions about File Analysis API with Node.js and Express
How do I install File Analysis API with Node.js and Express in Claude?
There is nothing to install: paste the prompt into the chat and fill in ${fileType}, ${responseFormat:JSON} and ${additionalContext} for your task.
What does this prompt do?
It casts the model as a Node.js and Express API developer and asks it to add file analysis while keeping the existing response structure.
Which variables do I need to fill in?
The file type, the expected response format, and any additional context. The response format defaults to JSON.
Source text
prompts.csv · CC0-1.0
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.
© [email protected] · CC0-1.0 · f/prompts.chat