llm-cost-optimization

Pass

Audited by Gen Agent Trust Hub on Nov 25, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted text data for prompt compression and semantic caching, creating an attack surface for indirect instructions.
  • Ingestion points: The long_context variable used in the llmlingua compression block and the prompt argument in the cached_llm_call function.
  • Boundary markers: Absent; the provided code snippets do not implement delimiters or instructions for the agent to ignore embedded commands within the processed data.
  • Capability inventory: The skill performs network requests to LLM provider APIs (OpenAI, Anthropic, LiteLLM), reads local files (large-context.txt, batch.jsonl), and interacts with a local Redis instance (redis.Redis).
  • Sanitization: Absent; the code does not demonstrate filtering or sanitization of the input text before it is used for embedding generation or compression.
  • [COMMAND_EXECUTION]: The skill uses Python scripts to perform local operations necessary for its stated purpose of cost management.
  • It accesses the local file system to read context files and write batch request files for LLM processing.
  • It establishes connections to a local Redis service for data persistence and semantic cache retrieval.
  • [EXTERNAL_DOWNLOADS]: The skill utilizes several well-known Python packages for AI integration and data processing.
  • Dependencies include litellm, openai, anthropic, redis, numpy, sentence-transformers, llmlingua, and prometheus_client. These are standard packages sourced from the public Python Package Index (PyPI).
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 25, 2026, 06:59 AM