Fullstack Dev、iOS Reverse Engineering、小红书逆向培训

 
重磅更新!Claude Code 引入大杀器 sub-agents

今天,我们要聊一个激动人心的话题——Anthropic 为其 AI 编程助手 Claude Code 推出了一个强大的新功能:sub-agents(子智能体)

这项功能可不仅仅是简单的升级,它可能会彻底改变我们与 AI 协作编程的方式。准备好了吗?让我们一探究竟!

什么是 sub-agents?

简单来说,sub-agents 是特种兵式的 AI 助手。

你可以把 Claude Code 看作一个项目经理,当它遇到一个具体、专业的任务时(比如,“检查这段代码是否符合我们的编码规范”或“将这个组件的文档翻译成日文”),它不再需要事事亲为,而是可以“召唤”一个专门负责这项任务的 sub-agent 来处理。

每个 sub-agent 都拥有自己独立的上下文窗口、一套专属的工具集和独特的系统提示 (System Prompt),这让它们成为了特定领域的高效专家。

完成任务后,sub-agent 会将结果交还给主对话线程,而不会用繁杂的执行过程干扰你的主工作流程。

为什么要使用 sub-agents?

你可能会问,这听起来不错,但它具体好在哪里?

  • 上下文“减负” (Context Preservation): 这是最核心的优势之一。通过将特定任务隔离出去,sub-agents 可以防止主对话的上下文窗口被无关信息填满,让你的主会话始终聚焦于更高层次的战略目标。再也不用担心“聊着聊着 AI 就忘了前面说过啥”了!
  • 专业的人做专业的事 (Specialized Expertise): 你可以为 sub-agents 精心设计非常具体的指令和系统提示,让它们在特定任务上表现得远超通用模型。例如,你可以创建一个只负责数据库迁移脚本生成的 sub-agent,并为它提供所有相关的背景知识和规范。
  • 可复用与团队共享 (Reusability & Collaboration): 一旦你创建了一个高效的 sub-agent,它就可以在不同的项目中重复使用。更棒的是,你可以将项目级的 sub-agents纳入版本控制(如 Git),与团队成员共享,确保整个团队工作流的一致性和高效性。
  • 灵活的权限控制 (Flexible Permissions): 你可以精确控制每个 sub-agent 能访问哪些工具。比如,你可以只授权给“代码审查” sub-agent 读取文件的权限,而不给它执行代码的权限,从而实现更精细化的安全管理。

如何创建和使用 sub-agents?

创建和管理 sub-agents 非常灵活,主要有两种方式:

  1. 使用 /agents 命令 (推荐): 在 Claude Code 中输入 /agents,会弹出一个交互式界面。你可以在这里轻松地查看、创建、编辑和删除 sub-agents,整个过程都有引导,非常方便。
  2. 直接管理文件: sub-agents 本质上是存储在特定目录下的 Markdown 文件(带有 YAML frontmatter)。
    • 项目级 sub-agents: 存储在项目目录的 .claude/agents/ 下,仅对该项目有效。
    • 用户级 sub-agents: 存储在 ~/.claude/agents/ 下,对你的所有项目都有效。

一个 sub-agent 的配置文件大概长这样:

---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
tools: Read, Grep, Glob, Bash
---

You are a senior code reviewer ensuring high standards of code quality and security.

When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately

Review checklist:
- Code is simple and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed

Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)

Include specific examples of how to fix issues.

使用时,Claude Code 会根据你的指令自动判断是否需要委派任务给某个 sub-agent。当然,你也可以明确指定> 让 code-reviewer 检查我最近的提交

最佳实践

  • 从生成开始: 让 Claude Code帮你生成第一个 sub-agent,然后在此基础上进行修改和完善。
  • 保持专注: 设计功能单一、职责明确的 sub-agent。
  • 详细的指令: 系统提示写得越详细、越清晰,sub-agent 的表现就越好。
  • 限制工具: 按需授权,只给 sub-agent 完成任务所必需的工具。
  • 拥抱版本控制: 将项目级的 sub-agents 加入 Git,与团队一起维护和迭代。

总结

sub-agents 功能的推出,标志着 AI 编程助手正从一个“无所不知的通才”向一个“由众多专家组成的协作团队”转变。

这不仅提升了 AI 处理复杂任务的能力和效率,也为我们开发者提供了前所未有的灵活性和控制力。我们可以像组建一个真实的开发团队一样,去“搭建”和“管理”我们的 AI 助手团队。

AI 编程的未来,正朝着更模块化、更专业化、更智能化的方向大步迈进。快去试试 Claude Code 的 sub-agents 功能,亲自感受一下这场正在发生的变革吧!


公众号原文

 
推荐一款非常好看的 Claude Code 应用: Conductor

不仅拥有超美的 UI,还自动帮你处理所有 Git worktree 的麻烦事!🔥

官网: https://conductor.build/

公众号原文

 
用 Planet + ENS 构建一个真正去中心化的博客

你是否也想拥有一个无需服务器、不会被平台下架、使用自己域名的博客?

这篇文章将手把手带你完成这一切,只需要 3 个工具:

  • Planet:macOS 上的开源博客 App
  • ENS 域名(如 yourname.eth
  • 公共 ENS 网关如 eth.limoeth.link

什么是 Planet?

Planet 是一款 macOS 上的开源博客应用,它利用 IPFS 和 IPNS 技术将你的博客内容:

  • 本地发布到 IPFS 网络(通过内容寻址)
  • 自动生成 IPNS 地址(类似“博客永久地址”)
  • 可选绑定到 ENS 域名(让访问像 yourname.eth.limo 一样简单)

你只需要点几下鼠标,就能拥有一个 Web3 原生博客!

Planet 界面


第一步:创建并发布你的博客

操作步骤:

  1. 安装并打开 Planet App
  2. 点击左下角 创建一个新的 Blog
  3. 填写标题、描述、封面图等信息
  4. 点击 “新文章” 按钮写文章
  5. 点击顶部的发布按钮

发布后发生了什么?

  • Planet 会将你的内容发布到本地 IPFS 节点,每一篇文章、资源都会生成唯一的 CID(内容哈希)
  • Planet 同时会用你设备私钥生成 IPNS 密钥对,创建博客的稳定地址
    ipns://{你的 IPNS ID}
    
  • 每次发布后 Planet 都会更新 IPNS 绑定,确保链接永远指向你最新的博客内容

第二步:将博客绑定到你的 ENS 域名

目标是让别人访问:

https://yourname.eth.limo

官方推荐绑定步骤如下:

Step 1:获取你的 IPNS 地址

  • 打开 Planet App,右键点击你想绑定的博客
  • 选择 Copy IPNS
  • 你将复制到一个以 k51... 开头的字符串

Step 2:编辑 ENS 记录

  • 前往 app.ens.domains,找到你的 .eth 域名
  • 进入 Records 页,点击 Edit Records
  • Other → Content Hash 字段中,粘贴如下格式:
    ipns://k51qzi5uqu5dhlv0jq4akf...(你刚复制的 IPNS 地址)
    

Step 3:提交交易并等待确认

确认之后,你的博客就可以通过:

https://yourname.eth.limo

进行访问。

ENS 设置示意图:

ENS 设置 IPNS


Planet 如何确保你的博客在线?

Planet 发布内容时会:

  • 广播到你本地 IPFS 节点
  • 推送给 Planet 社区节点
  • 被公共网关如 eth.limo 缓存后可持续访问

如果想要 永久性在线,建议使用 web3.storage pin 住你的 CID。


📦 补充说明:Planet 的“智能托管机制”

  • Planet 自动将博客内容同步给官方和社区节点
  • 通过 IPNS 地址持续跟踪更新
  • IPFS 网络中访问者也会间接缓存内容

意味着你关机后博客也能继续被访问!


总结

项目 说明
内容托管 IPFS(内容寻址,去中心化)
地址管理 IPNS(自动指向最新 CID)
域名绑定 ENS(用你的 .eth 域名)
网关访问 https://yourname.eth.limo
可用性保障 Planet 节点广播 + 可选 pin 服务

示例

我的博客地址如下,欢迎访问:
👉 https://gptkit.eth.limo


公众号原文

 
BMAD-METHOD:让一个人顶一个敏捷团队的 AI 驱动开发框架

你还在为组建敏捷团队而苦恼吗?

在软件开发的世界里,敏捷开发方法已经成为主流。但是,组建一个完整的敏捷团队需要产品经理、架构师、开发人员、测试人员、UX 设计师等各种角色,对于个人开发者或小团队来说,这几乎是不可能的任务。

直到 BMAD-METHOD 的出现,这一切都改变了。

BMAD-METHOD:革命性的 AI 敏捷开发框架

BMAD-METHOD(Breakthrough Method of Agile AI-Driven Development)是一个突破性的 AI 代理编排框架,它的核心理念是通过专门的 AI 代理来模拟完整的敏捷开发团队,让一个人就能拥有整个团队的力量。

🎯 一人 Scrum 团队的核心优势

专业角色完整覆盖

  • 业务分析师(Analyst):市场调研、需求收集
  • 产品经理(PM):PRD 创建、功能优先级排序
  • 架构师(Architect):系统设计、技术架构
  • 开发人员(Developer):顺序任务执行、测试
  • QA 专家(QA):代码审查、重构
  • UX 专家(UX):UI/UX 设计
  • 产品负责人(PO):需求管理
  • Scrum Master(SM):冲刺规划、故事创建

真正的敏捷工作流
不是简单的 AI 助手,而是严格遵循敏捷方法论的完整流程,每个 AI 代理都有明确的职责和交付物。

在 Claude Code 环境下的完整交付流程

🚀 环境准备:快速安装

在开始使用 BMAD-METHOD 之前,首先需要在你的项目中安装框架:

npx bmad-method install

这个命令会在你的项目中安装 BMAD-METHOD 框架,自动配置所有必要的 AI 代理和模板文件。安装完成后,你就可以开始使用各种角色命令了。

第一步:需求分析与头脑风暴

🧠 使用 /analyst 命令启动分析师角色

/analyst
  • 分析师会与你进行深入的头脑风暴对话
  • 探讨项目背景、目标用户、核心需求
  • 根据内置模板自动生成一份完整的项目简报
  • 为后续的产品设计奠定基础

第二步:产品规划与需求文档

📋 使用 /pm 命令呼唤产品经理角色

/pm
  • 产品经理基于项目简报进行深入分析
  • 自动生成详细的 PRD(产品需求文档)
  • 创建项目的 Epic(史诗故事)
  • 确定功能优先级和产品路线图

第三步:系统架构设计

🏗️ 使用 /architect 命令呼唤架构师角色

/architect
  • 架构师基于 PRD 和 Epic 进行技术分析
  • 设计完整的系统架构文档
  • 确定技术栈、数据库设计、API 结构
  • 为开发团队提供技术实施指导

第四步:创建用户故事

📝 使用 /sm 命令呼唤 Scrum Master 角色

/sm
  • Scrum Master 基于 PRD、Epic 和架构文档
  • 创建下一个待开发的用户故事(User Story)
  • 定义验收标准和完成定义
  • 估算故事点数和优先级

第五步:故事开发实现

💻 使用 /dev 命令呼唤开发者角色

/dev
  • 开发者接收刚刚创建的用户故事
  • 进行编码实现、单元测试、集成测试
  • 确保代码质量和功能完整性
  • 完成故事的最终交付

第六步:持续迭代循环

🔄 重复步骤 4-5,直到项目完成

/sm → 创建下一个故事
  ↓
/dev → 实现故事
  ↓
/sm → 创建下一个故事
  ↓
/dev → 实现故事
  ↓
... 持续循环

🎯 核心优势:一键切换角色

通过简单的斜杠命令,你可以在 Claude Code 中无缝切换不同的专业角色:

  • 随时随地:无需重新配置,一个命令即可切换
  • 上下文保持:每个角色都能完整理解项目背景
  • 专业输出:每个角色都按照标准模板输出专业文档
  • 流程完整:严格按照敏捷开发流程推进项目

独特的技术特性

🎨 智能模板系统

  • 交互式文档模板:文档内嵌处理指令
  • 动态依赖加载:代理只加载必要资源
  • 平台无关性:适用于任何项目类型

🔧 灵活的开发模式

  • 渐进式开发:稳步推进,质量优先
  • YOLO 模式:快速原型,适合探索
  • 双模式切换:根据项目需求灵活选择

🤖 专业化 AI 代理

  • 角色专精:每个代理专注于特定领域
  • 真实协作:模拟真实团队的工作方式
  • 智能交接:代理间自动协调工作

实际应用价值

🎯 真实项目案例:polyv-live-cli

让我们看一个真实的 BMAD-METHOD 应用案例:polyv-live-cli

这是一个完全使用 BMAD-METHOD 开发的 CLI 工具项目,用于管理 Polyv 直播云服务:

项目特点:

  • TypeScript 开发:提供完整的类型安全保障
  • 多功能集成:支持频道管理、流控制、状态监控等
  • 企业级应用:服务于直播云服务管理场景

BMAD-METHOD 应用成果:

  • docs/ 目录:包含各个角色协作生成的完整文档
    • 分析师提供的市场调研和需求分析
    • 产品经理创建的 PRD 和 Epic 文档
    • 架构师设计的技术架构方案
    • 开发者实现的详细技术文档

开发效果:

  • ✅ 完整的敏捷开发流程文档化
  • ✅ 各角色职责清晰,交付物规范
  • ✅ 高质量的代码和 80%+ 测试覆盖率
  • ✅ 从概念到交付的完整追溯链

这个项目完美展示了一个人如何通过 BMAD-METHOD 拥有完整团队的协作能力,从需求分析到最终交付的全流程管理。

💡 适用场景

  • 个人开发者:一人完成完整项目
  • 小型团队:补充团队技能短板
  • 快速原型:迅速验证产品想法
  • 技能学习:通过 AI 代理学习不同角色的工作方式

🚀 核心优势

  1. 成本效益:无需组建完整团队
  2. 质量保障:严格的代码审查和测试
  3. 流程规范:遵循标准敏捷实践
  4. 学习价值:深入理解敏捷开发全貌

开始你的 BMAD-METHOD 之旅

📚 更多资源

  • 访问 BMAD-METHOD GitHub 仓库 获取详细文档
  • 查看示例项目和最佳实践
  • 加入社区讨论,分享你的使用心得

在这个 AI 时代,不再是机器取代人类,而是人类与 AI 协作,创造更大的价值。BMAD-METHOD 让每个开发者都能拥有一个完整的专业团队,让创意不再受限于资源,让想法真正变成现实。

🎯 记住这句话:

"一个人的力量 × AI 的智慧 = 无限的可能"


想了解更多 BMAD-METHOD 的实战技巧和最佳实践?请关注我们的后续文章,我们将深入分享更多实用的开发经验和案例分析。

公众号原文

 
Claude Code 深夜也要加班?这个神器让AI自动续命!

你有没有遇到过这种情况?

晚上熬夜用 Claude Code 写代码,正写到关键时刻,突然弹出:"Claude usage limit reached. 恢复时间:凌晨 3 点"😭

这时候你可能已经困得睁不开眼,但又舍不得放弃手头的工作进度...

💡 解决方案来了!

今天给大家推荐一个开源神器:Claude Auto Resume,让你的 Claude Code 可以"自动续命"!

🔧 它是怎么工作的?

  1. 智能检测:自动监控 Claude 使用限制
  2. 倒计时等待:显示实时倒计时,让你知道还要等多久
  3. 自动恢复:时间一到,立即恢复任务执行
  4. 零人工干预:整个过程完全自动化

🎯 核心特性

🔄 智能恢复

  • 自动解析限制时间
  • 精确计算等待时长

⏰ 实时反馈

  • 倒计时显示:恢复倒计时 02:15:30...
  • 清晰的状态提示

🛡️ 安全提醒

  • 内置安全警告机制
  • 建议在隔离环境使用

📦 安装超简单

# 一键安装
sudo make install

# 或者直接使用
./claude-auto-resume.sh "继续完成用户认证功能"

💎 使用示例

# 基础用法
claude-auto-resume "继续实现登录页面"

# 继续上次对话
claude-auto-resume -c "请继续之前的任务"

# 使用参数形式
claude-auto-resume -p "写单元测试"

# 查看帮助
claude-auto-resume --help

🎬 工作流程演示

$ claude-auto-resume "实现用户注册功能"

Claude usage limit detected. Waiting until 2024-01-15 03:00:00...
Resuming in 02:15:30...
Resuming in 02:15:29...
...
Resume time has arrived. Retrying now.
Automatically starting new Claude session with prompt: '实现用户注册功能'
Task has been automatically resumed and completed.

⚠️ 重要提醒

由于脚本使用了 --dangerously-skip-permissions 参数,Claude 会自动执行命令而不询问权限。建议:

  • 🔒 只在开发环境使用
  • 📝 仔细检查提示词内容
  • 💾 做好代码备份
  • 🎯 使用具体的提示词(如:"继续实现 src/auth.js 中的登录功能")

🔧 技术特点

  • 零依赖:只需要标准的 Unix 工具
  • 跨平台:支持 Linux 和 macOS
  • 轻量级:单个 Shell 脚本,不到 200 行代码

🎉 总结

有了 Claude Auto Resume,再也不用担心深夜编程被使用限制打断了!让 AI 助手真正成为你的 24/7 编程伙伴。

特别适合:

  • 🌙 夜猫子程序员
  • 🔧 重构狂人
  • 📚 AI 学习爱好者
  • ⚡ 效率提升控

项目地址GitHub - claude-auto-resume

觉得有用的话,给个 ⭐️ 支持一下开源作者吧!

公众号原文

 
YAML-based Playwright MCP testing for Claude Code

How a simple YAML configuration built for Claude Code and Playwright MCP transformed our testing workflow and made automation accessible to everyone on the team


If you've ever maintained a large Playwright test suite, you know the pain. Hundreds of lines of JavaScript scattered across dozens of files. Hardcoded values that break when environments change. Test logic so complex that only the original author dares to modify it.

What if I told you there's a better way? A way to write tests that are readable by anyone, maintainable by design, and powerful enough to handle complex workflows?

Enter YAML-based Playwright testing for Claude Code — a paradigm shift that's changing how teams approach test automation by leveraging the power of Claude Code's AI capabilities and Playwright MCP's browser automation.

The Problem with Traditional Playwright Tests

Let's be honest about traditional Playwright tests:

// Traditional Playwright test - 50+ lines of code
test('complete order flow', async ({ page }) => {
  await page.goto('https://example.com');
  await page.fill('[data-testid="username"]', 'user123');
  await page.fill('[data-testid="password"]', 'pass456');
  await page.click('[data-testid="login-btn"]');
  await expect(page.locator('h1')).toContainText('Dashboard');
  
  // ... 40+ more lines of clicking, filling, asserting
  // ... hardcoded values everywhere
  // ... no reusability between tests
});

Problems:

  • Verbose and complex — Simple actions buried in boilerplate
  • Hardcoded values — Environment changes break everything
  • Poor reusability — Copy-paste leads to maintenance nightmares
  • Technical barrier — Only developers can write/modify tests
  • Scattered logic — Related tests live in different files

The YAML Revolution: Tests That Make Sense

Now imagine the same test written in YAML:

# test-cases/order.yml
tags: 
  - smoke
  - order
  - checkout

steps:
  - include: "login"
  - "Click Add to Cart button for first product"
  - "Click Add to Cart button for second product"  
  - "Click shopping cart icon in top right"
  - "Enter First Name"
  - "Enter Last Name"
  - "Enter Postal Code"
  - "Click Continue button"
  - "Click Finish button"
  - "Verify page displays Thank you for your order!"
  - include: "cleanup"

Immediate benefits:

  • Crystal clear intent — Anyone can understand what this test does
  • Natural language — Steps read like user stories
  • Reusable components — Login and cleanup are shared across tests
  • Environment agnostic — No hardcoded values in sight

The Magic Behind the Simplicity

1. Reusable Step Libraries

Common workflows become building blocks:

# steps/login.yml
steps:
  - "Open {{BASE_URL}} page"
  - "Fill username field with {{TEST_USERNAME}}"
  - "Fill password field with {{TEST_PASSWORD}}"  
  - "Click login button"
  - "Verify page displays Swag Labs"

Write once, use everywhere. No more copy-paste madness.

2. Environment Variable Magic

Different environments? No problem:

# .env.dev
BASE_URL=https://dev.example.com
TEST_USERNAME=dev_user

# .env.prod  
BASE_URL=https://example.com
TEST_USERNAME=prod_user

Same tests, different environments. Automatically.

3. Intelligent Tag Filtering

Run exactly what you need:

# Run only smoke tests
/run-yaml-test tags:smoke

# Run order AND checkout tests  
/run-yaml-test tags:order,checkout

# Run smoke OR critical tests
/run-yaml-test tags:smoke|critical

No more running the entire suite when you only changed the login flow.

4. Smart Reporting

Automatically generated HTML reports with:

  • ✅ Step-by-step execution details
  • ✅ Environment configuration
  • ✅ Screenshots and artifacts
  • ✅ Success/failure statistics

Real-World Impact: A Case Study

Before YAML testing:

  • 📊 2,000+ lines of Playwright JavaScript
  • ⏱️ 3 days to onboard new QA team members
  • 🐛 15+ test failures per environment change
  • 👥 Only 3 developers could modify tests

After YAML testing:

  • 📊 200 lines of readable YAML
  • ⏱️ 30 minutes to onboard new team members
  • 🐛 0 test failures during environment changes
  • 👥 Entire team can write and modify tests

Why This Matters for Your Team

For Developers:

  • Less time writing boilerplate, more time building features
  • Tests that actually document your application's behavior
  • No more "let me just quickly fix this test" rabbit holes

For QA Engineers:

  • Focus on test strategy, not JavaScript syntax
  • Rapid test creation and modification
  • Clear visibility into test coverage

For Product Managers:

  • Tests that read like acceptance criteria
  • Easy to verify that tests match requirements
  • Confidence that important flows are covered

For DevOps:

  • Predictable test execution across environments
  • Clear failure reporting and debugging
  • Easy integration with CI/CD pipelines

Technical Architecture: How It Works

This YAML Playwright testing framework is specifically designed for Claude Code and Playwright MCP. The framework consists of several key components:

Claude Code Integration

  • AI-Powered Execution: Claude Code's AI interprets natural language test steps and converts them to Playwright actions
  • Smart Step Recognition: Advanced understanding of testing intent from plain English descriptions
  • Context Awareness: Maintains context across test steps for more intelligent automation

Playwright MCP Foundation

  • Browser Automation: Leverages Playwright MCP for reliable cross-browser testing
  • Element Detection: Intelligent element finding and interaction
  • Screenshot & Reporting: Built-in capture and documentation capabilities

Multi-Environment Configuration

├── .env.dev          # Development environment
├── .env.test         # Test environment  
├── .env.prod         # Production environment

Reusable Step Libraries

├── steps/
│   ├── login.yml     # Authentication flows
│   ├── cleanup.yml   # Cleanup procedures
│   └── navigation.yml # Common navigation

Test Cases with Natural Language

├── test-cases/
│   ├── order.yml     # E-commerce order flow
│   ├── user.yml      # User management
│   └── search.yml    # Search functionality

Intelligent Execution Engine

The framework automatically:

  1. Loads environment-specific configuration
  2. Expands include references from step libraries
  3. Substitutes environment variables ({{BASE_URL}})
  4. Executes tests using Playwright MCP
  5. Generates comprehensive reports

Getting Started: Your First YAML Test

The beauty of YAML-based testing is its simplicity. Here's how to get started:

1. Prerequisites

# Install Claude Code (if not already installed)
# Follow instructions at: https://claude.ai/code

# Install Playwright MCP for Claude Code
claude mcp add playwright -- npx -y @playwright/mcp@latest

# Clone the YAML testing framework
git clone https://github.com/terryso/claude-code-playwright-mcp-test.git
cd claude-code-playwright-mcp-test

2. Project Structure

your-project/
├── .env.dev              # Environment config
├── steps/               # Reusable step libraries
├── test-cases/          # Your test cases
├── screenshots/         # Test artifacts
└── reports/            # Generated reports

3. Write Your First Test

# test-cases/login.yml
tags:
  - smoke
  - auth

steps:
  - "Open {{BASE_URL}} page"
  - "Fill username with {{TEST_USERNAME}}"
  - "Fill password with {{TEST_PASSWORD}}"
  - "Click login button"
  - "Verify successful login"

4. Execute and Iterate

# In Claude Code, use the built-in commands
/run-yaml-test file:test-cases/login.yml env:dev

# Or run with tag filtering
/run-yaml-test tags:smoke env:dev

Within hours, you'll have tests that are more maintainable than anything you've written before. The magic happens through Claude Code's AI understanding your natural language steps and Playwright MCP executing them as browser actions.

Advanced Features

Complex Tag Filtering

# Multiple conditions
/run-yaml-test tags:smoke,login|critical

# Environment-specific execution
/run-yaml-test tags:order env:prod

Dynamic Step Parameters

steps:
  - "Add product {{PRODUCT_NAME}} to cart"
  - "Set quantity to {{QUANTITY}}"
  - "Apply discount code {{DISCOUNT_CODE}}"

Comprehensive Reporting

  • HTML Reports: Beautiful, interactive test reports
  • JSON/XML Output: For CI/CD integration
  • Screenshot Capture: Automatic failure documentation
  • Performance Metrics: Execution timing and statistics

The Future is Readable

We're moving toward a world where:

  • Tests are documentation that executes
  • Anyone can contribute to test automation
  • Maintenance is a joy, not a chore
  • Environments are just configuration

YAML-based Playwright testing isn't just a tool — it's a philosophy. It's the belief that tests should be clear, maintainable, and accessible to everyone on the team.

Common Questions Answered

Q: How does this compare to existing solutions like Cucumber?
A: While Cucumber requires learning Gherkin syntax and step definitions, this YAML testing framework uses natural language directly with Claude Code's AI interpreting the intent. No step definition mapping needed - Claude Code understands what you want to do.

Q: What about test debugging?
A: Claude Code provides detailed execution logs, Playwright MCP captures screenshots on failure, and you get clear error messages that map back to your YAML steps. The AI context helps identify issues quickly.

Q: Can I integrate this with CI/CD?
A: Absolutely. The framework generates standard exit codes and multiple report formats (HTML, JSON, XML) for seamless CI/CD integration.

Q: How do you handle complex assertions?
A: Claude Code's AI makes natural language assertions surprisingly powerful: "Verify page contains 'Thank you'", "Verify cart total equals $43.18", "Verify 2 items in cart". The AI understands context and intent.

Take Action Today

The question isn't whether this approach is better. The question is: How much time are you willing to waste on brittle, complex tests?

Start your YAML testing journey:

  1. Get Claude Code: Install Claude Code and Playwright MCP
  2. Try the demo: Clone the project from https://github.com/terryso/claude-code-playwright-mcp-test and run your first YAML test
  3. Convert one test: Take your most complex Playwright test and rewrite it in YAML
  4. Share with your team: Show them how readable tests can be
  5. Scale gradually: Convert more tests as you see the benefits

Ready to transform your testing workflow with Claude Code and Playwright MCP? The future of test automation is readable, maintainable, and accessible to everyone.

🔗 Get Started: https://github.com/terryso/claude-code-playwright-mcp-test

What's your biggest pain point with current Playwright tests? How would YAML-based testing with Claude Code solve it for your team?


公众号原文

Prev
Page 2 of 2