continuous-learning-v2
Pass
Audited by Gen Agent Trust Hub on Oct 5, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSDYNAMIC_EXECUTIONPERSISTENCE
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill implements a "Continuous Learning" loop where tool inputs and outputs are recorded into
observations.jsonl(File:hooks/observe.sh). A background agent later analyzes these logs to generate new behavioral instructions ("instincts") in Markdown/YAML format (File:agents/observer-loop.sh). Since tool outputs can contain data from untrusted sources (e.g., web content, malicious repositories), this creates a surface for indirect prompt injection. - Ingestion points:
observations.jsonland imported instinct files. - Boundary markers: Uses YAML frontmatter (
---) and Markdown headers to structure learned behaviors. - Capability inventory: The sub-agent has
Writeaccess to create or modify files in theinstincts/personaldirectory. - Sanitization: Employs a regex-based secret scrubber (
_SECRET_RE) in the observation hook to redact API keys and tokens before logging. - [COMMAND_EXECUTION]: The skill makes extensive use of system commands and sub-processes to manage its lifecycle.
scripts/instinct-cli.pyusessubprocess.runto invokegitfor project detection andpython3for internal logic.agents/observer-loop.shspawns backgroundclaudesessions for autonomous analysis.- The observer prompt explicitly instructs the AI to "use the Write tool directly" and "Do NOT ask for permission," which facilitates automated background behavior but reduces manual oversight of file system changes.
- [EXTERNAL_DOWNLOADS]: The
instinct-cli.pyscript includes a command to import instincts from remote URLs (cmd_import). - The skill implements significant validation (
_validate_import_url), ensuring connections use HTTPS and blocking resolution to private, loopback, or reserved IP addresses. - [DYNAMIC_EXECUTION]: The system uses
python3 -cwithin shell scripts (hooks/observe.sh,scripts/detect-project.sh) to perform complex JSON parsing and logic processing on-the-fly. - [PERSISTENCE]: The skill uses
PreToolUseandPostToolUsehooks to ensure observation logic runs deterministically in every Claude Code session. It also manages a background observer process usingnohup(File:agents/start-observer.sh), which persists across terminal sessions.
Audit Metadata