### Project Installation and Development Setup Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/readme-project.md This bash script guides through cloning the repository, installing dependencies using pnpm, setting up environment variables by copying a template, and starting the development server. ```bash # Clone the repository git clone {{REPO_URL}} cd {{PROJECT_DIR}} # Install dependencies pnpm install # Set up environment cp .env.example .env # Edit .env with your values # Start development server pnpm dev ``` -------------------------------- ### Install OpenMeter Stripe App Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/REFERENCE.md Script for the initial setup or after a cleanup of the OpenMeter Stripe app. Use this for first-time installations. ```typescript scripts/openmeter/openmeter-install-stripe-app.ts ``` -------------------------------- ### Job Manager Usage Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-pg-boss/references/typescript-patterns.md Demonstrates how to initialize PgBoss, register jobs with the JobManager, start the manager, emit a type-safe job, and handle graceful shutdown. ```typescript const boss = new PgBoss(process.env.DATABASE_URL); const jobs = new JobManager(boss) .register(WelcomeEmailJob) .register(SyncContactsJob) .register(ProcessOrderJob); await jobs.start(); // Type-safe emit await jobs.emit("welcome-email", { email: "user@example.com", name: "John" }); // Graceful shutdown process.on("SIGTERM", () => jobs.stop()); ``` -------------------------------- ### Set Up Ngrok for Local Webhooks Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/SKILL.md Installs ngrok, authenticates it, and starts a tunnel for local webhook forwarding. After starting ngrok, use the provided script or manually update OpenMeter's configuration to use the ngrok URL. Restart OpenMeter after configuration changes. ```bash choco install ngrok ``` ```bash brew install ngrok ``` ```bash ngrok config add-authtoken YOUR_TOKEN ``` ```powershell .\scripts\start-ngrok.ps1 ``` ```bash ngrok http 3001 ``` ```bash curl http://127.0.0.1:4040/api/tunnels ``` ```bash npx tsx scripts/openmeter/set-openmeter-webhook-url.ts ``` ```bash docker compose restart openmeter ``` -------------------------------- ### Configuration Summary Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-viewer-create/references/configuration.md An example of how the Docs Viewer configuration choices are summarized in Markdown format. ```markdown ## Docs Viewer Configuration - **Admin area**: Using existing at `/admin` - **Frontend stack**: React Router - **Route**: `/admin/docs/*` - **Layout**: Three-column - **Markdown**: @uiw/react-markdown-preview - **Data fetching**: TanStack Query - **Mermaid**: Enabled Proceeding with implementation... ``` -------------------------------- ### Install @uiw/react-markdown-preview Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-viewer-create/references/templates/mermaid-markdown.md Use this command to install the recommended full-featured markdown preview library with Mermaid support. ```bash pnpm add @uiw/react-markdown-preview mermaid ``` -------------------------------- ### PostgreSQL Connection String Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md Example of a PostgreSQL connection string for the DATABASE_URL environment variable. ```env DATABASE_URL=postgresql://user:password@localhost:5432/dbname ``` -------------------------------- ### Full Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-pg-boss/references/send-options.md An example demonstrating the combined usage of multiple send options for a critical job. ```APIDOC ## Full Example ```typescript await boss.send("critical-job", payload, { priority: 10, retryLimit: 5, retryDelay: 30, retryBackoff: true, expireInMinutes: 15, retentionDays: 7, unique: `job-${userId}`, deadLetter: "critical-job-dlq", }); ``` ``` -------------------------------- ### Example .env File Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md A complete example of a .env file, demonstrating core, server, auth, and external service variable configurations. ```bash # Core DATABASE_URL=postgresql://postgres:postgres@localhost:5432/myapp REDIS_URL=redis://localhost:6379 # Server PORT=3000 NODE_ENV=development # Auth JWT_SECRET=dev-secret-change-in-production # External STRIPE_SECRET_KEY=sk_test_... ``` -------------------------------- ### Start Docker Services for OpenMeter Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/SKILL.md Use this command to bring up the necessary Docker services for OpenMeter. Verify the setup by checking the meters endpoint or running the verification script. ```bash npm run docker:up ``` ```bash curl http://localhost:8888/api/v1/meters ``` ```powershell .\scripts\verify-setup.ps1 ``` -------------------------------- ### Install and Build OpenMeter MCP Server Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api-mcp-server/README.md Install dependencies and build the project. Alternatively, use `npx tsx` for direct execution without a build step if `tsx` is installed. ```bash npm install npm run build ``` -------------------------------- ### HTTP GET Request Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/songkick.md Demonstrates a basic HTTP GET request to the Songkick API's artist search endpoint. Replace '{your-key}' with a valid API key. ```http GET https://api.songkick.com/api/3.0/search/artists.json?query=Phish&apikey={your-key} ``` -------------------------------- ### Query Meter Example Request Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/REFERENCE.md Example of a GET request to query meter data. Specify the meter, subject, time range, and desired window size. ```http GET /api/v1/meters/api_requests/query?subject=user_abc&from=2026-02-01T00:00:00Z&to=2026-02-14T23:59:59Z&windowSize=DAY ``` -------------------------------- ### Install react-markdown Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-viewer-create/references/templates/mermaid-markdown.md Use this command to install the lightweight and customizable react-markdown library with Mermaid support. ```bash pnpm add react-markdown react-syntax-highlighter mermaid ``` -------------------------------- ### Create Subscription Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/REFERENCE.md An example JSON payload for creating a new subscription. Requires customer ID, plan key, and currency. ```json { "customerId": "01ABC...", "plan": { "key": "pro" }, "currency": "USD" } ``` -------------------------------- ### Build Gate Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-agent-plan-execute/SKILL.md Example of a build gate command. Ensure it exits with code 0 upon successful completion. ```bash pnpm build ``` -------------------------------- ### Root Documentation README Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/self-documentation.md An example of a root README file for a documentation structure, providing quick links to different sections. ```markdown # Documentation > **Last Updated:** 2026-03-17 Quick links to project documentation. ## Developer Guide - [Getting Started](./developer/getting-started.md) - [Architecture](./developer/architecture.md) - [Scripts](./developer/scripts/README.md) ## Reference - [API Reference](./reference/api/README.md) - [Configuration](./reference/config.md) - [Environment Variables](./reference/env-vars.md) ## Operations - [Deployment](./operations/deployment.md) - [Monitoring](./operations/monitoring.md) ``` -------------------------------- ### Start API Server Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/SKILL.md Start the local API server for development. For ngrok HTTP forwarding, set the API_HTTP_FOR_NGROK=true environment variable. ```bash npm run dev ``` -------------------------------- ### Redis Connection String Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md Example of a Redis connection string for the REDIS_URL environment variable. ```env REDIS_URL=redis://localhost:6379 ``` -------------------------------- ### Section README Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/self-documentation.md An example of a README file for a specific section within the documentation, detailing available scripts. ```markdown # Scripts > **Last Updated:** 2026-03-17 CLI scripts for development and operations tasks. ## Available Scripts | Script | Description | |--------|-------------| | [stripe-product-sync](./stripe-product-sync.md) | Sync products from Stripe | | [db-seed](./db-seed.md) | Seed development database | | [generate-types](./generate-types.md) | Generate TypeScript types | ## Running Scripts All scripts use pnpm: ```bash pnpm script: [options] ``` ## Adding Scripts See [Adding CLI Scripts](../contributing/scripts.md) for guidelines. ``` -------------------------------- ### Generic Environment Variable Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md A placeholder example for defining custom environment variables. ```env {{AUTH_VAR}}={{EXAMPLE_VALUE}} ``` -------------------------------- ### Example Developer Section README Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/readme-section.md An example of a filled-out README file for a developer section, demonstrating the use of the template with actual content. ```markdown # Developer Guide > **Last Updated:** 2026-03-17 Resources for developers working on this codebase. ## Contents | Document | Description | |----------|-------------| | [Architecture](./architecture.md) | System design and component overview | | [Local Setup](./setup.md) | Development environment configuration | | [Testing](./testing.md) | Test guidelines and commands | | [Code Style](./code-style.md) | Conventions and formatting | ## Subsections - [Scripts](./scripts/README.md) — CLI script documentation ## Quick Reference ```bash # Start development pnpm dev # Run tests pnpm test # Type check pnpm typecheck ``` ## See Also - [Documentation Home](../README.md) - [Reference](../reference/README.md) ``` -------------------------------- ### Install Neon Serverless Dependencies Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-kysely-patterns/references/migrations.md Install the necessary packages for using the Neon HTTP dialect with Kysely. ```bash npm install kysely kysely-neon @neondatabase/serverless ``` -------------------------------- ### Authentication Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/phishnet.md Example of how to authenticate requests using an API key via the query string. ```APIDOC ## Authentication API key is appended via query string (preferred) or POST body. Every authenticated request must be HTTPS — non-SSL requests return error 10. ```http GET /v5/shows/showyear/1997.json?apikey=YOUR_API_KEY&order_by=showdate HTTP/1.1 Host: api.phish.net User-Agent: YourApp/1.0 (+https://your-site.example) Accept: application/json ``` Request a new key at https://phish.net/api/request-key (Phish.net login required). Existing keys are managed at https://phish.net/api/keys/. The API landing page (https://phish.net/api/) links to docs, wrappers, tutorials, and the example project. Keys are personal; see Terms §1.3–1.4 for commercial-use rules. ``` -------------------------------- ### Install Stripe App (API Key) Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/apps.md Installs the Stripe app using an API key. This method is suitable for manual installations. ```APIDOC ## Install Stripe (API key) ### Description Installs the Stripe app using an API key. This method is suitable for manual installations. ### Method POST ### Endpoint /api/v1/marketplace/listings/stripe/install/apikey ### Request Body - **apiKey** (string) - Required - Your Stripe API key. - **name** (string) - Required - The name for the Stripe app instance. - **createBillingProfile** (boolean) - Required - Whether to automatically create a billing profile linked to Stripe. ``` -------------------------------- ### Server Host Address Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md Example of setting the server bind address using the HOST environment variable. ```env HOST=0.0.0.0 ``` -------------------------------- ### Server Port Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md Example of setting the HTTP server port using the PORT environment variable. ```env PORT=3000 ``` -------------------------------- ### Install Stripe App via Script Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/apps.md Executes a script to automatically install the Stripe app, including listing existing apps, installing Stripe with a secret key, and creating a billing profile. ```bash npx tsx scripts/openmeter/openmeter-install-stripe-app.ts ``` -------------------------------- ### Dependency Cruiser Configuration Example (JavaScript) Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-complexity-assessment/references/coupling-analysis.md An example configuration file for `dependency-cruiser` to define rules against circular dependencies and cross-layer imports. ```javascript // .dependency-cruiser.js module.exports = { forbidden: [ { name: 'no-circular', severity: 'error', from: {}, to: { circular: true } }, { name: 'no-domain-to-ui', severity: 'error', from: { path: '^src/domain' }, to: { path: '^src/components' } } ] }; ``` -------------------------------- ### External Service API Key Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/env-vars.md Example format for an API key for an external service. ```env {{SERVICE}}_API_KEY=sk_live_... ``` -------------------------------- ### API Response Body Example (Success) Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/doc-types.md Example of a JSON object representing a successful user creation response. ```json { "id": "usr_abc123", "email": "user@example.com", "name": "Jane Doe", "createdAt": "2026-03-17T10:00:00Z" } ``` -------------------------------- ### Get Referents Endpoint Response Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/genius.md Example response for the GET /referents endpoint, showing a list of referents with their fragments, ranges, and associated annotations. ```json { "meta": { "status": 200 }, "response": { "referents": [ { "id": 123456, "fragment": "Some lyric fragment", "range": {"start": 0, "end": 20}, "annotations": [ { "id": 789012, "body": {...}, "state": "accepted", "verified": true, "votes_total": 25 } ] } ] } } ``` -------------------------------- ### Get Song Endpoint Response Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/genius.md Example response for the GET /songs/{id} endpoint, including song details, artist information, album data, and statistics. ```json { "meta": { "status": 200 }, "response": { "song": { "id": 378195, "title": "Tweezer", "full_title": "Tweezer by Phish", "url": "https://genius.com/Phish-tweezer-lyrics", "path": "/Phish-tweezer-lyrics", "header_image_url": "https://...", "song_art_image_url": "https://...", "release_date": "1994-03-29", "release_date_for_display": "March 29, 1994", "apple_music_id": "...", "apple_music_player_url": "https://...", "primary_artist": { "id": 13585, "name": "Phish", "url": "https://genius.com/artists/Phish", "image_url": "https://..." }, "featured_artists": [], "producer_artists": [], "writer_artists": [ {"id": 13586, "name": "Trey Anastasio"} ], "album": { "id": 14367, "name": "Hoist", "url": "https://genius.com/albums/Phish/Hoist", "cover_art_url": "https://..." }, "description": { "plain": "Description text...", "html": "

Description text...

", "dom": {"tag": "root", "children": [... ]} }, "media": [ {"provider": "youtube", "url": "https://youtube.com/..."}, {"provider": "spotify", "url": "https://open.spotify.com/..."} ], "stats": { "pageviews": 12345, "contributors": 23, "iq_earners": 5, "verified_annotations": 3, "unreviewed_annotations": 2, "accepted_annotations": 10 } } } } ``` -------------------------------- ### Basic PgBoss Setup Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-pg-boss/SKILL.md Set up a PgBoss instance with a connection string and schema. It also includes basic error handling and queue creation. ```typescript import { PgBoss } from "pg-boss"; const boss = new PgBoss({ connectionString: process.env.DATABASE_URL, schema: "pgboss", }); boss.on("error", console.error); await boss.start(); await boss.createQueue("my-queue"); ``` -------------------------------- ### Get Artist Endpoint Response Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/genius.md Example response for the GET /artists/{id} endpoint, providing artist information such as name, URLs, image URLs, and social media handles. ```json { "meta": { "status": 200 }, "response": { "artist": { "id": 13585, "name": "Phish", "url": "https://genius.com/artists/Phish", "image_url": "https://...", "header_image_url": "https://...", "followers_count": 1234, "description": {...}, "facebook_name": "phish", "twitter_name": "phish", "instagram_name": "phish" } } } ``` -------------------------------- ### Get App Details Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/apps.md Fetches detailed information about a specific installed app. ```APIDOC ## Get app details ### Description Fetches detailed information about a specific installed app. ### Method GET ### Endpoint /api/v1/apps/{id} ``` -------------------------------- ### HTTP GET Requests for MusicBrainz Search Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/musicbrainz.md Examples of GET requests to search for artists, releases, or recordings using the MusicBrainz API. Ensure to append `&fmt=json` for JSON responses. ```http GET /artist?query={name}&fmt=json ``` ```http GET /release?query=artist:{name}&fmt=json ``` ```http GET /recording?query={name}&fmt=json ``` -------------------------------- ### Discogs API Label Endpoints Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/discogs.md Examples of GET requests for retrieving label information and their releases. ```http GET /labels/{id} ``` ```http GET /labels/{id}/releases ``` -------------------------------- ### Discogs API Artist Endpoints Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/discogs.md Examples of GET requests for retrieving artist information and their releases. ```http GET /artists/{id} ``` ```http GET /artists/{id}/releases ``` ```http GET /artists/{id}/releases?sort=year&sort_order=desc ``` -------------------------------- ### Docker Build and Run Commands Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/templates/readme-project.md Instructions for building a Docker image for the project and running it as a container. ```bash docker build -t {{PROJECT_NAME}} . docker run -p {{PORT}}:{{PORT}} {{PROJECT_NAME}} ``` -------------------------------- ### HTTP GET Request for Wikidata SPARQL Endpoint Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/wikidata.md Example of an HTTP GET request to the Wikidata SPARQL endpoint to verify service functionality. This checks if a specific MusicBrainz ID returns the expected entity. ```http GET https://query.wikidata.org/sparql?query=SELECT%20%3Fitem%20WHERE%20%7B%20%3Fitem%20wdt%3AP434%20%22e01646f2-2a04-450d-8bf2-0d993082e058%22%20%7D Accept: application/sparql-results+json ``` -------------------------------- ### Plan with Multiple Phases Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/product-catalog.md Example JSON demonstrating a plan with multiple phases, such as a trial period followed by regular billing, each with its own rate cards. ```json { "phases": [ { "key": "trial", "name": "Trial Period", "startAfter": "P0D", "rateCards": [ { "type": "flat_fee", "featureKey": "api_access", "entitlementTemplate": { "type": "boolean" }, "price": { "type": "flat", "amount": "0.00" }, "billingCadence": "MONTH" } ] }, { "key": "regular", "name": "Regular Billing", "startAfter": "P14D", "rateCards": [ { "type": "flat_fee", "featureKey": "api_access", "entitlementTemplate": { "type": "boolean" }, "price": { "type": "flat", "amount": "29.00" }, "billingCadence": "MONTH" } ] } ] } ``` -------------------------------- ### Discogs API Release Endpoints Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/discogs.md Examples of GET requests for retrieving release information, including currency conversion. ```http GET /releases/{id} ``` ```http GET /releases/{id}?curr_abbr=USD ``` -------------------------------- ### Discogs API Database Search Endpoints Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/discogs.md Examples of GET requests for searching the Discogs database by query and type. ```http GET /database/search?q={query} ``` ```http GET /database/search?q={query}&type=artist ``` ```http GET /database/search?q={query}&type=release ``` ```http GET /database/search?q={query}&type=master ``` ```http GET /database/search?q={query}&type=label ``` -------------------------------- ### Mock Server Setup for Tests Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api-mcp-server/SKILL.md Demonstrates how to create a mock MCP server using 'createMockMcpServer' for testing purposes, allowing specific tool responses to be defined. ```typescript import { createMockMcpServer } from './test-utils'; const mockServer = createMockMcpServer({ tools: { openmeter_list_meters: async () => ({ content: [{ type: 'text', text: JSON.stringify([ { id: 'test-meter', slug: 'api-calls', aggregation: 'COUNT' } ]) }], }), }, }); ``` -------------------------------- ### Get Show Details - JSON Response Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/nugs.md An example JSON response for the 'catalog.container' method, showing details for a Bruce Springsteen show. Key fields include containerID, artistName, performanceDate, venueName, songs, and products. ```json { "methodName": "catalog.container", "responseAvailabilityCode": 0, "responseAvailabilityCodeStr": "AVAILABLE", "Response": { "containerID": 12046, "artistID": 991, "artistName": "Bruce Springsteen", "licensorName": "Bruce Springsteen", "performanceDate": "12/31/1975", "performanceDateFormatted": "1975/12/31", "venueName": "Tower Theater", "venueCity": "Upper Darby", "venueState": "PA", "venue": "Tower Theater, Upper Darby, PA", "containerInfo": "12/31/75 Tower Theater, Upper Darby, PA", "containerType": 0, "containerTypeStr": "Show", "totalContainerRunningTime": 8316, "hhmmssTotalRunningTime": "02:18:36", "pageURL": "/live-music/0,12046/Bruce-Springsteen-mp3-flac-download-12-31-1975-Tower-Theater-Upper-Darby-PA.html", "img": { "picID": 57885, "url": "/images/shows/bs751231_02.jpg" }, "songs": [ { "songID": 41726, "songTitle": "Night", "discNum": 1, "trackNum": 1, "setNum": 1, "trackID": 733759, "clipURL": "https://assets.nugs.net/clips2/bs751231d1_01_Night_c.mp3" }, { "songID": 45413, "songTitle": "Tenth Avenue Freeze-Out", "discNum": 1, "trackNum": 2, "setNum": 1, "trackID": 733760, "clipURL": "https://assets.nugs.net/clips2/bs751231d1_02_Tenth_Avenue_FreezeOut_c.mp3" } ], "products": [ { "formatStr": "MP3", "skuID": 257645, "cost": 1499, "productStatusType": 1 }, { "formatStr": "FLAC", "skuID": 257646, "cost": 1899, "productStatusType": 1 } ], "isInSubscriptionProgram": true, "catalogIds": ["nugs"] } } ``` -------------------------------- ### HTTP GET Requests for MusicBrainz Lookup by MBID Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/musicbrainz.md Examples of GET requests to retrieve detailed information about an artist using their MusicBrainz ID (MBID). Use the `inc` parameter to include related data like URLs or releases. ```http GET /artist/{mbid}?fmt=json ``` ```http GET /artist/{mbid}?inc=url-rels&fmt=json ``` ```http GET /artist/{mbid}?inc=releases&fmt=json ``` ```http GET /artist/{mbid}?inc=url-rels+releases&fmt=json ``` -------------------------------- ### Discogs API Master Release Endpoints Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/discogs.md Examples of GET requests for master releases and their versions, including filtering by format and country. ```http GET /masters/{id} ``` ```http GET /masters/{id}/versions ``` ```http GET /masters/{id}/versions?format=Vinyl&country=US ``` -------------------------------- ### Create Pending Invoice Line Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/billing.md Manually add line items to a customer's upcoming invoice. This is useful for one-off charges or setup fees. ```json { "lines": [ { "type": "flat_fee", "name": "Setup Fee", "amount": "99.00", "currency": "USD" } ] } ``` -------------------------------- ### Create Customer Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/REFERENCE.md Provides an example JSON payload for creating a new customer. Include details like key, name, primary email, currency, billing address, and usage attribution. ```json { "key": "cust_abc123", "name": "Acme Corp", "primaryEmail": "billing@acme.com", "currency": "USD", "billingAddress": { "country": "US", "state": "CA" }, "usageAttribution": { "subjectKeys": ["user_abc123"] } } ``` -------------------------------- ### Actionable Error Message Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api-mcp-server/SKILL.md Demonstrates how to throw informative errors that guide agents toward solutions, including specific identifiers and suggested alternative actions. ```typescript throw new Error('Request failed'); ``` ```typescript throw new Error( `OpenMeter customer not found: ${customerId}. ` + `Use openmeter_list_customers to find valid customer IDs.` ); ``` -------------------------------- ### tl-docs-viewer-create AskQuestion Flow: Frontend Stack Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/docs-viewer.md Example of a question prompt and options for selecting the frontend stack when configuring the viewer skill. ```yaml prompt: "What's your frontend stack?" options: - React Router - Wouter - Next.js - TanStack Router - Remix - Other ``` -------------------------------- ### Self-Hosted YAML Channel Configuration Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-api/references/notifications.md Example configuration for a webhook channel in a self-hosted OpenMeter setup. Specifies URL, custom headers, and event type registration behavior. ```yaml notification: webhook: eventTypeRegistrationTimeout: 30s skipEventTypeRegistration: true channels: - id: "my-channel-01" type: WEBHOOK name: "Local Webhook" webhook: url: "http://host.docker.internal:3000/webhooks/openmeter" customHeaders: x-webhook-secret: "my-secret" ``` -------------------------------- ### Last.fm API Test Endpoint Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/lastfm.md Provides a sample HTTP GET request to verify the Last.fm API is responding correctly, including parameters for artist info retrieval. ```http GET http://ws.audioscrobbler.com/2.0/?method=artist.getInfo&artist=Phish&api_key={your-key}&format=json ``` -------------------------------- ### Learning Example: Tracing Modern Patterns to Origins Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-first-principles/SKILL.md Provides examples of how modern software patterns and technologies can be traced back to foundational principles and their originators. ```text React hooks → Composition over Inheritance → GoF (1994) TypeScript interfaces → Contracts → Hoare (1969), Liskov (1987) Redux single store → SSOT → Hunt & Thomas (1999) Microservices → Information Hiding → Parnas (1972) ``` -------------------------------- ### Test Genius API Endpoint Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/genius.md An example HTTP GET request to test the Genius API's search endpoint. Verifies that the API is responding and returning song results. ```http GET https://api.genius.com/search?q=Tweezer%20Phish Authorization: Bearer {your-token} ``` -------------------------------- ### HTTP Request with Bearer Token Authentication Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/jambase.md Example of an HTTP GET request to the /v3/genres endpoint, demonstrating the required Authorization header with a Bearer token. Obtain your API key from the JamBase developer dashboard. ```http GET /v3/genres HTTP/1.1 Host: api.jambase.com Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Docs Initialization Command Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/doc-types.md Command to initialize the documentation structure, creating necessary files and directories. ```bash /docs-init ``` -------------------------------- ### Test API Endpoint for Free Tier Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-live-music-data/references/theaudiodb.md Provides an example HTTP GET request to test TheAudioDB API responsiveness on the free tier. It demonstrates a basic artist search and the expected response structure. ```http GET https://www.theaudiodb.com/api/v1/json/2/search.php?s=Phish ``` -------------------------------- ### Neon Serverless (HTTP) Connection Setup Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-kysely-patterns/references/migrations.md Configure Kysely to use the `NeonHTTPDialect` for serverless environments like Vercel Edge or Cloudflare Workers. This dialect is stateless and does not support interactive transactions. Install `kysely-neon` and `@neondatabase/serverless`. ```typescript import { Kysely } from "kysely" import { NeonHTTPDialect } from "kysely-neon" const db = new Kysely({ dialect: new NeonHTTPDialect({ connectionString: process.env.DATABASE_URL!, }), }) ``` -------------------------------- ### Initialize Documentation Structure Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-docs-create/references/doc-types.md Command to initialize the documentation structure, creating necessary files and directories. ```APIDOC ## /docs-init ### Description Initializes the documentation structure. ### Usage `/docs-init` ### Actions 1. Creates `AGENTS.md` if it does not exist. 2. Creates `README.md` if it does not exist. 3. Creates the `docs/` skeleton directory if a comprehensive scope is intended. ``` -------------------------------- ### Start PgBoss Instance Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-pg-boss/SKILL.md Initialize and start a PgBoss instance. This is critical and must be called in every process, including producers and workers. It automatically creates the 'pgboss' schema if it doesn't exist. ```typescript const boss = new PgBoss(connectionString); await boss.start(); // Required in EVERY process ``` -------------------------------- ### Start Ngrok Tunnel Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/REFERENCE.md A PowerShell script to start an ngrok tunnel. This is typically run before starting development that involves Stripe integration. ```powershell scripts/start-ngrok.ps1 ``` -------------------------------- ### Initialize PgBoss with Constructor Options Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-pg-boss/references/advanced-patterns.md Configure PgBoss during instantiation with connection details, schema, and behavior flags like supervision and scheduling. Use the 'db' option for custom database connections, such as those from ORMs. ```typescript const boss = new PgBoss({ connectionString: process.env.DATABASE_URL, // Schema schema: "pgboss", // Behavior supervise: true, // Enable maintenance schedule: true, // Enable cron jobs onComplete: false, // Enable completion events // Custom connection db: { executeSql }, // For ORMs }); ``` -------------------------------- ### List Installed Apps Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-openmeter-local-dev/references/apps.md Retrieves a list of all apps currently installed in OpenMeter. ```APIDOC ## List installed apps ### Description Retrieves a list of all apps currently installed in OpenMeter. ### Method GET ### Endpoint /api/v1/apps ``` -------------------------------- ### Standard PostgresDialect (pg) Connection Setup Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-kysely-patterns/references/migrations.md Set up a standard Kysely connection using `PostgresDialect` with a `pg.Pool`. This is suitable for traditional Node.js environments and requires importing `Kysely`, `PostgresDialect`, and `pg`. Ensure your `Database` type is correctly imported. ```typescript import { Kysely, PostgresDialect } from "kysely" import pg from "pg" import type { Database } from "./db.d.ts" const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL, max: 10, }) export const db = new Kysely({ dialect: new PostgresDialect({ pool }), }) ``` -------------------------------- ### Technical Plan Exit Gate Example Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-agent-plan-create/references/technical-plan-template.md Example of an exit gate verification command within a technical plan. This specific example uses `npx tsc --noEmit` to verify TypeScript compilation. ```bash npx tsc --noEmit ``` -------------------------------- ### Run Initial Knip Analysis Source: https://github.com/toddlevy/tl-agent-skills/blob/main/skills/tl-knip/SKILL.md Execute Knip to perform a full analysis of the project. This command should be run after understanding the project structure and before making any fixes. ```bash npx knip ```