read-claude-code-history
Warn
Audited by Gen Agent Trust Hub on Nov 27, 2026
Risk Level: MEDIUMEXTERNAL_DOWNLOADSDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [EXTERNAL_DOWNLOADS]: The skill downloads external binary components during its setup process.
scripts/history_index.pyfetches thelibsimpleSQLite extension from a third-party GitHub repository (github.com/wangfenjin/simple) to enable Chinese FTS5 tokenizer support.- Although the setup process verifies the file integrity against pinned SHA-256 hashes, the download originates from an individual developer's repository rather than a recognized trusted vendor or well-known service.
- [DYNAMIC_EXECUTION]: The skill loads and executes external binary code at runtime.
- The
history_index.pyscript usesconnection.load_extension()to dynamically load the previously downloadedlibsimplebinary into the SQLite process. - It also provides functionality to download and run embedding models (e.g., Qwen3-Embedding) through the
mlx-embeddingslibrary. - [INDIRECT_PROMPT_INJECTION]: The skill possesses an attack surface for indirect prompt injection by design, as it ingest and processes historical conversation data.
- Ingestion points: Historical session files (
.jsonl,.sqlite,.db) are read from multiple directories including~/.claude/projects/,~/.codex/,~/.kimi-code/, and~/.gemini/antigravity-clivia scripts likescripts/read_claude_session.pyandscripts/read_antigravity_session.py. - Boundary markers: The scripts use structured JSON parsing and metadata fields (like
isMeta,isCompactSummary, orisSidechain) to identify record roles, but these do not prevent the agent from following instructions embedded within the content of those records. - Capability inventory: The skill can execute local system commands (e.g.,
git,sysctl) and perform file recovery operations that involve writing to the local filesystem. - Sanitization: Prose content from the history is extracted and presented to the agent with minimal sanitization, relying on model-level guardrails to avoid executing instructions found in the history.
- [COMMAND_EXECUTION]: The skill executes local system utilities to retrieve environment context and state.
scripts/read_claude_session.pyrunsgit branch,git status, andgit logto provide a briefing on the current workspace state.scripts/history_index.pyexecutessysctlon macOS to monitor host memory pressure during embedding tasks.- These commands are used as intended for the skill's primary purpose but represent exposure of the host environment.
Audit Metadata