Skip to main content
prompt GP ChatGPT

Data Transformer — ChatGPT prompt: what it does, how to install

Data Transformer sorts a user list into age brackets and counts the total entries. The prompt shapes raw user objects into a defined JSON structure.

Open on GitHub

What Data Transformer does

This prompt instructs an LLM to act as a structured data processor. It expects a list of objects containing name, email, and age fields. The model reads each item and maps it directly into the target JSON layout.

Output data splits into a single container. Users get sorted into under_18, 18_to_30, or over_30 buckets. A dedicated total_count integer property stores the overall number of processed records.

Missing an age field will break the grouping logic. The prompt only defines category placement rules without schema validation or error fallback instructions.

What it helps with

  • categorize user records by specified age boundaries
  • tally overall record count inside total_count
  • convert a flat contact list into a structured JSON payload

Example prompts for the agent

  • Organize the following user array into age groups using the output schema
  • Map user items into under_18, 18_to_30, and over_30 groups and calculate the total count
  • Transform this raw contacts JSON according to the specified bracket rules

How to install Data Transformer

How to use

Paste the text at the start of a chat or into project instructions

Questions about Data Transformer

How to install Data Transformer in Claude Code?

Add the prompt entry to .claude/commands/prompts.csv.md.

What does Data Transformer do?

It takes an array of user objects and groups them into three age brackets, setting the total record count in total_count.

Which attributes does the input schema require?

Each object must include name, email, and a numeric age.

Source text

prompts.csv · CC0-1.0
{"role": "Data Transformer", "input_schema": {"type": "array", "items": {"name": "string", "email": "string", "age": "number"}}, "output_schema": {"type": "object", "properties": {"users_by_age_group": {"under_18": [], "18_to_30": [], "over_30": []}, "total_count": "number"}}, "instructions": "Transform the input data according to the output schema"}

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Data and databases →

From the same set133

The whole set →
Continue Coding Assistant This prompt helps extend an existing codebase by reviewing its structure, suggesting changes, and writing code snippets. It works with ChatGPT and Claude.ai. GP ChatGPT ★ 174,676repo stars Code Review Agent This prompt turns the AI into a code reviewer that checks readability, security, and performance. Useful before opening a pull request or refactoring unfamiliar code. GP ChatGPT ★ 174,676repo stars Django Unit Test Generator for Viewsets Generate Django Viewset tests for CRUD requests, invalid input, and permission cases. Provide the class you want to cover. GP ChatGPT ★ 174,676repo stars Predictive Eye Tracking Heatmap Generator A prompt that turns a UI screenshot into a thermal heatmap: where the eye lands, and what gets scrolled past. GP ChatGPT ★ 174,676repo stars Code Review Assistant A prompt that turns the model into a reviewer: it reads your code for bugs, style and maintainability, then hands back a list of fixes. GP ChatGPT ★ 174,676repo stars Reverse Prompt Engineer A prompt that takes a finished output — text, code, an idea — and reconstructs the request that likely produced it. Handy for decoding someone else's prompt or auditing your own. GP ChatGPT ★ 174,676repo stars Linux Script Developer Configures the model to generate Bash scripts with error trapping and colorized terminal logs. Handy for developers automating Linux administration tasks. GP ChatGPT ★ 174,676repo stars Devops Engineer A prompt that turns the chat into a senior DevOps engineer and walks through deployment, infrastructure and CI/CD for your task. GP ChatGPT ★ 174,676repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor