Part 1: Demoing skills and commands
We start with a live demo in Claude Code. You do not need this demo to build the notebook agent. It gives the whole session a concrete shape. One skill fetches two command files from GitHub. Then the commands drive two agent roles.
The demo uses a skill named gh-fetch. Its job is to teach the agent how to
fetch files from a GitHub repository with the GitHub CLI.
The gh-fetch skill
The skill is a markdown file with YAML frontmatter:
---
name: gh-fetch
description: Fetch content from GitHub repos using gh CLI
---
# GitHub Fetch Skill
Use this skill when the user wants to:
- Get files from a GitHub repo
- List files in a repo
- Explore repo structure
- Fetch command definitions from repos
- Save files from a repo locally
The frontmatter gives the agent a short name and a description. The agent can use that description for selection. The body gives the step-by-step instructions. This is the split we will implement later.
The agent first sees the short description. Then it loads the full body only when the skill matches the task.
The body includes concrete gh api commands.
To list a repository root:
gh api repos/owner/repo/contents/
To list a subdirectory:
gh api repos/owner/repo/contents/.claude/commands
To fetch and decode a file:
gh api repos/owner/repo/contents/path/file.md --jq '.content' | base64 -d
To save that file locally:
gh api repos/owner/repo/contents/path/file.md --jq '.content' | base64 -d > local/path/file.md
The skill also gives the agent a usage pattern:
- Parse the repo from user input in
owner/nameformat. - Use
gh apito explore the repo structure. - Decode file contents with
base64 -d. - Redirect output into a local file when the user wants files saved.
- Present the results clearly.
That is enough for Claude Code to fetch command definitions without the user spelling out every API call.
Installing the demo skill
Create a clean folder for the demo:
mkdir demo
cd demo
Download the skill from the workshop repo:
wget https://raw.githubusercontent.com/alexeygrigorev/workshops/refs/heads/main/agent-skills/gh-fetch-skill.md
Claude Code discovers project-local skills under .claude/skills/<name>/SKILL.md,
so create that folder and move the file:
mkdir -p .claude/skills/gh-fetch
mv gh-fetch-skill.md .claude/skills/gh-fetch/SKILL.md
Start Claude Code from the demo folder:
claude
Now ask it to fetch the two command files:
get files kid and parent commands from
https://github.com/alexeygrigorev/claude-code-kid-parent
save them to .claude/commands/
The user does not say "use the gh-fetch skill". Claude sees the available
skill description and decides it matches the GitHub file-fetching request. Then
it calls the skill tool, reads the gh api instructions, and saves the command
files.
Restart Claude Code and continue the existing session:
claude -c
Now run the two commands:
/kid
The /kid command asks the agent to act like a child inventing a random coding
project.
Then run the parent command:
/parent
The /parent command asks the agent to implement the project idea in HTML and
JavaScript. The generated app is not the important part. The demo shows the
control flow: the skill is agent-selected, while the commands are user-selected.
Skill flow
The skill flow from the demo is:
- User asks to get command files from a GitHub repo.
- Agent sees
gh-fetch: Fetch content from GitHub repos using gh CLI. - Agent calls
skill({"name": "gh-fetch"}). - Tool returns the full skill instructions.
- Agent uses the
gh apicommands from the skill body. - Agent writes the command files into
.claude/commands/.
Skills let you add specialized behavior without changing the base system prompt every time. A short description is enough for discovery. The full instructions stay out of context until the agent needs them.
Command flow
The command flow from the same demo is:
- User types
/kid. - The system detects the leading
/. - The system looks up
kid.md. - The command template is rendered.
- The agent receives the rendered prompt.
- The agent acts on that prompt.
The agent never needs to reason about the literal /kid syntax. In a real
implementation, the command layer catches it and sends only the rendered prompt
to the agent.
The notebook version later uses a command tool for simplicity. That lets us avoid modifying the runner while still seeing how command markdown becomes a prompt.
Continue with Part 2: Recapping the coding agent for the agent loop and the coding tools we reuse from the prerequisite workshop.