[feature request] bash execution for Claude.md files
Resolved 💬 4 comments Opened May 16, 2025 by junoatwork Closed Jan 7, 2026
0.2.107 added
CLAUDE.md files can now import other files. Add @path/to/file.md to ./CLAUDE.md to load additional files on launch
which is super useful! In addition to being able to import other (static) files, I'd love the ability to add dynamic context like
CLAUDE.md:
Today is $(date). Recent changes: $(git log --pretty=oneline | head -n5)
Current prototype workaround
I wrap claude in a shellscript to pre-generate these snippets to a well-known location:
wrapper.sh:
#! /bin/bash
echo "Today is $(date). Recent changes: $(git log --pretty=oneline | head -n5)" > .context
claude
generates:
.context:
Today is Fri May 16 12:52:26 PDT 2025. Recent changes: 0a180fcf36217aff090febcb73cad5efca13a230 e
97f49f4daa8de0730140c7d4086fed337cfb92fb d
b80f7e6ed4a13d4a452050495e76bf5f70c44d23 c
4afe05f6d688e646664ac9cd85dd44a0743cd861 b
0680dc2d18f8542c538e65d5dec1a6a24ecfa2f8 a
Which I then import using @.context in CLAUDE.md.
etc
There's definitely security implications here to reason about, but it seems on the order of the Bash tool usage and a similar (pre)approval framework might work.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗