Agent skill

Pinme LLM

by glitternetwork in glitternetwork/pinme

A skill your agent uses when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search.

MITAuto-check passedAI & LLM Engineering

Install Pinme LLM

skills CLI
$ npx skills add glitternetwork/pinme --skill pinme-llm -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glitternetwork/pinme pinme-llm --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glitternetwork/pinme.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pinme-llm .claude/skills/pinme-llm && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pinme-llm
GitHub stars
3.7k
Token cost
~2.8k tokens
SKILL.md length
412 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search.

  • A PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs
  • SKILL.md covers Environment Variables, Models API, Chat Completions API and Error Handling Pattern
  • Reaches pinme.cloud; needs API_KEY
  • Including models

What it does

Pinme LLM is an agent skill from glitternetwork/pinme. Use this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search. Guides AI to generate correct Worker TS code.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM API integration, Model routing and gateways and Web search. It works with OpenRouter and TypeScript. The repository describes itself as: Deploy Your Frontend in a Single Command. Claude Code Skills supported. The licence is MIT.

When your agent uses it

  • A PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs
  • Including models
  • Chat/completions
  • OpenRouter web search

Example prompts

  • “/pinme-llm”

Requirements

  • A credential in API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 7822b05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • pinme.cloud

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pinme LLM loads about 2.8k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from glitternetwork/pinme at commit 7822b05, republished under its MIT licence (© glitternetwork). 412 words, ~2,815 tokens.

Download SKILL.mdSave it as .claude/skills/pinme-llm/SKILL.md (or your agent's skills folder).
name
pinme-llm
description
Use this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search. Guides AI to generate correct Worker TS code.

PinMe Worker OpenRouter API Integration

Guides how to call PinMe platform's OpenRouter proxy APIs in a PinMe Worker (TypeScript). Workers use the PinMe project API key; they never hold the real OpenRouter API key.

Environment Variables

The following environment variables are automatically injected when the Worker is created — no manual configuration needed:

typescript
// backend/src/worker.ts
export interface Env {
  DB: D1Database;
  API_KEY: string;       // Project API Key from create_worker
  PROJECT_NAME: string;  // Actual project_name from create_worker; must match API_KEY
  BASE_URL?: string;     // Optional override for PinMe API base URL, defaults to https://pinme.cloud
}

API_KEY authenticates the Worker to PinMe. PROJECT_NAME is required for chat/completions and must belong to the same project as API_KEY. When BASE_URL is not set, use https://pinme.cloud.


Models API

Endpoint: GET {BASE_URL}/api/v1/models Authentication: X-API-Key header (using env.API_KEY) Request Body: none

Use this when the Worker needs to list available OpenRouter models. The response body, status, and headers are passed through from OpenRouter /models.

typescript
async function listModels(env: Env): Promise<unknown> {
  const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';
  const resp = await fetch(`${baseUrl}/api/v1/models`, {
    headers: { 'X-API-Key': env.API_KEY },
  });

  if (!resp.ok) {
    throw new Error(await extractPinmeOpenRouterError(resp));
  }

  return await resp.json();
}

Chat Completions API

Endpoint: POST {BASE_URL}/api/v1/chat/completions?project_name={project_name} Authentication: X-API-Key header (using env.API_KEY) Request Body: OpenRouter chat/completions format, passed through as-is after a 1MB size check Streaming: Supports SSE (stream: true) Web Search: Supports OpenRouter openrouter:web_search server tool via the tools array

Request Format
json
{
  "model": "openai/gpt-4o-mini",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "Hello!" }
  ],
  "stream": true
}

Use env.PROJECT_NAME from create_worker; always URL-encode it in the query string. For available models, call GET /api/v1/models or refer to OpenRouter model IDs.

PinMe does not provide a raw search endpoint. To search the web, pass OpenRouter's openrouter:web_search server tool to chat/completions; the model decides whether and when to search.

Always set max_results and max_total_results to keep search volume and cost bounded.

typescript
async function searchWithLLM(env: Env, query: string): Promise<string> {
  const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';
  const resp = await fetch(
    `${baseUrl}/api/v1/chat/completions?project_name=${encodeURIComponent(env.PROJECT_NAME)}`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': env.API_KEY,
      },
      body: JSON.stringify({
        model: 'openai/gpt-5.2',
        messages: [{ role: 'user', content: query }],
        tools: [
          {
            type: 'openrouter:web_search',
            parameters: {
              engine: 'auto',
              max_results: 5,
              max_total_results: 10,
            },
          },
        ],
      }),
    },
  );

  if (!resp.ok) {
    throw new Error(await extractPinmeOpenRouterError(resp));
  }

  const data = await resp.json() as { choices: Array<{ message?: { content?: string } }> };
  return data.choices[0]?.message?.content ?? '';
}
Show full SKILL.md (190 more words)Show less
Response Format

Successful requests return OpenRouter's raw response body.

Non-streaming Success (200):

json
{
  "id": "chatcmpl-...",
  "choices": [{ "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" }],
  "usage": { "prompt_tokens": 10, "completion_tokens": 5, "total_tokens": 15 }
}

Streaming Success (200): SSE format

data: {"choices":[{"delta":{"content":"Hello"}}]}
data: {"choices":[{"delta":{"content":" there"}}]}
data: [DONE]

Errors:

HTTP StatusMeaningdata.error Example
401API Key missing, invalid, or mismatched with project_name"X-API-Key header is required" / "Invalid API key" / "Invalid API key or project name"
400project_name missing or OpenRouter key not configured"project_name is required" / "LLM service not configured for this project"
403LLM balance insufficient or disabled"Insufficient balance, please recharge to continue using LLM service"
413Request body exceeds 1MB"Request body too large (max 1MB)"
500Proxy failed before upstream request"Failed to build request"
502LLM service unavailable"LLM service unavailable"

If OpenRouter receives the request and returns a 4xx/5xx, PinMe passes through OpenRouter's status, headers, and response body instead of wrapping it.

Worker Example Code — Non-streaming
typescript
async function callLLM(
  env: Env,
  messages: Array<{ role: string; content: string }>,
  model = 'openai/gpt-4o-mini',
): Promise<{ content: string; error?: string }> {
  const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';
  const resp = await fetch(
    `${baseUrl}/api/v1/chat/completions?project_name=${encodeURIComponent(env.PROJECT_NAME)}`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': env.API_KEY,
      },
      body: JSON.stringify({ model, messages }),
    },
  );

  if (!resp.ok) {
    return { content: '', error: await extractPinmeOpenRouterError(resp) };
  }

  const data = await resp.json() as { choices: Array<{ message: { content: string } }> };
  return { content: data.choices[0]?.message?.content || '' };
}

// Usage in routes
async function handleChat(request: Request, env: Env): Promise<Response> {
  const { question } = await request.json() as { question: string };

  const result = await callLLM(env, [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: question },
  ]);

  if (result.error) {
    return json({ error: result.error }, 502);
  }
  return json({ answer: result.content });
}
Worker Example Code — Streaming (SSE Passthrough)
typescript
async function handleChatStream(request: Request, env: Env): Promise<Response> {
  const body = await request.text();
  const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';

  // Ensure stream=true in the request
  let parsed = JSON.parse(body);
  parsed.stream = true;

  const resp = await fetch(
    `${baseUrl}/api/v1/chat/completions?project_name=${encodeURIComponent(env.PROJECT_NAME)}`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': env.API_KEY,
      },
      body: JSON.stringify(parsed),
    },
  );

  if (!resp.ok) {
    return json({ error: await extractPinmeOpenRouterError(resp) }, resp.status);
  }

  // Pass through SSE stream directly
  return new Response(resp.body, {
    status: 200,
    headers: {
      'Content-Type': 'text/event-stream',
      'Cache-Control': 'no-cache',
      'Connection': 'keep-alive',
      ...CORS_HEADERS,
    },
  });
}
Frontend SSE Stream Consumer Example
typescript
async function streamChat(question: string, onChunk: (text: string) => void): Promise<void> {
  const resp = await fetch(getApiUrl('/api/chat/stream'), {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ question }),
  });

  const reader = resp.body!.getReader();
  const decoder = new TextDecoder();
  let buffer = '';

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    buffer += decoder.decode(value, { stream: true });
    const lines = buffer.split('\n');
    buffer = lines.pop()!; // Keep incomplete line

    for (const line of lines) {
      if (!line.startsWith('data: ')) continue;
      const payload = line.slice(6);
      if (payload === '[DONE]') return;

      const chunk = JSON.parse(payload) as { choices: Array<{ delta: { content?: string } }> };
      const content = chunk.choices[0]?.delta?.content;
      if (content) onChunk(content);
    }
  }
}

Error Handling Pattern

For /api/v1/models and /api/v1/chat/completions, successful responses are raw OpenRouter responses. Proxy failures before the OpenRouter request use PinMe's wrapped error format:

typescript
interface PinmeResponse<T = unknown> {
  code: number;   // 200=success, other=failure
  msg: string;    // "ok" | "error" | "invalid params"
  data?: T;       // Business data on success, may contain { error: string } on failure
}
typescript
async function extractPinmeOpenRouterError(resp: Response): Promise<string> {
  const fallback = `HTTP ${resp.status}`;
  try {
    const body = await resp.clone().json() as PinmeResponse | { error?: { message?: string } } | { error?: string };
    if ('data' in body && body.data && typeof body.data === 'object' && 'error' in body.data) {
      return String((body.data as { error: unknown }).error);
    }
    if ('msg' in body && typeof body.msg === 'string' && body.msg) {
      return body.msg;
    }
    if ('error' in body) {
      const error = body.error;
      if (typeof error === 'string') return error;
      if (error && typeof error === 'object' && 'message' in error) {
        return String((error as { message: unknown }).message);
      }
    }
  } catch {
    try {
      const text = await resp.text();
      if (text) return text;
    } catch {
      // Ignore and return fallback below.
    }
  }
  return fallback;
}
Optional JSON Helper

Use this helper for non-streaming POST calls. It returns the raw OpenRouter JSON on success.

typescript
async function callOpenRouterJSON<T>(url: string, apiKey: string, body: unknown): Promise<{ data?: T; error?: string }> {
  let resp: Response;
  try {
    resp = await fetch(url, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey },
      body: JSON.stringify(body),
    });
  } catch {
    return { error: 'Network error' };
  }

  if (!resp.ok) {
    return { error: await extractPinmeOpenRouterError(resp) };
  }

  return { data: await resp.json() as T };
}
Usage Example
typescript
const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';

// Call LLM (non-streaming)
const llmResult = await callOpenRouterJSON<{ choices: Array<{ message: { content: string } }> }>(
  `${baseUrl}/api/v1/chat/completions?project_name=${encodeURIComponent(env.PROJECT_NAME)}`, env.API_KEY,
  { model: 'openai/gpt-4o-mini', messages: [{ role: 'user', content: 'Hi' }] },
);
if (llmResult.error) return json({ error: llmResult.error }, 502);

© glitternetwork, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pinme-llm of glitternetwork/pinme.

Open the folder on GitHubat commit 7822b05

Compare with similar skills

Pinme LLM next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pinme LLM compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pinme LLM this skillglitternetwork/pinme3.7k—~2.8kAutomated safety check: PassMIT
Openrouter Streaming Setupjeremylongshore/tons-of-skills-marketplace2.8k—~2.6kAutomated safety check: PassMIT
Using Ccproxy Inspectorstarbaser/ccproxy350—~2.7kAutomated safety check: PassCustom licence
Hyper Jevdisler/ten-levels-of-jev213—~1.7kAutomated safety check: PassMIT
Using Ccproxy APIstarbaser/ccproxy350—~4kAutomated safety check: PassCustom licence
OpenCode Agent Provider for NanoClawnanocoai/nanoclaw31k—~5kAutomated safety check: NotesMIT

Similar skills

  • Openrouter Streaming Setup

    jeremylongshore/tons-of-skills-marketplace

    Implement streaming responses with OpenRouter for real-time UIs.

    2.8k GitHub stars~2.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy Inspector

    starbaser/ccproxy

    Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic.

    350 GitHub stars~2.7k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Hyper Jev

    disler/ten-levels-of-jev

    Integrate and use Jev, TypeSafe AI's System One decision model, in production codebases.

    213 GitHub stars~1.7k tokensUpdated 12 days ago
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy API

    starbaser/ccproxy

    Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.

    350 GitHub stars~4k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Installs OpenCode as an optional NanoClaw agent runtime, reaching OpenRouter, OpenAI, Google, DeepSeek and others through OpenCode's own configuration.

    31k GitHub stars~5k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check: notes
  • Openrouter Hello World

    jeremylongshore/tons-of-skills-marketplace

    Send your first OpenRouter API request and understand the response.

    2.8k GitHub stars~1.8k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from glitternetwork/pinme

  • Pinme

    glitternetwork/pinme

    A skill your agent uses when the user mentions "pinme", or needs to upload files, store to IPFS, create/publish/deploy websites or full-stack services (including frontend pages, backend APIs…

    3.7k GitHub stars~3.8k tokensUpdated 27 days ago
    Auto-check: notes
  • Pinme Auth

    glitternetwork/pinme

    A skill your agent uses when a PinMe project (Worker TypeScript) needs to integrate user authentication — creating email/password users, verifying idtokens, querying user info, or listing users via…

    3.7k GitHub stars~2.6k tokensUpdated 27 days ago
    Auto-check passed
  • Pinme Email

    glitternetwork/pinme

    A skill your agent uses when a PinMe project (Worker TypeScript) needs to integrate email sending (sendemail).

    3.7k GitHub stars~1.2k tokensUpdated 27 days ago
    Auto-check passed
  • Pinme R2

    glitternetwork/pinme

    A skill your agent uses when a PinMe Cloudflare Worker needs R2 object storage, including secure file or image upload, streaming download, metadata lookup, deletion, listing, Range requests, or…

    3.7k GitHub stars~3.6k tokensUpdated 27 days ago
    Auto-check passed
  • Pinme Share

    glitternetwork/pinme

    A skill your agent uses when the user wants to share, publish, or upload a static result through PinMe, especially by generating a static HTML share page for a PinMe project link, deployed…

    3.7k GitHub stars~1.2k tokensUpdated 27 days ago
    Auto-check: notes
  • Pinme Uniwebpay

    glitternetwork/pinme

    A skill your agent uses when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout…

    3.7k GitHub stars~7.3k tokensUpdated 27 days ago
    Auto-check passed

Questions about Pinme LLM

What does Pinme LLM do?

A skill your agent uses when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search. Pinme LLM is an agent skill from glitternetwork/pinme. Use this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search.

When should I use Pinme LLM?

Pinme LLM fits situations like: A PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs; including models; chat/completions; openRouter web search.

How do I install Pinme LLM in Claude Code?

Run `npx skills add glitternetwork/pinme --skill pinme-llm -a claude-code`. Or copy the skill folder (skills/pinme-llm in glitternetwork/pinme) into .claude/skills/pinme-llm in your project. Claude Code loads it when a task matches its description.

How do I install Pinme LLM in Codex?

Run `npx skills add glitternetwork/pinme --skill pinme-llm -a codex`. Or copy the skill folder (skills/pinme-llm in glitternetwork/pinme) into .agents/skills/pinme-llm in your project. Codex loads it when a task matches its description.

Can I use Pinme LLM in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glitternetwork/pinme --skill pinme-llm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pinme-llm, .gemini/skills/pinme-llm, .github/skills/pinme-llm and .opencode/skills/pinme-llm in your project.

What does Pinme LLM need to run?

Going by SKILL.md and its folder, Pinme LLM needs credentials named API_KEY. Our summary lists: A credential in API_KEY.

Does Pinme LLM access the network?

SKILL.md names 1 domain. In commands or code: pinme.cloud; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Pinme LLM safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pinme LLM use?

Pinme LLM is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pinme LLM use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pinme LLM?

Skills that share tags, products or a category with Pinme LLM: Openrouter Streaming Setup (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Using Ccproxy Inspector (starbaser/ccproxy, 350 stars), Hyper Jev (disler/ten-levels-of-jev, 213 stars) and Using Ccproxy API (starbaser/ccproxy, 350 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pinme LLM?

glitternetwork (a GitHub organization) maintains it in glitternetwork/pinme, which has 3,748 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 12, 2026.

Source: glitternetwork/pinme on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.