Dev & Engineering openroutercloudflare-workerstypescriptllm-integrationstreamingweb-search

PinMe Worker OpenRouter API Integration

Call OpenRouter-backed LLM APIs from a PinMe Worker (TypeScript) with streaming and web search support.

FollowSkills review · FSRS-2.0
Use with care
64/ 100 5-point scale 3.2 / 5
1 2 3 4 5 6
1Trust17 / 25 · 3.4/5

Evidence shows: the skill explicitly requires Workers to use only the project API key and never hold the real OpenRouter key, clearly describes data flow (X-API-Key, pass-through of OpenRouter responses). Dependencies are common npm packages (axios, etc.), CI includes dependency audit. No malicious behavior or overreach detected. Deductions: unverified publisher identity; least-privilege incomplete (no explicit restriction to only endpoints; potential over-permission); no rollback mechanism or user confirmation steps. Hence 17.

2Reliability10 / 20 · 2.5/5

Evidence shows: comprehensive code examples (models, chat/completions, streaming) are self-consistent and runnable. Error handling pattern is detailed (extractPinmeOpenRouterError). Test suite covers CLI commands but not the skill's key LLM integration path. Deductions: static review without execution; tests do not cover OpenRouter API calls. Hence 10.

3Adaptability12 / 15 · 4.0/5

Evidence shows: clear scenario (PinMe Worker calling OpenRouter), environment variables documented, non-fit ranges not explicit but inferable (when not using Worker). Trigger description is precise. Deductions: non-fit scenarios not explicitly stated; mainland-China network reachability of pinme.cloud not addressed, warranting deduction. Hence 12.

4Convention13 / 15 · 4.3/5

Evidence shows: well-structured document with sections, error tables, code examples. README, MIT license, version in package.json (2.0.11), CI, tests present. Deductions: no changelog; no known-limitations section (only mentions 1MB request limit); maintenance responsibility unclear (author field 'Glitter Protocol' unverified). Hence 13.

5Effectiveness7 / 15 · 2.3/5

Evidence shows: clear goals, multiple examples, expected outputs (non-streaming JSON, streaming SSE). Static review cannot verify actual usefulness; marginal value high (avoids manual API lookups). Deductions: no verified outputs; cannot prove direct usability without execution. Hence 7.

6Verifiability5 / 10 · 2.5/5

Evidence shows: CI workflow, test suite (CLI tests), but no unit/integration tests for the skill's code. No third-party corroboration. Deductions: static review without execution; test coverage insufficient. Hence 5.

Evidence confidence:Low Reviewed Aug 07, 2026 Reviewed revision 7822b0501607
Before you use it
  • The skill depends on pinme.cloud, which may be blocked in mainland China; user should verify reachability before relying on it in production.
  • The skill uses the project API key but does not restrict Worker to only the documented endpoints; if Worker code is compromised, there is a risk of key leakage.
  • No rollback or recovery plan provided; failed OpenRouter calls may leave inconsistent state.
  • Publisher identity is unverified; conduct your own supply-chain audit before use.
Review evidence [1][2][3][4][5][6][7][8]
See the full review method →

What does this skill do, and when should you use it?

This skill provides a guide for invoking OpenRouter-proxied APIs within a PinMe Worker (TypeScript) project. It covers listing models, chat completions with SSE streaming, and web search via OpenRouter's openrouter:web_search server tool. Workers use automatically injected environment variables (API_KEY, PROJECT_NAME, BASE_URL) with no manual configuration. Complete TypeScript code examples, error handling patterns, and a frontend SSE consumer example are included to help developers integrate LLM features quickly.

This skill instructs how to implement in a PinMe Worker: 1) GET /api/v1/models to list available models; 2) POST /api/v1/chat/completions for non-streaming chat completions; 3) passthrough of streaming SSE responses; 4) web search by passing the openrouter:web_search tool in the tools array; 5) extraction of OpenRouter errors from PinMe's wrapped error format.

  1. Building a full-stack app with an LLM chat interface, such as an AI customer support bot, with the backend running on PinMe Worker
  2. Scenarios requiring streaming output, like a typewriter-effect chat UI
  3. Need for LLM to access up-to-date information, e.g., search-augmented answers or real-time summaries
  4. Developers who want to use various OpenRouter models without exposing the API key directly, relying on PinMe's platform for authentication

What are this skill's strengths and limitations?

Pros
  • Environment variables are auto-injected, avoiding manual API key or base URL setup
  • Supports SSE streaming and web search, feature-rich
  • Provides clear error code table and extraction function for easy debugging
  • Complete code examples ready to copy-paste
Limitations
  • Only works with PinMe Worker projects, requiring platform-specific project creation
  • Error messages depend on PinMe's wrapping format and may change with platform updates
  • No test or unit-test examples provided; you must write your own
  • Requires an existing PinMe project (create_worker); cannot be used standalone

How do you install this skill?

Run in Claude Code: npx skills add glitternetwork/pinme. The skill installs with the repository.

How do you use this skill?

In a Worker project, ensure the Env interface (with API_KEY, PROJECT_NAME, BASE_URL) exists as generated by create_worker. Follow the code examples in the skill to implement route handlers. For example, add a POST /api/chat route calling the callLLM function for non-streaming responses, or a POST /api/chat/stream route using handleChatStream for SSE passthrough. No manual environment configuration is needed; variables are injected automatically.

FAQ

Can I use this skill outside of a PinMe project?
No. The skill is specifically designed for PinMe Worker projects, relying on PinMe's environment variables and proxy API. For other platforms, you would need to call OpenRouter directly and manage the API key yourself.
Are there additional costs?
PinMe authenticates each project with an API_KEY, but LLM call fees are typically charged by OpenRouter, and the PinMe project account may need sufficient balance (otherwise a 403 error is returned). See the PinMe website for billing details.
How do I parse streaming responses on the frontend?
The skill provides a frontend SSE consumer example using fetch to read the stream, parsing lines prefixed with 'data: ' as JSON, and handling the '[DONE]' signal.
What if the request body exceeds 1MB?
PinMe returns a 413 error with a message like 'Request body too large (max 1MB)'. The skill advises keeping request bodies under 1MB.

More skills from this repository

All from glitternetwork/pinme

Related skills