xiaohongshu
xiaohongshu
bulk-support-message
Send bulk messages to dancers via Ballee Support chat. Use when sending apology messages, system updates, or personalized notifications to users.
Full skill instructions
Send bulk messages to dancers via the Ballee Support chat system. Messages are sent as direct messages from Ballee Support, which triggers email notifications to recipients.
Use this skill when:
Query the production database to get the list of affected users:
SELECT DISTINCT
p.id as profile_id,
p.first_name,
p.last_name,
u.email
FROM profiles p
JOIN auth.users u ON p.id = u.id
WHERE p.id IN ('uuid1', 'uuid2', ...);
For each recipient, find or create a support conversation:
-- Find existing support conversation
SELECT c.id as conversation_id
FROM conversations c
JOIN conversation_participants cp1 ON c.id = cp1.conversation_id
JOIN conversation_participants cp2 ON c.id = cp2.conversation_id
WHERE cp1.user_id = '<dancer_id>'
AND cp2.user_id = '00000000-0000-0000-0000-000000000001' -- Ballee Support ID
AND c.is_direct = true
AND c.deleted_at IS NULL;
-- Or create a new conversation if none exists
INSERT INTO conversations (is_direct, created_by)
VALUES (true, '00000000-0000-0000-0000-000000000001')
RETURNING id;
INSERT INTO conversation_participants (conversation_id, user_id, is_active)
VALUES
('<new_conv_id>', '<dancer_id>', true),
('<new_conv_id>', '00000000-0000-0000-0000-000000000001', true);
Insert messages as Ballee Support:
INSERT INTO messages (conversation_id, sender_id, content, content_type)
VALUES (
'<conversation_id>',
'00000000-0000-0000-0000-000000000001', -- Ballee Support
'Your message here',
'text'
);
The chat system's database triggers will automatically:
last_message_atunread_count for recipient-- Bulk insert apology messages for affected dancers
WITH support_user AS (
SELECT '00000000-0000-0000-0000-000000000001'::uuid AS id
),
affected_dancers AS (
-- List of affected dancer profile IDs
SELECT unnest(ARRAY[
'9a7c53d9-b132-497c-ab93-1b45f2dc07a9',
'd18108c8-f639-4d17-8c94-f334535c10c1'
-- ... more IDs
]::uuid[]) AS profile_id
),
dancer_conversations AS (
SELECT
ad.profile_id,
c.id as conversation_id
FROM affected_dancers ad
JOIN conversation_participants cp1 ON cp1.user_id = ad.profile_id
JOIN conversation_participants cp2 ON cp2.conversation_id = cp1.conversation_id
JOIN conversations c ON c.id = cp1.conversation_id
CROSS JOIN support_user su
WHERE cp2.user_id = su.id
AND c.is_direct = true
AND c.deleted_at IS NULL
)
INSERT INTO messages (conversation_id, sender_id, content, content_type)
SELECT
dc.conversation_id,
(SELECT id FROM support_user),
'Hi! Earlier today, you may have received an email with the subject "Performance tomorrow". Please disregard this email — it was sent by mistake due to a technical issue. Your actual event date has not changed and we will send you a proper reminder closer to that date. We sincerely apologize for any confusion. — The Ballee Team',
'text'
FROM dancer_conversations dc;
00000000-0000-0000-0000-000000000001automation_scheduled_notifications systemxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience