Skip to main content
AI RADARVibe Coding
4•12/05/2026, 06:02•2 min read

Claude Code Can Run Commands Before Loading a Skill

Executive TL;DR30s read

SKILL.md now supports inline command execution, letting Claude Code inject command output into a skill before the model sees it.

Claude Code can now run commands before a skill is loaded.

In SKILL.md, you can use the ! + command-in-backticks syntax, for example !`gh pr diff` . Claude Code first executes the command, inserts its output into the skill text, and only then passes the result to the model.

This lets you preload relevant context without extra tool calls. For example, when working with a pull request, the model immediately receives its diff instead of spending a separate turn asking for changes.

There is another detail. When context: fork is used, a separate subagent is created with the skill as its prompt. It runs in the background and cannot see the main conversation history, so the skill itself must contain all required context.

If the command fails, skill loading is interrupted. For commands that may fail, it is recommended to append || true.

Claude Code Skills documentation

Why it matters

Analysis

It reduces unnecessary tool calls and makes skill context more deterministic for AI coding workflows.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills