runtime-cache

runtime-cache is a skill for Claude Code from build-with-dhiraj/ai-workflow-framework-portability-kit. It costs 43 tokens per session (2,307 once invoked), scanned A, original, MIT.

A temporary, per-region key-value cache for Vercel Functions, request middleware, and builds. It stores data for later requests and supports expiration times and tags for removing related entries.

In plain words
What is it for?
Use it to cache function results, user or API data, and build-related values with time limits or tag-based invalidation.
Why use it?
It avoids repeatedly computing or fetching the same data, while allowing groups of cached entries to be invalidated together. Because it is regional and temporary, it is not a general-purpose database.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the vercel-plugin plugin — 47 skills, 6 commands, 3 agents, 1 MCP server shipped together

Good fit Use it to cache function results, user or API data, and build-related values with time limits or tag-based invalidation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add build-with-dhiraj/ai-workflow-framework-portability-kit --skill runtime-cache
Clone the repo
git clone --depth 1 https://github.com/build-with-dhiraj/ai-workflow-framework-portability-kit

Made for: Claude Code.

Or install vercel-plugin, the plugin that ships this one along with the rest of its 47 skills, 6 commands, 3 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for runtime-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache/github.svg)](https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache)
Your own site
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for runtime-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/runtime-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,307 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02307
Opus 5.5 $0.00017 $0.00923
Sonnet 5.5 $0.00009 $0.00461
Haiku 4.5 $0.00004 $0.00231

Measured 1mo ago against content hash 22fb4be9b3b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

runtime-cache scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request: Request) {
Plugins/vercel-marketplace-source/skills/runtime-cache/SKILL.md · 283 lines

How it starts

The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vercel Runtime Cache API

You are an expert in the Vercel Runtime Cache — an ephemeral caching layer for serverless compute.

What It Is

The Runtime Cache is a per-region key-value store accessible from Vercel Functions, Routing Middleware, and Builds. It supports tag-based invalidation for granular cache control.

  • Regional: Each Vercel region has its own isolated cache
  • Isolated: Scoped per project AND per deployment environment (preview vs production)
  • Persistent across deployments: Cached data survives new deploys; invalidation via TTL or expireTag
  • Ephemeral: Fixed storage limit per project; LRU eviction when full
  • Framework-agnostic: Works with any framework via @vercel/functions

Key APIs

All APIs from @vercel/functions:

Basic Cache Operations

import { getCache } from '@vercel/functions';

const cache = getCache();

// Store data with TTL and tags
await cache.set('user:123', userData, {
  ttl: 3600,                      // seconds
  tags: ['users', 'user:123'],    // for bulk invalidation
  name: 'user-profile',           // human-readable label for observability
});

// Retrieve cached data (returns value or undefined)
const data = await cache.get('user:123');

// Delete a specific key
await cache.delete('user:123');

// Expire all entries with a tag (propagates globally within 300ms)
await cache.expireTag('users');
await cache.expireTag(['users', 'user:123']); // multiple tags

Cache Options

const cache = getCache({
  namespace: 'api',                    // prefix for keys
  namespaceSeparator: ':',             // separator (default)
  keyHashFunction: (key) => sha256(key), // custom key hashing
});

Full Example (Framework-Agnostic)

import { getCache } from '@vercel/functions';

export default {
  async fetch(request: Request) {
    const cache = getCache();
    const cached = await cache.get('blog-posts');

    if (cached) {
      return Response.json(cached);
    }

    const posts = await fetch('https://api.example.com/posts').then(r => r.json());

    await cache.set('blog-posts', posts, {
      ttl: 3600,
      tags: ['blog'],
    });

    return Response.json(posts);
  },
};

Read the full file on GitHub · 283 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 283 lines · 43 tokens per session scan A 22fb4be9b3b2

Subscribe to this mod's changes

runtime-cache is a skill published in the GitHub repository build-with-dhiraj/ai-workflow-framework-portability-kit (5 stars, last pushed 20d ago), licensed MIT. It adds 43 tokens to every session and 2,307 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.

Related

Other skills, from other repositories

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

tanstack-ai-memory-redis

Use when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking limits, and troubleshooting.

TanStack/ai · 52 tokens

redis-best-practices

Redis development best practices for caching, data structures, and high-performance key-value operations.

Mindrally/skills · 22 tokens

spring-session

Spring Session for distributed session management with Redis, JDBC, or Hazelcast. Covers session configuration, security integration, and session events. USE WHEN: user mentions "spring session", "distributed session", "session Redis", "session JDBC", "session cluster", "session management", "@SessionScope" DO NOT USE…

claude-dev-suite/claude-dev-suite · 90 tokens

continuum-memory

Configure and use Continuum's two-tier memory system — mem0+Qdrant/Milvus for long-term facts, Redis for short-term sessions, with multi-tenant scopes (USER / AGENT / SHARED / RUN / CONVERSATION). Invoke when the user asks about "remember", "user preferences", "long-term memory", "vector search over memories"…

shyftlabs/continuum · 107 tokens

spring-cache

Spring Cache abstraction for Spring Boot 3.x. Covers @Cacheable, @CacheEvict, @CachePut, cache managers (Caffeine, Redis, EhCache), TTL configuration, cache keys, conditional caching, and cache synchronization. USE WHEN: user mentions "spring cache", "@Cacheable", "@CacheEvict", "cache manager", "Caffeine cache"…

claude-dev-suite/claude-dev-suite · 114 tokens