Skip to main content
prompt GP ChatGPT

map — Claude Code prompt: parse subscription data

This Claude Code prompt defines how to read responses from a Persona subscription tool. It maps a sample response to fields, item types, and grouping rules.

MIT ★ 395 updated 2026-11-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/map.md
Open on GitHub

What map does

map sets rules for reading responses from a tool that Persona calls repeatedly to collect new data. From one sample, it distinguishes a stream of separate items from a single state snapshot, then specifies how results appear in the Inbox and knowledge base.

For item lists, the prompt describes paths to values such as a title, stable ID, timestamp, sender, body, link, or thread. The sample can contain up to 3 entries, and strings are capped at 120 characters. A text response can only be treated as a snapshot.

Install the file at .claude/commands/map.md. The user-facing note is written in {{.Language}} and should contain no paths, field names, or JSON.

What it helps with

  • tell a list of incoming records from a state snapshot
  • map response values to fields on each item
  • group messages by source or conversation thread
  • handle items that have no stable ID

Example prompts for the agent

  • Use this sample response to map the subscription data and identify its item fields.
  • Group these messages by conversation and write the user-facing note.
  • Treat this text response as a state snapshot and define its title.

How to install map

Manually: put the files in place

.claude/commands/map.md

Questions about map

How do I install map in Claude Code?

Add the prompt file at .claude/commands/map.md.

What does map do?

It sets rules for interpreting a sample from a subscription tool, including the data type, field paths, and grouping.

How does map handle a limited sample?

A sample can include up to 3 entries, with strings capped at 120 characters. Text responses are treated only as snapshots.

Source text

map.md · MIT
You set up a subscription: Persona will call one tool of an app's source again and again, with nobody watching, to bring in what is new. The tool and its arguments are chosen. From one sample of what it answers, say how to read every answer.

The sample is cut for you: a list keeps at most 3 entries and a string at most 120 characters. Real answers have more.

- mode: items when the answer lists things that arrive one by one (mail, messages, notices, events); snapshot when it is one state, kept whole each time it changes (a balance, a status, a page). A text answer can only be a snapshot.
- items_path, for items: where the list is, from the answer's root. $ when the answer itself is the list, $.items for its key items. Leave it out for a snapshot.
- fields: where each value is, relative to one item, such as $.subject, $.from.name or $.to[0]. A path is $ followed by .key or [index] steps; a key has letters, digits, _ and -, and does not start with a digit. No wildcards, filters or expressions. Leave out a field the items do not have.
  - title, required for items: a short line that says what the item is.
  - id: a value that is unique to the item and never changes, such as a message id. Without one, items are told apart by title, time and sender, and an edited item comes in again.
  - time: when it was sent or made. due_date: only for something due by a date.
  - sender; body, its text; link, a URL that opens it; thread, the conversation it belongs to when the items come from several (a mail thread, a forum topic).
  - For a snapshot, only title may be given: the state's name, when the answer has one.
- kind: sub_mail for mail, sub_message for chat messages, sub_notice for notices, announcements and notifications, sub_deadline for things due by a date, sub_event for calendar events, sub_update for changes or a state, sub_digest for a periodic summary.
- group_by decides the rows in the user's Inbox and the chats in the knowledge base. source when the whole answer is one conversation, such as a group chat or a channel: it is one row, with the newest message on top. thread when each item stands on its own (articles, notifications, mail) or belongs to one of several conversations: one row per thread, and an item without a thread is a row of its own.
- note: one or two sentences in {{.Language}} for the user, saying what will be brought in and what each item's title shows. No paths, field names or JSON.

© nwverse · MIT · nwverse/persona

Similar prompts

All prompts for Agent setup: memory, context, orchestration →

From the same set61

The whole set →
workout_report workout_report — a Claude Code prompt that turns workout measurements into a report. It charts heart rate and pace, then compares the session with recent workouts of the same activity. GP ChatGPT ★ 395repo stars spoken This Claude Code prompt marks answer content that should stay on screen rather than be spoken aloud. It handles items such as code blocks, tables, links, and images. GP ChatGPT ★ 395repo stars answer_input The answer_input Claude Code prompt builds an answer from meeting context. It can use spoken lines, calendar details, photos, and notes from earlier meetings. GP ChatGPT ★ 395repo stars followup_seed The followup_seed Claude Code prompt prepares the opening message for a meeting follow-up. It places meeting material in context before the owner’s message. GP ChatGPT ★ 395repo stars answer This Claude Code prompt answers questions using material from a recorded meeting. If no question was typed, it picks the latest spoken question addressed to Persona or the meeting owner. GP ChatGPT ★ 395repo stars room_claude The room_claude prompt for Claude Code sets up an assistant for a recorded meeting. It tracks topics and key points, answers from meeting material, and handles photos sent during the meeting. GP ChatGPT ★ 395repo stars instructions The instructions prompt for Claude Code and ChatGPT sets rules for Persona’s voice assistant. It routes requests to the right conversation and guides when to answer, search, or hand off work. GP ChatGPT ★ 395repo stars supervision_instructions supervision_instructions is a Claude Code prompt for supervising agent tasks and checking their results. It defines how to track assignments, respond to status signals, and decide whether work is ready to accept. GP ChatGPT ★ 395repo stars

Project sponsors

Companies that keep this analytics open