Vibe Coding Rules · AI编程纪律
下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/org-121tp3g2--vibe-coding-rules.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @org-121tp3g2/vibe-coding-rules。- 🧠 AI 写代码最大的敌人,是它自己——今天修好的 Bug,明天照样犯。 Vibe Coding Rules V2.5 是给 AI 装上的"
- 编程纪律外骨骼"
- :6 个自我进化的 Skill 组成一条完整流水线——改前五大原则自查 → 终端安全执行 → 改后 28 条规则逐项扫描 → Playwright 自动化回归测试 → 变更日志自动归档。每一步自动触发,一条龙闭环。 🍞 面包屑系统(独家):每次改代码,文件头部自动播下导航标记——耦合文件在哪、历史坑位在哪、设计文档在哪——下次 AI 打开同一个文件,秒懂上下…
- s worst enemy is itself—it forgets the bugs it fixed yesterday. Vibe Coding Rules V2.5 is a discipline exoskeleton for your AI coding agent. 6 self-evolving Skills in one pipeline:…
- Play: Download → Unzip → Install to your AI agent. Works with CodeBuddy / Cursor / Windsurf. Open source Apache 2.0. Free for commercial use.
阅读全文 (展开查看完整说明)
概述
Web Automated Testing
Overview
Automated browser testing Skill. Uses Playwright for browser interaction and DOM assertions, tesseract.js for OCR screenshot text verification.
Trigger Conditions
- After code change self-check passes
- User asks to "test", "verify page"
- Need to confirm UI rendering correctness
- Screenshot regression testing
Configuration (read from pipeline.json)
| Parameter | Purpose | Example |
|---|---|---|
{{pipeline.project.testUrl}} | Test target URL | http://localhost:3000 |
{{pipeline.project.testPagePath}} | Test page path | / |
{{pipeline.paths.tests}} | Test script directory | tests/auto/ |
Test Types
1. Smoke Test (fast, always run)
- Page loads successfully
- Key DOM elements exist
- No JS runtime errors
2. Full Test (after major changes)
- All interaction flows
- Form submissions
- Modal/overlay open/close
- Async data loading
- Screenshot comparison
3. OCR Verification (optional, requires tesseract.js)
- Screenshot text recognition
- Key copy verification
- Multi-language support
Workflow
Step 1: Prepare
Check test dependencies installed:
npx playwright install chromiumStep 2: Create Test Script
Write test cases to {{pipeline.paths.tests}}smoke-test.cjs:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('{{pipeline.project.testUrl}}{{pipeline.project.testPagePath}}');
await page.waitForLoadState('networkidle');
// DOM assertions
const el = await page.$('{{pipeline.testing.domSelectors.mainContainer}}');
if (!el) { console.error('FAIL: Main container not found'); process.exit(1); }
console.log('OK: Page loaded successfully');
await browser.close();
})().catch(e => { console.error('FAIL:', e.message); process.exit(1); });Step 3: Execute
node {{pipeline.paths.tests}}smoke-test.cjsStep 4: Report
Report test results: pass count / fail count, failed item screenshots and reasons.
Dependencies
npm install playwright
npx playwright install chromium
# OCR (optional)
npm install tesseract.js sharp