28 November 2026
امنع الأوامر الخطرة داخل الـ skills في Claude Code بـ PreSkillShellCommandBlock Risky Shell Commands Inside Claude Code Skills with PreSkillShellCommand
Add a hook that checks every shell command a skill runs as it loads in Claude Code, and blocks the dangerous ones before they execute.
Who this guide is for
Founders and developers who use skills or commands from their team or the internet in Claude Code.
Key terms
- skill
- A SKILL.md file of instructions that Claude Code loads on demand, such as a pull request summary or a security review.
- injected command
- A shell command written inside a skill as !`command`. It runs the moment the skill loads, and its output goes into Claude's instructions.
- PreToolUse
- A hook that runs before Claude calls a tool. It does not run on injected commands, and that is the gap.
- PreSkillShellCommand
- A new hook that runs before every injected command. It can block a command. It cannot approve or edit one.
The rest is locked
6 full steps, with the ready prompts and the takeaway
Secure, encrypted payment via Stripe
Bought this before? Restore your access
Your access is tied to your email. Enter it here and the content opens right away, any time, on any device
Most value
Start building with me now
We sit together, break down your problem, and I build the AI solution with you step by step
60minutes
- A private session with you
- Real building during the session
- Results you take with you when we finish
100% free
A free consultation about your problem
