Hands-on crash course for Claude Code with branch-based projects on MCP, subagents, hooks, and automation. For operations teams looking to streamline workflows and integrate AI-driven automation into their processes.
git clone https://github.com/emarco177/claude-code-crash-course.gitHands-on crash course for Claude Code with branch-based projects on MCP, subagents, hooks, and automation. For operations teams looking to streamline workflows and integrate AI-driven automation into their processes.
[{"step":"Clone the starter repository and create a new branch for your project","action":"Run `git clone https://github.com/acme-corp/claude-code-crash-course.git` and then `git checkout -b dev/your-project-name`","tip":"Use descriptive branch names like `dev/mcp-file-monitor` or `dev/auto-deployment-pipeline` to track progress"},{"step":"Follow the branch-specific instructions to implement each component","action":"Work through the branches in order: MCP server setup → Subagent integration → Git hooks → CI/CD pipeline","tip":"Test each component in isolation before integrating them. Use `claude --check` to validate your MCP server configuration"},{"step":"Customize the examples for your specific use case","action":"Replace placeholder values like `[SPECIFIC_USE_CASE]` or `[TASK_NAME]` with your actual requirements (e.g., 'monitor our payment processing API' instead of 'health endpoints')","tip":"Start with simple implementations and gradually add complexity. For MCP servers, begin with a single tool before adding multiple endpoints"},{"step":"Integrate the components into your existing workflow","action":"After completing all branches, merge them into your main branch and test the complete automation pipeline","tip":"Use the provided GitHub Actions workflow as a template, but customize it for your deployment target (AWS, GCP, Azure, etc.)"},{"step":"Document your implementation and share with your team","action":"Create a README.md in your repository explaining how to use each component and add troubleshooting tips you discover","tip":"Include example commands and expected outputs in your documentation to make it easier for teammates to adopt"}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/emarco177/claude-code-crash-courseCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a hands-on crash course for [TEAM_NAME] to master Claude Code automation. Design a branch-based project that covers: 1) Setting up MCP servers for [SPECIFIC_USE_CASE], 2) Implementing subagents to handle [TASK_NAME] workflows, 3) Configuring Git hooks for automated pre-commit checks, and 4) Building a CI/CD pipeline for [DEPLOYMENT_TARGET]. Include step-by-step instructions, example commands, and troubleshooting tips. Assume the team has basic Python knowledge but no prior MCP experience. Provide a GitHub repository structure they can clone and modify for their own projects.
## Claude Code Automation Crash Course: Branch-Based MCP Project for Acme Corp
### Project Setup
Clone the starter repository: `git clone https://github.com/acme-corp/claude-code-crash-course.git`
### Branch 1: MCP Server Setup (dev/mcp-setup)
**Goal:** Create an MCP server that monitors our internal API health endpoints.
1. **Initialize MCP Server:**
```bash
mkdir -p mcp-servers/api-monitor && cd mcp-servers/api-monitor
poetry init -n
poetry add mcp mcp-stdio requests
```
2. **Implement Health Check Endpoint:**
```python
# mcp-servers/api-monitor/api_monitor.py
from mcp.server import Server
import requests
server = Server("api-health-monitor")
@server.list_tool()
async def check_api_health(endpoint: str) -> dict:
"""Check health of internal API endpoints"""
try:
response = requests.get(f"https://{endpoint}/health", timeout=5)
return {
"status": "healthy" if response.status_code == 200 else "unhealthy",
"response_time_ms": response.elapsed.total_seconds() * 1000
}
except Exception as e:
return {"status": "error", "error": str(e)}
server.run()
```
3. **Test Locally:**
```bash
python mcp-servers/api-monitor/api_monitor.py
# In another terminal:
claude -m "Check the health of our user-service endpoint" --mcp-server ./mcp-servers/api-monitor
```
### Branch 2: Subagent Integration (dev/subagent-integration)
**Goal:** Create a subagent that handles database backup requests.
1. **Create Subagent:**
```python
# agents/db-backup-agent.py
from claude_code import SubAgent
class DatabaseBackupAgent(SubAgent):
async def handle_request(self, request: str) -> str:
if "backup" in request.lower():
# Execute backup command
return "Database backup completed successfully. File: backups/db_20240515.sql.gz"
return "No backup command detected in request"
if __name__ == "__main__":
agent = DatabaseBackupAgent()
agent.run()
```
2. **Integrate with Main Agent:**
```python
# main_agent.py
from claude_code import Agent
from db_backup_agent import DatabaseBackupAgent
main_agent = Agent()
backup_agent = DatabaseBackupAgent()
@main_agent.on_message("backup request")
async def handle_backup(user_id: str, message: str):
result = await backup_agent.handle_request(message)
return f"Backup processed: {result}"
main_agent.run()
```
### Branch 3: Git Hooks (dev/git-hooks)
**Goal:** Implement pre-commit hooks for code quality checks.
1. **Install Pre-commit:**
```bash
pip install pre-commit
```
2. **Configure Hooks:**
```yaml
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: local
hooks:
- id: claude-code-check
name: Claude Code Quality Check
entry: claude --check
language: system
files: '\.(py|js|ts|md)$'
```
3. **Test Hooks:**
```bash
git add .pre-commit-config.yaml
pre-commit install
# Make a test commit
echo "test" > test.txt
git add test.txt
git commit -m "Test hooks"
```
### Branch 4: CI/CD Pipeline (dev/ci-cd)
**Goal:** Build a pipeline that deploys our MCP servers to AWS ECS.
1. **Create Dockerfile:**
```dockerfile
# Dockerfile for api-monitor
FROM python:3.11-slim
WORKDIR /app
COPY mcp-servers/api-monitor /app/mcp-servers/api-monitor
RUN pip install poetry && cd /app/mcp-servers/api-monitor && poetry install
CMD ["poetry", "run", "python", "api_monitor.py"]
```
2. **GitHub Actions Workflow:**
```yaml
# .github/workflows/deploy.yml
name: Deploy MCP Servers
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to AWS ECR
run: aws ecr get-login-password | docker login...
- name: Build and Push
run: |
docker build -t api-monitor:latest -f mcp-servers/api-monitor/Dockerfile .
docker push ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/api-monitor:latest
- name: Deploy to ECS
run: aws ecs update-service...
```
### Final Integration
After completing all branches, merge them into `main` and test the complete workflow:
```bash
claude -m "Monitor our user-service API and create a backup if it's healthy" --mcp-server ./mcp-servers/api-monitor
```
**Expected Output:**
```
[2024-05-15 14:30:00] Monitoring user-service endpoint...
[2024-05-15 14:30:05] API Status: healthy (response time: 124ms)
[2024-05-15 14:30:05] Initiating database backup...
Database backup completed successfully. File: backups/db_20240515.sql.gz
```AI assistant built for thoughtful, nuanced conversation
Your one-stop shop for church and ministry supplies.
Automate your browser workflows effortlessly
Agents that listen, think and act for you.
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan