Hacker News new | ask | show | jobs
by winwang 117 days ago
For manual prompting, I use a "macro"-like system where I can just add `[@mymacro]` in the prompt itself and Claude will know to `./lookup.sh mymacro` to load its definition. Can easily chain multiple together. `[@code-review:3][@pycode]` -> 3x parallel code review, initialize subagents with python-code-guide.md or something. ...Also wrote a parser so it gets reminded by additionalContext in hooks.

Interestingly, I've seen Claude do `./lookup.sh relevant-macro` without any prompting by me. Probably due it being mentioned in the compaction summary.

1 comments

Compaction includes all user prompts from the most recent session verbatim, so that's likely what's happening!
Fun fact, it can miss! I've seen it miss almost half my messages, including some which were actually important, haha.