Skip to content

Latest commit

 

History

History
114 lines (82 loc) · 3.73 KB

File metadata and controls

114 lines (82 loc) · 3.73 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Overview

This is a Docker-based development environment for LaunchCode's Agentic Programming course, Module 4.

Docker Commands

Build the image:

docker build -t agentic_engineer_4 .

Force a clean rebuild:

docker build --no-cache -t agentic_engineer_4 .

Run with a local workspace mounted (recommended):

docker run -it --rm -p 8501:8501 -p 8502:8502 \
  -e SLACK_BOT_TOKEN=your-token \
  -e SLACK_TEAM_ID=your-team-id \
  -v "$PWD":/workspace \
  agentic_engineer_4

Pull and run the pre-built image from DockerHub:

docker run -it --rm -p 8501:8501 -v "$PWD":/workspace heatonresearch/agentic_engineer_4:latest

MCP Servers

Two MCP servers are pre-installed and configured in /root/.claude/settings.json:

Slack

  • Package: @modelcontextprotocol/server-slack
  • Requires env vars: SLACK_BOT_TOKEN, SLACK_TEAM_ID
  • Allows Claude Code prompts to read channels, post messages, and interact with Slack workspaces.

Gmail

  • Package: @gongrzhe/server-gmail-autoauth-mcp
  • OAuth credentials stored in /root/.gmail-mcp/ (persist this directory across container runs if needed)
  • Allows Claude Code prompts to read, search, and send Gmail messages.

Skills

Pre-configured skills (invoked with /skill-name in Claude Code):

Skill Description
/send-slack-message Send a message to a Slack channel
/check-gmail Summarize recent unread Gmail messages
/send-email Draft and send an email via Gmail
/summarize-session Bullet-point summary of the current session
/rebuild-and-deploy Rebuild the Docker image and push it to DockerHub

Skills are defined in settings.json which is copied to /root/.claude/settings.json during image build.

Agents

Pre-configured sub-agents available inside Claude Code sessions. Agents are autonomous specialists that Claude Code can invoke automatically or that you can request explicitly.

Agent Description
code-reviewer Reviews recent git changes for quality, security, and maintainability
email-summarize Checks new Gmail messages and posts sender + 2-line summary to #test Slack channel

Agents are defined as Markdown files with YAML frontmatter in /root/.claude/agents/ inside the container. Source files live in the agents/ directory of this repo and are copied in at build time.

Running an agent:

Ask Claude Code to use the agent explicitly:

Review my recent changes using the code-reviewer agent.

Or Claude Code may invoke it automatically when the task matches the agent's description.

Running Streamlit Apps

From inside the container:

streamlit run app.py

Access at http://localhost:8501.

Key Dependencies (requirements.txt)

  • anthropic — Claude API client
  • streamlit — web UI framework
  • python-dotenv — environment variable management
  • slack_sdk — Slack integration (Python)
  • google-api-python-client, google-auth-oauthlib — Gmail/Google API access (Python)
  • fastapi, flask, uvicorn — web frameworks
  • pydantic, httpx — HTTP and data validation

Environment & Tools in the Container

  • Python 3.12 (aliased as python and pip)
  • Claude Code CLI (claude) installed globally via npm
  • OpenCode (opencode-ai) installed globally via npm
  • MCP server: @modelcontextprotocol/server-slack
  • MCP server: @gongrzhe/server-gmail-autoauth-mcp
  • ngrok for tunneling
  • Workspace mounted at /workspace

Gmail API Setup

Place credentials.json (from Google Cloud Console) in your workspace directory. On first run it triggers OAuth and saves token.json. Both files should be in .gitignore.