xiaohongshu
xiaohongshu
newsletter-events-write
Generate markdown newsletters from stored events. Use when the user wants to create, write, or generate a newsletter from scraped events.
Full skill instructions
<essential_principles>
This skill generates markdown newsletters from events stored in SQLite. The workflow splits responsibility:
Users describe how they want newsletters formatted in plain English. You interpret these instructions directly - no templates or structured syntax needed.
Example preference from config:
formatting_preferences: |
Organize by date with each day as a section header.
Use emojis: 🎵 music, 🎨 art, 🍴 food.
Format: **Title** @ Venue | Time | Price
Events are stored in SQLite at ~/.config/local-media-tools/data/events.db.
Config is at ~/.config/local-media-tools/sources.yaml.
Generated markdown saved to ./newsletter_YYYY-MM-DD.md in the current working directory.
</essential_principles>
NEVER write inline Python to load events or config. Use the CLI tool:
# Get plugin directory first
PLUGIN_DIR=$(cat ~/.claude/plugins/installed_plugins.json | jq -r '.plugins["newsletter-events@local-media-tools"][0].installPath')
# Load events and preferences (default: next 7 days)
cd "$PLUGIN_DIR" && uv run python scripts/cli_newsletter.py load --days 7
The CLI tool handles:
Do NOT:
cat ~/.claude/plugins/installed_plugins.json | jq -r '.plugins["newsletter-events@local-media-tools"][0].installPath'
Save the output path as PLUGIN_DIR.
Run the CLI to get events and formatting preferences:
cd "$PLUGIN_DIR" && uv run python scripts/cli_newsletter.py load --days 7
Or for a specific date range:
cd "$PLUGIN_DIR" && uv run python scripts/cli_newsletter.py load --from 2025-01-01 --to 2025-01-14
Output: JSON containing:
newsletter_name - Newsletter titleregion - Geographic regionformatting_preferences - User's natural language formatting instructionsdate_range - Start and end datesevent_count - Number of eventsevents - Array of event objectsIf no events found, the CLI returns an error with suggestions.
Using the JSON output from Step 1, generate markdown that follows the formatting_preferences.
Your task: Interpret the natural language preferences and apply them creatively:
formatting_preferences fieldEach event in the events array has:
| Field | Description | Example |
|---|---|---|
title | Event name | "Jazz Night" |
venue | Venue name | "The Blue Note" |
venue_city | Venue city | "Kingston" |
date | ISO date | "2025-01-20" |
day_of_week | Full day name | "Saturday" |
formatted_date | Human-readable date | "January 20" |
time | Start time | "8:00 PM" or null |
description | Event description | "Live jazz trio..." |
category | Event category | "music", "art", "food_drink" |
price | Price or null | "$15" |
is_free | Boolean | true/false |
ticket_url | Link to buy tickets | URL or null |
event_url | Link to event page | URL or null |
source_url | Where event was found | URL or null |
Write the generated markdown to the current working directory:
./newsletter_YYYY-MM-DD.md
Use today's date for the filename.
Show the first ~50 lines of generated markdown so user can review.
Report:
<error_handling>
The CLI will return:
{
"error": "no_events",
"message": "No events found from 2025-01-01 to 2025-01-07",
"suggestion": "Run /newsletter-events:research to scrape new events, or try a wider date range with --days 14"
}
Report this to the user with the suggestion.
If formatting_preferences is null or empty, use sensible defaults:
Organize events chronologically by date.
Use section headers for each day (e.g., "## Saturday, January 20").
Include event title, venue, time, and price.
Keep formatting simple and readable.
The CLI will return:
{
"error": "database_not_found",
"message": "Database not found at ~/.config/local-media-tools/data/events.db",
"suggestion": "Run /newsletter-events:research to scrape events first"
}
</error_handling>
<success_criteria> Newsletter generation is complete when:
./newsletter_YYYY-MM-DD.mdxiaohongshu
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