Skip to Content
View all events

Bash and Agents

Published by O'Reilly Media, Inc.

Intermediate content levelIntermediate

How shell commands power agentic AI workflows

What you’ll learn and how you can apply it

  • Explain how agentic AI tools use shell commands to inspect, modify, and reason about software systems
  • Use shell commands such as find, grep, sed, awk, and jq to support AI-assisted code base exploration
  • Understand Claude Code concepts including tools, commands, skills, hooks, plug-ins, subagents, MCP servers, and monitors
  • Create a Claude skill and understand how skills and associated shell scripts are triggered
  • Create Claude hooks to observe, log, and control tool use
  • Create plug-ins from Claude infrastructure primitives
  • Inspect and reason about AI-generated command-line workflows
  • Identify security risks in AI-driven shell execution and apply safer patterns for permissions, command review, and workflow design
  • Use JSON and shell pipelines to turn AI-generated fragments into repeatable workflows

Course description

Agentic AI systems don’t only generate code or text. When used for software work, they inspect files, run commands, call tools, transform data, invoke scripts, and chain processes together. Shell commands and scripts are the agent’s “hands” used to perform these tasks. As a “glue” language, the shell gives AI systems a concise, powerful way to explore code bases, prepare data, run tests, query infrastructure, and turn generated fragments into repeatable workflows.

In this course with Ian Miell, developers and technical practitioners will learn how AI coding agents use shell and command-line tools in real work and how Claude Code uses tools, commands, skills, hooks, plug-ins, subagents, and monitors. Through live demonstrations and practical exercises, you’ll create a simple skill, add a script to that skill, configure hooks to log shell and tool use, and examine the security implications of allowing an AI agent to execute commands.

This live event is for you because...

  • You’re a software developer, DevOps engineer, platform engineer, SRE, software architect, or technical lead.
  • You work with command-line tools and want to understand how AI agents use them.
  • You use, or are considering using, tools such as Claude Code, Cursor, GitHub Copilot coding agents, or MCP-based tooling.
  • You want to understand what is happening when an AI agent explores a code base, runs shell commands, calls tools, or asks for permission to execute a command.
  • You want practical patterns for safely combining shell scripting and AI.

Prerequisites

  • A laptop with a terminal
  • Bash, Zsh, or a compatible UNIX-like shell
  • Claude Code installed and configured on your machine
  • jq and Git installed
  • A text editor
  • A small local project directory for experimentation
  • Basic familiarity with the command line
  • Basic understanding of software projects, files, directories, and Git
  • Some experience reading or writing simple shell commands
  • No prior experience building Claude skills, hooks, plug-ins, or MCP servers required

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Why agents need the shell (10 minutes)

  • Presentation: How agentic AI uses the shell as its “hands”; why command-line tools are useful to agents—concise syntax, process composition, code base inspection, and repeatable workflows
  • Group discussion: What commands would you expect an AI agent to run when exploring an unfamiliar code base?
  • Q&A

How Claude Code sees the world (15 minutes)

  • Presentation: Claude Code concepts—tools, commands, skills, hooks, plug-ins, subagents, monitors, and MCP servers; the .claude folder, project-local configuration, user configuration, and ignored local settings
  • Demonstration: Using / commands and locating Claude configuration
  • Hands-on exercise: Inspect a Claude project directory and identify where commands, skills, and local settings live
  • Q&A

Creating and triggering a skill (15 minutes)

  • Presentation: Commands versus skills—reusable prompts versus reusable knowledge
  • Demonstration: Create a simple helloworld skill under ~/.claude/skills/; triggering a skill explicitly and automatically
  • Hands-on exercise: Create a skill with a SKILL.md file
  • Group discussion: Why automatic skill triggering is useful but not perfectly predictable
  • Q&A
  • Break

Adding scripts and repeatable workflows (15 minutes)

  • Presentation: How AI tools produce fragments—commands, scripts, configs, reports, test runs, and JSON; UNIX composition and why shell scripting turns fragments into repeatable workflows
  • Demonstration: Add a scripts/hello_world.sh script to a skill
  • Hands-on exercise: Update SKILL.md so Claude can locate and call the script
  • Q&A

Hooks, logging, and observability (15 minutes)

  • Presentation: What hooks are and why they matter
  • Demonstration: Adding a PreToolUse hook for Bash; logging Bash commands to ~/.claude/bash-commands.jsonl; how hook input is passed as JSON on stdin
  • Hands-on exercise: Configure a hook that logs all tool uses with tool name, tool input, and hook event name
  • Group discussion: How do you understand what an agent is doing without relying on guesswork?
  • Q&A

Permissions, security, and attack vectors (15 minutes)

  • Presentation: Why shell access is powerful and risky; permission prompts, local settings, and command approvals; risk examples—PATH manipulation, command injection, unsafe scripts, and hidden side effects
  • Group discussion: How do you decide whether a command is safe to run?
  • Hands-on exercise: Review example agent commands and classify them as low, medium, or high risk
  • Q&A
  • Break

Tools, monitors, plug-ins, and MCP (20 minutes)

  • Presentation: What tools are and how an agent decides when to call them; the Skill tool as one example of an agent tool; monitors and watching for changes; plug-ins as packages of commands, skills, hooks, agents, MCP servers, LSP servers, and monitors
  • Demonstration: Simple command files that watch for file creation/removal
  • Q&A

Wrap-up and Q&A (15 minutes)

Your Instructor

  • Ian Miell

    Ian Miell has over 25 years of experience consulting on, writing, running, architecting, and maintaining software and infrastructure for dozens of businesses from large to small. He’s also the author of Docker in Practice (Manning), Learn Bash the Hard Way (Leanpub) as well as various training courses for O'Reilly Media and others. He now focuses on helping organizations make changes to their tech and management stacks from the bottom up.

    linkedinXlinksearch

Skill covered

bash