Skip to content
newsletter-events-write logo

Get plugin directory first

newsletter-events-write

Generate markdown newsletters from stored events. Use when the user wants to create, write, or generate a newsletter from scraped events.

SKILL.md

Full skill instructions

<essential_principles>

How This Skill Works

This skill generates markdown newsletters from events stored in SQLite. The workflow splits responsibility:

  1. CLI tool handles fragile data operations (paths, types, queries)
  2. Claude handles creative generation (interpreting preferences, formatting)

Key Concept: Natural Language Formatting

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

Data Source

Events are stored in SQLite at ~/​.config/​local-media-tools/​data/​events.db. Config is at ~/​.config/​local-media-tools/​sources.yaml.

Output

Generated markdown saved to ./​newsletter_YYYY-MM-DD.md in the current working directory. </​essential_principles>

<critical> ## Use CLI for Data Loading - Never Inline Python

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:

  • Correct database path resolution
  • Proper date type conversions
  • Loading formatting preferences from config
  • Returning structured JSON

Do NOT:

  • Write inline Python to query the database
  • Hardcode paths to config or database
  • Import schema modules directly </​critical>
<workflow> ## Step 0: Get Plugin Directory
cat ~/​.claude/​plugins/​installed_plugins.json | jq -r '.plugins["newsletter-events@local-media-tools"][0].installPath'

Save the output path as PLUGIN_DIR.

Step 1: Load Data with CLI

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 title
  • region - Geographic region
  • formatting_preferences - User's natural language formatting instructions
  • date_range - Start and end dates
  • event_count - Number of events
  • events - Array of event objects

If no events found, the CLI returns an error with suggestions.

Step 2: Generate Newsletter (Your Creative Task)

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:

  • Read the formatting_preferences field
  • Adapt raw event descriptions to match user's desired style
  • Apply emoji rules, formatting patterns, organization
  • Generate readable, well-structured markdown

Available Fields Reference

Each event in the events array has:

FieldDescriptionExample
titleEvent name"Jazz Night"
venueVenue name"The Blue Note"
venue_cityVenue city"Kingston"
dateISO date"2025-01-20"
day_of_weekFull day name"Saturday"
formatted_dateHuman-readable date"January 20"
timeStart time"8:00 PM" or null
descriptionEvent description"Live jazz trio..."
categoryEvent category"music", "art", "food_drink"
pricePrice or null"$15"
is_freeBooleantrue/​false
ticket_urlLink to buy ticketsURL or null
event_urlLink to event pageURL or null
source_urlWhere event was foundURL or null

Formatting Guidelines

  1. Read preferences carefully - follow user instructions exactly
  2. Handle nulls gracefully - skip fields that are null/​missing
  3. Sort appropriately - events come pre-sorted by date then time
  4. Be creative - adapt descriptions to match user's style

Step 3: Save Output

Write the generated markdown to the current working directory:

./​newsletter_YYYY-MM-DD.md

Use today's date for the filename.

Step 4: Display Preview

Show the first ~50 lines of generated markdown so user can review.

Report:

  • Output file path
  • Number of events included
  • Date range covered </​workflow>

<error_handling>

No Events Found

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.

No Formatting Preferences

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.

Database Not Found

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:

  • CLI tool used to load events (not inline Python)
  • Formatting preferences interpreted correctly
  • Markdown generated following user's preferences
  • Output saved to ./​newsletter_YYYY-MM-DD.md
  • Preview displayed to user </​success_criteria>

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View