prompt-caching-patterns
Pass
Audited by Gen Agent Trust Hub on Aug 31, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill contains architectural guidance and code snippets for implementing prompt caching. All identified external dependencies and service references (Anthropic, OpenAI, Redis) are well-known and trusted technology providers. The implementation logic follows industry standards for hashing and data storage.
- [INDIRECT_PROMPT_INJECTION]: The skill provides patterns for caching user prompts and LLM responses, which inherently involves processing untrusted data. While this creates a potential surface for indirect injection if cached content is not properly isolated or validated, the provided examples are educational in nature and follow standard software development practices.
- Ingestion points: User-supplied prompts are processed in functions such as queryWithCache, cachedQuery, semanticCache.get, and templateCache.get in SKILL.md.
- Boundary markers: The code templates do not demonstrate the use of explicit delimiters or boundary markers to separate instructions from data within the cached prompts.
- Capability inventory: The code includes capabilities for performing network requests to LLM APIs and communicating with external Redis storage for cache persistence.
- Sanitization: The provided examples focus on the caching mechanics and do not include specific input sanitization or output validation steps for the cached content.
Audit Metadata