optimize-context
Warn
Audited by Gen Agent Trust Hub on Aug 9, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill executes destructive
rm -rfcommands targeting contents within.claude/skills/,.claude/agents/,.claude/commands/, and.claude/hooks/. While intended to resolve duplication issues, these operations can lead to data loss if those directories are symlinked to critical sources or contain project-specific configurations. - [COMMAND_EXECUTION]: The skill runs a local Python script located at
plugins/dev-utils/scripts/optimize_context.py. Because the script's content is not part of the analyzed package, its full functionality and safety cannot be verified. - [PROMPT_INJECTION]: The skill reads and summarizes local instruction files like
CLAUDE.mdandGEMINI.md. This creates an indirect prompt injection surface where malicious instructions embedded in these files could potentially influence the agent's behavior or outcomes during the summarization and rewrite phase. - Ingestion points: Reads
CLAUDE.md,GEMINI.md, and.github/copilot-instructions.md. - Boundary markers: None explicitly defined for the ingestion of file content.
- Capability inventory: Uses
Bashfor file deletion andWritefor modifying instruction files. - Sanitization: Includes a human-in-the-loop step requiring confirmation before writing changes.
Audit Metadata