anthropic-streaming-patterns

Pass

Audited by Gen Agent Trust Hub on Nov 12, 2026

Risk Level: SAFE
Full Analysis
  • [SAFE]: The skill contains standard TypeScript code snippets and documentation for the Anthropic SDK (version 0.30.1+), focusing on event-driven streaming and cost tracking.
  • [SAFE]: No malicious obfuscation, credential exfiltration, or unauthorized command execution patterns were found. The code uses standard library methods like messages.stream() and event listeners.
  • [INDIRECT_PROMPT_INJECTION]: The provided code pattern for tool execution involves parsing JSON accumulated from streaming deltas. While this is the standard implementation for tool-use agents using the Anthropic SDK, it represents an inherent architectural attack surface where malicious LLM output could attempt to manipulate tool inputs.
  • Ingestion points: LLM output chunks received via stream.on('contentBlockDelta') in SKILL.md.
  • Boundary markers: Not present in the code snippets, as these are handled at the prompt level.
  • Capability inventory: The snippet invokes executeTool(currentToolUse.name, input), which represents the capability to execute backend tools based on LLM output.
  • Sanitization: The code uses JSON.parse(accumulatedInput), providing basic structural validation but no semantic validation of the tool parameters.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 12, 2026, 07:56 PM