Markdown Converter
Agent skill for markdown-converter
**Goal:**
Sign in to like and favorite skills
Goal: Build a lightweight Cloudflare Worker (TypeScript) that provides a calendar-style API and/or frontend for past and upcoming music album releases using Spotify's API as the data source.
DropDate (or DropD8) is an app that helps users see music album release dates — both past and upcoming — presented in a calendar-like format.
The project will be a serverless application running on Cloudflare Workers, fetching and caching data from the Spotify Web API. It should expose a JSON API (for front-end or third-party use) and optionally serve a minimal web page or static JSON response.
Album Release Endpoint
?from=2024-01-01?to=2025-12-31?artist=Taylor%20Swift?type=album,singleCaching
API Authentication
Optional Frontend
/api/releases and render by month.Error Handling
/src ├─ index.ts # Cloudflare Worker entry ├─ api/ │ └─ releases.ts # Main API handler ├─ utils/ │ ├─ spotify.ts # Spotify API wrapper │ ├─ cache.ts # Cache helpers │ └─ date.ts # Date parsing and formatting helpers ├─ types/ │ └─ spotify.ts # Type definitions for Spotify objects /public └─ index.html # Optional minimal frontend wrangler.toml # Cloudflare config package.json tsconfig.json
Parameters:
| Name | Type | Description |
|---|---|---|
| string | Start date (ISO 8601) |
| string | End date (ISO 8601) |
| string | Filter by artist name |
| number | Number of results per page |
| number | Pagination offset |
Example response:
{ "from": "2025-01-01", "to": "2025-01-31", "count": 25, "results": [ { "name": "The Tortured Poets Department", "artist": "Taylor Swift", "release_date": "2025-01-19", "spotify_url": "https://open.spotify.com/album/...", "cover_url": "https://i.scdn.co/image/..." } ] }
// Fetch Spotify access token).Write a TypeScript function
that queries the Spotify Web API for albums released within a date range. The function should use the client credentials flow for authentication, cache results for 12 hours using Cloudflare Cache API, and return a normalised list of releases withfetchReleases(from: string, to: string),name,artist,release_date, andspotify_url.cover_url
Configure
wrangler.toml:
name = "dropdate" main = "src/index.ts" compatibility_date = "2025-10-01" kv_namespaces = [ { binding = "DROP_CACHE", id = "xxxxxxxx" } ]
Set Spotify credentials in Wrangler secrets:
wrangler secret put SPOTIFY_CLIENT_ID wrangler secret put SPOTIFY_CLIENT_SECRET
Deploy:
wrangler deploy