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.jsonl and imported instinct files.
  • Boundary markers: Uses YAML frontmatter (---) and Markdown headers to structure learned behaviors.
  • Capability inventory: The sub-agent has Write access to create or modify files in the instincts/personal directory.
  • 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.py uses subprocess.run to invoke git for project detection and python3 for internal logic.
  • agents/observer-loop.sh spawns background claude sessions 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.py script 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 -c within shell scripts (hooks/observe.sh, scripts/detect-project.sh) to perform complex JSON parsing and logic processing on-the-fly.
  • [PERSISTENCE]: The skill uses PreToolUse and PostToolUse hooks to ensure observation logic runs deterministically in every Claude Code session. It also manages a background observer process using nohup (File: agents/start-observer.sh), which persists across terminal sessions.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 5, 2026, 01:15 AM