optimize-cpp-code

Pass

Audited by Gen Agent Trust Hub on Sep 26, 2026

Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill utilizes a verify.sh script to execute standard development tools including the local C++ compiler (c++), text processing utilities (awk, grep), and performance tools like hyperfine and xctrace. These commands are used locally to build, analyze, and measure the performance of the code under optimization.
  • [DYNAMIC_EXECUTION]: The skill facilitates the runtime compilation and execution of C++ source files using the local toolchain. This is a core feature designed to verify the functional correctness and performance improvements of optimized code against baseline implementations.
  • [INDIRECT_PROMPT_INJECTION]: The skill manages an attack surface by ingesting and processing user-provided C++ source code, benchmark outputs, and profiler results.
  • Ingestion points: Processes C++ source (.cpp, .hpp), shell scripts (.sh), and profile data (e.g., XML from xctrace).
  • Capability inventory: The agent performs shell command execution and invokes the compiler to evaluate optimization candidates.
  • Boundary markers: The workflow mandates verification against an equivalence oracle and encourages the use of memory sanitizers (AddressSanitizer and UndefinedBehaviorSanitizer) to catch lifetime and safety issues.
  • Sanitization: The skill relies on standard compiler diagnostics, sanitizer reports, and explicit developer review steps defined in the optimization workflow to ensure code safety.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 26, 2026, 10:35 AM