Toolverse
All skills

openrouter-caching-strategy

by jeremylongshore

Implement response caching for OpenRouter efficiency. Use when optimizing costs or reducing latency for repeated queries. Trigger with phrases like 'openrouter cache', 'cache llm responses', 'openrouter redis', 'semantic caching'.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Security

About this skill

Implement response caching for OpenRouter efficiency. Use when optimizing costs or reducing latency for repeated queries. Trigger with phrases like 'openrouter cache', 'cache llm responses', 'openrouter redis', 'semantic caching'.

How to use

  1. Zainstaluj skill w swoim projekcie Claude Code lub Codex, upewniając się, że masz dostęp do narzędzi Read, Write, Edit, Bash i Grep.

  2. Skonfiguruj zmienną środowiskową OPENROUTER_API_KEY z Twoim kluczem API OpenRouter oraz ustaw nagłówki HTTP (HTTP-Referer i X-Title) wskazujące na Twoją aplikację.

  3. Zainicjalizuj klasę LLMCache z wybranym czasem wygaśnięcia (TTL) — domyślnie 3600 sekund. Klasa automatycznie zarządza pamięcią podręczną i śledzi liczbę trafień i chybień.

  4. Przed wysłaniem żądania do OpenRouter sprawdź cache za pomocą metody get(), przekazując model, listę wiadomości i dodatkowe parametry (np. temperature). Jeśli odpowiedź znajduje się w cache i nie wygasła, zostanie zwrócona natychmiast.

  5. Jeśli żądanie nie znajduje się w cache, wyślij je do OpenRouter normalnie, a następnie zapisz wynik w cache za pomocą metody set() — zapewnia to, że kolejne identyczne zapytania będą obsługiwane z cache'u.

  6. Monitoruj wydajność cache'u, sprawdzając właściwości hits i misses klasy LLMCache — wysoki stosunek trafień wskazuje na efektywne zmniejszenie kosztów API.

Related skills

academic-researcher

by Shubhamsaboo

Academic research assistant for literature reviews, paper analysis, and scholarly writing.\nUse when: reviewing academic papers, conducting literature reviews, writing research summaries,\nanalyzing methodologies, formatting citations, or when user mentions academic research,

Security
1260

brand-voice

by anthropics

Apply and enforce brand voice, style guide, and messaging pillars across content. Use when reviewing content for brand consistency, documenting a brand voice, adapting tone for different audiences, or checking terminology and style guide compliance.

Security
48158

1password

by openclaw

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

Security
1174

typescript-review

by metabase

Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.

Security
17133

senior-security

by davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture,

Security
2482

zendesk

by vm0-ai

Zendesk Support REST API for managing tickets, users, organizations, and support operations. Use this skill to create tickets, manage users, search, and automate customer support workflows.

Security
11100