agent-history-hygiene
Pass
Audited by Gen Agent Trust Hub on Oct 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONPERSISTENCEINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill extensively uses shell commands to interact with Git, SpecStory, Gitleaks, and system utilities like lsof.
- Scripts such as
_post_session.py,stage-agent-artifacts.sh, andscan-staged.shexecutegitcommands for repository discovery, staging, and commit validation. run-specstory-session.shexecutes thespecstoryCLI to manage agent sessions.- [PERSISTENCE]: The
bootstrap-project.shscript installs Git hooks (specificallypre-commitand optionallyprepare-commit-msg) into the local repository. - This is a core part of the skill's functionality to ensure that history hygiene checks are enforced during the commit workflow.
- [INDIRECT_PROMPT_INJECTION]: The skill parses untrusted data from agent transcripts (
.specstory/history/*.md) to derive commit metadata. - Ingestion points:
scripts/agent-commit-metadata.shandscripts/find-session.shread transcript files. - Boundary markers: Present (scripts look for specific SpecStory header markers, e.g.,
<!-- Claude Code Session ... -->). - Capability inventory: All subprocess calls (git), file-write, and network operations across scripts are performed for maintenance and verification purposes.
- Sanitization: Strict regex matching and path validation are performed on all extracted fields to prevent injection into commit trailers.
- [EXTERNAL_DOWNLOADS]:
bootstrap-project.shand the pre-commit configuration templates reference the author's public repository (https://github.com/daviddwlee84/agent-skills) for pre-commit hook definitions. - These references are to vendor-owned resources and are used for standard dependency management within the pre-commit framework.
Audit Metadata