AI辅助编程学习平台

Agent Code Academy是一个为期12周的免费课程,帮助用户从零开始掌握AI辅助编程,包含完整课程、自动更新服务器、实时课程网站和自动化QA流程。

  • by mgalbakri
  • TypeScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 mgalbakri/claude-code-mastery

使用说明

代理代码学院

一个为期12周的免费课程,用Claude Code掌握人工智能辅助编码——从零到专家。包括一个完整的课程、一个自动更新的MCP服务器、一个实时课程网站和一个自动化的QA管道。

🌐 现场: agentcodeacademy.com

里面是什么

组件 描述
curriculum.md 为期12周的课程,包括课程、练习、测验和自动生成的更新
site/ Next.js 16静态站点部署在Vercel上,具有SEO、电子邮件捕获和黑暗模式
site/e2e/ Playwright E2E测试套件(6个文件中的79个测试)
.github/workflows/ GitHub Actions CI/CD——PR检查+夜间生产测试
claude_code_mastery/ MCP服务器,监控7+个来源并自动更新课程

网站功能

  • 搜索引擎优化 --网站地图、robots.txt、JSON-LD课程模式、Open Graph和Twitter元标签、规范URL
  • 电子邮件捕获 --Formspree支持的注册表格(主页+内联CTA+周页面横幅)
  • 深色模式 --系统偏好检测+手动切换(顺风CSS 4+下一主题)
  • 移动响应 --汉堡导航,堆叠式布局,所有视口均可触摸
  • 变现 --给我买杯咖啡,联盟工具链接,Vercel Analytics

QA管道

79个剧作家测试在每个PR上自动运行,每晚对生产进行测试。

套件 测试 它涵盖了什么
smoke.spec.ts 27 所有25条路线返回200,404页,没有控制台错误
seo.spec.ts 17 元标签、JSON-LD、OG标签、规范URL、站点地图、robots.txt
dark-mode.spec.ts 5 主题切换、背景颜色、系统偏好
responsive.spec.ts 8 移动导航,汉堡菜单,布局,无溢出
forms.spec.ts 6 电子邮件注册、内联CTA、模拟提交、横幅删除
links.spec.ts 11 7个外部链接(软断言)+4个内部导航链接

运作原理

PR opened → Vercel deploys preview → GitHub Actions runs 79 Playwright tests
  → Pass ✅ → PR comment with results → merge ready
  → Fail ❌ → PR comment + red check → merge blocked

夜间: 每天早上6点运行UTC agentcodeacademy.com 通过cron。

MCP工具

工具 说明
curriculum_fetch_updates 从7+来源获取最新的Claude Code更新
curriculum_analyze_gaps 将更新与课程进行比较,找出差距
curriculum_apply_update 将更改写入课程标记文件
curriculum_set_path 配置课程文件所在的位置
curriculum_status 显示进度和更新历史记录

数据源

  1. 鲍里斯·切尔尼的X (@anthropaboris)——Claude Code负责人的更新和提示
  2. 人类学博客 --官方功能公告
  3. 人为变化日志 --技术发布说明
  4. 克劳德代码文档 --文档结构更改
  5. GitHub发布 --Claude Code CLI发布
  6. 人类学YouTube --视频内容
  7. Reddit r/ClaudeAI --社区讨论

安装

先决条件

  • Python 3.10+
  • Node.js 20+(用于网站)
  • 已安装克劳德代码(npm install -g @anthropic-ai/claude-code)

设置

git clone https://github.com/mgalbakri/claude-code-mastery.git
cd claude-code-mastery
pip install -e .

配置Claude代码

增添 ~/.claude.json 在...之下 mcpServers:

{
  "claude_code_mastery": {
    "type": "stdio",
    "command": "python3",
    "args": ["-m", "claude_code_mastery.server"],
    "env": {
      "PYTHONPATH": "/path/to/claude-code-mastery"
    }
  }
}

在本地运行网站

cd site
npm install
npm run dev

运行测试

cd site
npm test              # Run all 79 tests
npm run test:smoke    # Smoke tests only
npm run test:seo      # SEO tests only

用法

在克劳德代码中:

> Set my curriculum path to ~/projects/claude-code-mastery/curriculum.md
> Check for new Claude Code updates from the last 2 weeks
> Analyze my curriculum for gaps
> Apply any high-priority updates

自动更新

macOS launchd代理每周一上午9点检查更新:

  1. 从所有来源获取更新
  2. 分析课程差距
  3. 自动应用高优先级更改(带备份)
  4. 同步到站点目录
  5. 部署到Vercel
  6. 发送电子邮件+macOS通知

安装调度程序:

python -m claude_code_mastery.scheduler --install-launchd --weekly

项目结构

claude-code-mastery/
├── curriculum.md                       # 12-week course (source of truth)
├── pyproject.toml                      # Python package config
├── .github/workflows/                  # CI/CD pipelines
│   ├── qa.yml                         # PR-triggered QA (79 Playwright tests)
│   └── nightly-qa.yml                 # Daily production smoke test
├── claude_code_mastery/                # MCP server
│   ├── server.py                      # Tool definitions
│   ├── sources.py                     # Data fetchers
│   ├── analyzer.py                    # Gap analysis
│   ├── cache.py                       # Local persistence
│   ├── semantic.py                    # TF-IDF matching
│   ├── scheduler.py                   # Scheduled checks & deploy
│   └── docs_differ.py                 # Docs diffing
├── site/                              # Next.js course website
│   ├── app/                           # App Router pages
│   │   ├── page.tsx                   # Homepage
│   │   ├── layout.tsx                 # Root layout with SEO meta
│   │   ├── not-found.tsx              # Custom 404 page
│   │   ├── sitemap.ts                 # Dynamic sitemap
│   │   ├── robots.ts                  # Robots.txt
│   │   ├── week/[number]/page.tsx     # Week pages
│   │   └── appendix/[letter]/page.tsx # Appendix pages
│   ├── components/                    # React components
│   │   ├── sidebar.tsx                # Desktop sidebar nav
│   │   ├── mobile-nav.tsx             # Mobile hamburger nav
│   │   ├── theme-toggle.tsx           # Dark/light mode toggle
│   │   ├── email-signup.tsx           # Homepage email form
│   │   ├── email-banner.tsx           # Week page email banner
│   │   ├── inline-email-cta.tsx       # Between-phase CTA
│   │   ├── week-card.tsx              # Week preview card
│   │   └── markdown-renderer.tsx      # MDX content renderer
│   ├── e2e/                           # Playwright E2E tests
│   │   ├── smoke.spec.ts             # Route & error tests
│   │   ├── seo.spec.ts               # SEO & meta tag tests
│   │   ├── dark-mode.spec.ts         # Theme toggle tests
│   │   ├── responsive.spec.ts        # Mobile viewport tests
│   │   ├── forms.spec.ts             # Email form tests
│   │   └── links.spec.ts             # Link validation tests
│   ├── lib/                           # Parser & types
│   └── playwright.config.ts           # Playwright configuration
└── tests/                             # pytest suite (127 tests)

许可证

麻省理工学院