Skip to content
Back to skills

Prompt Cache

ASecurity

Drive PWN::AI::Agent::PromptCache from pwn_eval.

  • 86 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 10, 2026
securityrubyshell

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add 0dayInc/pwn --skill prompt_cache --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prompt Cache?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompt Cache
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0dayinc-prompt-cache/badge)](https://www.skillsdirectory.com/skills/0dayinc-prompt-cache)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pwn-ai-agent-promptcache
description: Drive PWN::AI::Agent::PromptCache from pwn_eval.
license: MIT
allowed-tools: [pwn, pwn_eval]
metadata:
  bundled: true
  generated: true
  module: PWN::AI::Agent::PromptCache
  source: pwn/ai/agent/prompt_cache.rb
---

# PWN::AI::Agent::PromptCache

agent-style prompt-cache breakpoints. The static system prefix + SKILLS index stay cacheable; dynamic MEMORY / LEARNING / MISTAKES / METRICS / EXTROSPECTION stay uncached so a turn-local write is not baked into the prefix. Anthropic: system is an array of text blocks; the last static block carries cache_control: { type: 'ephemeral' }. OpenAI Chat Completions: two system/developer messages (static then dynamic) plus prompt_cache_key for cache routing. xAI Grok Chat Completions: the same message split plus the x-grok-conv-id request header (sticky server routing). Gemini generateContent: systemInstruction.parts = [static, dynamic] so implicit prefix cache can hit the stable head. Ollama: no-op.

## When to use

Call `PWN::AI::Agent::PromptCache` from `pwn_eval` when the task needs this module.
Do not reimplement it in shell.

## Methodologies

Generated from `pwn/ai/agent/prompt_cache.rb`. Prefer the public class methods below.
Class methods take `(opts = {})` and read `opts`.

## How to call

```ruby
PWN::AI::Agent::PromptCache.help
PWN::AI::Agent::PromptCache.enabled(opts)
```

## Public methods

- `enabled`
- `split_system`
- `anthropic_system_blocks`
- `openai_messages`
- `gemini_system_instruction`
- `cache_key`
- `cache_marks`
- `supports`
- `authors`
- `help`
- `enabled?`

## Source

`pwn/ai/agent/prompt_cache.rb`

## Verification

`PWN::AI::Agent::PromptCache.respond_to?(:enabled)` after the
module is loaded. Read the source for parameter names.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…