Inject

Fork the current session with the named files placed in context as if read, then hand the user the /resume command to switch to it. Use when the user asks to inject, load, or place files into context without reading them. User-invocable as /inject <path>...

gitjburns Updated

File contents

Inject

Puts files into context with zero tool calls by forking this session's transcript with synthetic reads appended. The fork lands only when loaded, so the user switches to it with /resume. The running session cannot see the files; do not read them here.

Steps

  1. Run the script that sits beside this file, with the paths the user gave (a manifest file may be passed as --manifest <list>). The harness states this skill's base directory when it loads the skill. Use that path; do not guess where the skill is installed:

    sh <base directory of this skill>/inject.sh fork <path>...
    
  2. Report the script's last line verbatim, /resume <id>, and tell the user to type it. Nothing else: no reading the files, no summary of them. The next session opens with them loaded.

  3. If the script fails, report its error. A missing CLAUDE_CODE_SESSION_ID means it was not run from inside a session.

gitjburns/inject-file/tree/main/skills/inject commit 0e35e182c0

Frequently asked questions

npx skillmds@latest add gitjburns/inject