npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-code-langcache

v1.0.1

Published

Semantic caching skill for Claude Code using Redis LangCache

Readme

claude-code-langcache

Semantic caching skill for Claude Code using Redis LangCache.

Reduce LLM costs and latency by caching responses for semantically similar queries, with built-in privacy and security guardrails.

For OpenClaw users: See openclaw-langcache

Features

  • Semantic similarity matching - Cache hits for similar (not just identical) queries
  • Hard block enforcement - Automatically blocks caching of sensitive data:
    • Temporal info (today, tomorrow, deadlines, appointments)
    • Credentials (API keys, passwords, tokens, OTP)
    • Identifiers (emails, phone numbers, account IDs)
    • Personal context (relationships, private conversations)
  • Category-aware thresholds - Different similarity thresholds for factual Q&A vs style transforms
  • CLI and Python integration - Use from shell scripts or embed in Python agents

Installation

Via npm (Recommended)

npm install -g claude-code-langcache

The skill will be automatically installed to ~/.claude/skills/langcache/

Via Git

git clone https://github.com/manvinder01/claude-code-langcache.git /tmp/claude-code-langcache
cp -r /tmp/claude-code-langcache/skills/langcache ~/.claude/skills/

Configuration

Set your Redis LangCache credentials:

export LANGCACHE_HOST=your-instance.redis.cloud
export LANGCACHE_CACHE_ID=your-cache-id
export LANGCACHE_API_KEY=your-api-key

Get these from Redis Cloud Console after creating a LangCache instance.

Usage

Automatic (via Claude Code)

The skill triggers automatically when you mention:

  • "cache LLM responses"
  • "semantic caching"
  • "reduce API costs"
  • "configure LangCache"

Or invoke manually with /langcache

CLI

# Search for cached response
~/.claude/skills/langcache/scripts/langcache.sh search "What is Redis?"

# With similarity threshold
~/.claude/skills/langcache/scripts/langcache.sh search "What is Redis?" --threshold 0.9

# Store a response
~/.claude/skills/langcache/scripts/langcache.sh store "What is Redis?" "Redis is an in-memory data store..."

# Check if content would be blocked
~/.claude/skills/langcache/scripts/langcache.sh check "What's on my calendar today?"
# Output: BLOCKED: temporal_info

Caching Policy

Cacheable (white-list)

| Category | Examples | Threshold | |----------|----------|-----------| | Factual Q&A | "What is X?", "How does Y work?" | 0.90 | | Definitions / docs | API docs, command help | 0.90 | | Command explanations | "What does git rebase do?" | 0.92 | | Reply templates | "polite no", "follow-up", "intro" | 0.88 | | Style transforms | "make this warmer/shorter" | 0.85 |

Never Cached (hard blocks)

| Category | Examples | |----------|----------| | Temporal | today, tomorrow, deadline, ETA, "in 20 minutes" | | Credentials | API keys, passwords, tokens, OTP/2FA | | Identifiers | emails, phone numbers, account IDs, UUIDs | | Personal | "my wife said", private conversations, relationships |

File Structure

~/.claude/skills/langcache/
├── SKILL.md              # Skill definition and instructions
├── scripts/
│   └── langcache.sh      # CLI wrapper with policy enforcement
├── references/
│   ├── api-reference.md  # Complete REST API documentation
│   └── best-practices.md # Optimization techniques
└── examples/
    ├── basic-caching.sh      # Simple cache workflow
    └── agent-integration.py  # Python integration pattern

Requirements

  • Claude Code
  • Redis Cloud account with LangCache enabled
  • Node.js 18+ (for npm installation)
  • jq and curl (for CLI usage)

Related Packages

License

MIT License - see LICENSE for details.

Resources