The Agent Skills Directory
npx skills add https://smithery.ai/skills/warrenzhu050413/planning-html创建清晰、可执行的技术实施方案,并在展示前进行强制性的质量审查。
在采取任何行动之前,务必先制定一个全面的计划。
最佳实践:
必须包含:
示例:
🏗️ 系统架构概述
[Mermaid 流程图在此]
**系统摘要**:一个 Chrome 扩展程序,使用 Shadow DOM 隔离和 chrome.storage 进行跨上下文状态管理,捕获网页元素并将其保存到持久画布。
**关键组件**:
- 后台工作线程(service worker,管理存储)
- 内容脚本(注入到页面中,捕获元素)
- 画布 UI(React 应用,显示保存的元素)
- 存储层(chrome.storage.local,单一数据源)
**数据流**:用户触发捕获 → 内容脚本提取元素 → 后台工作线程持久化到存储 → 画布 UI 响应存储变化 → UI 更新
必须包含:
步骤格式示例:
<li>
<strong>步骤 3:</strong> 创建 <code>src/content/ElementSelector.tsx</code> - 用于悬停覆盖层的 React 组件
<div class="indent-1">
<strong>关键函数</strong>:
- <code>handleMouseMove(e)</code>: 根据光标更新覆盖层位置
- <code>handleClick(e)</code>: 捕获元素 HTML 和元数据
- <code>injectStyles()</code>: 向 Shadow DOM 添加样式
</div>
<div class="indent-1 muted">
文件: src/content/ElementSelector.tsx
</div>
<div class="tech-note">
<strong>技术说明:</strong> 使用 z-index: 2147483647 的绝对定位,确保覆盖层显示在所有页面内容之上。将样式注入 Shadow DOM 以防止页面 CSS 冲突。
</div>
</li>
关键:在审查完成之前,不要编写 HTML。
mcp__codex__codex({
prompt: `审查以下技术实施方案并提供关键分析:
[计划摘要 - 包含关键部分:概述、执行摘要、实施步骤]
分析:
1. **技术准确性**:提议的解决方案在技术上是否合理?
- 检查 API 误用、错误算法、架构反模式
2. **实施完整性**:是否有遗漏的步骤或边界情况?
- 寻找未声明的假设、缺失的错误处理、不完整的工作流
3. **架构**:这是否是最佳的架构选择?
- 考虑可扩展性、可维护性、可测试性的权衡
4. **安全考虑**:方法是否存在安全问题?
- 检查注入漏洞、认证缺口、数据暴露
5. **代码质量**:审查代码片段以检查正确性和最佳实践
- 检查语法、惯用法、性能影响
6. **测试策略**:测试方法是否足够全面?
- 验证对正常路径、边界情况、错误条件的测试覆盖
7. **风险评估**:最大的风险是什么?
- 识别阻碍因素、性能瓶颈、用户影响
提供具体、可执行的改进建议。`,
cwd: "[当前工作目录]",
});
Task({
subagent_type: "general-purpose",
description: "审查并评论计划",
prompt: `审查以下技术实施方案:
[计划摘要]
提供:
1. **优势**:考虑周全的方面
2. **潜在问题**:遗漏的问题或边界情况
3. **建议**:如何改进计划
4. **风险评估**:最大的技术风险
5. **替代方案**:完成此任务的更好方法
保持批判性。寻找:
- 缺失的错误处理
- 被忽视的依赖项
- 性能/可扩展性问题
- 安全漏洞
- 测试缺口
- 不明确的技术规范`,
});
// 检查 Codex MCP 是否可用
if (typeof mcp__codex__codex === 'function') {
// 使用 Codex MCP 审查(首选,技术准确性更高)
await mcp__codex__codex({...});
} else {
// 回退到任务代理
await Task({subagent_type: "general-purpose", ...});
}
关键:使用位于 ${CLAUDE_PLUGIN_ROOT}/templates/html/plan-template.html 的计划模板
{{TITLE}}<!-- ===== 内容放在这里 ===== --> 处填充内容claude_html/ 并打开mkdir -p claude_htmlclaude_html/plan_[任务描述].htmlopen claude_html/plan_[任务描述].html用户请求
→ 起草计划(内存中,包含图表)
→ 审查(Codex MCP 或任务代理)
→ 整合反馈
→ 读取计划模板
→ 编写 HTML
→ 打开文件
→ 用户审查
→ 用户批准
→ 执行
每周安装次数
–
来源
首次出现
–
Create clear, actionable technical execution plans with mandatory quality review before display.
ALWAYS create a comprehensive plan BEFORE taking any action.
Best Practices:
Must include :
Example :
🏗️ System Architecture Overview
[Mermaid Flowchart Here]
**System Summary**: Chrome extension that captures webpage elements and saves them to a persistent canvas using Shadow DOM isolation and chrome.storage for cross-context state management.
**Key Components**:
- Background Worker (service worker, manages storage)
- Content Script (injected into pages, captures elements)
- Canvas UI (React app, displays saved elements)
- Storage Layer (chrome.storage.local, source of truth)
**Data Flow**: User triggers capture → Content script extracts element → Background worker persists to storage → Canvas UI reacts to storage change → UI updates
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Must include :
Example Step Format :
<li>
<strong>Step 3:</strong> Create <code>src/content/ElementSelector.tsx</code> - React component for hover overlay
<div class="indent-1">
<strong>Key functions</strong>:
- <code>handleMouseMove(e)</code>: Update overlay position based on cursor
- <code>handleClick(e)</code>: Capture element HTML and metadata
- <code>injectStyles()</code>: Add styles to Shadow DOM
</div>
<div class="indent-1 muted">
File: src/content/ElementSelector.tsx
</div>
<div class="tech-note">
<strong>Technical Note:</strong> Use absolute positioning with z-index: 2147483647 to ensure overlay appears above all page content. Inject styles into Shadow DOM to prevent page CSS conflicts.
</div>
</li>
CRITICAL : Do NOT write HTML until AFTER review.
mcp__codex__codex({
prompt: `Review the following technical implementation plan and provide critical analysis:
[PLAN SUMMARY - Include key sections: Overview, Executive Summary, Implementation Steps]
Analyze:
1. **Technical Accuracy**: Are the proposed solutions technically sound?
- Check for API misuse, incorrect algorithms, architecture anti-patterns
2. **Implementation Completeness**: Are there missing steps or edge cases?
- Look for unstated assumptions, missing error handling, incomplete workflows
3. **Architecture**: Is this the best architectural choice?
- Consider scalability, maintainability, testability tradeoffs
4. **Security Considerations**: Any security issues with the approach?
- Check for injection vulnerabilities, authentication gaps, data exposure
5. **Code Quality**: Review code snippets for correctness and best practices
- Check syntax, idioms, performance implications
6. **Testing Strategy**: Is the testing approach comprehensive enough?
- Verify test coverage of happy path, edge cases, error conditions
7. **Risk Assessment**: What are the biggest risks?
- Identify show-stoppers, performance bottlenecks, user impact
Provide specific, actionable recommendations for improvement.`,
cwd: "[current working directory]",
});
Task({
subagent_type: "general-purpose",
description: "Review and critique plan",
prompt: `Review the following technical implementation plan:
[PLAN SUMMARY]
Provide:
1. **Strengths**: Well-thought-out aspects
2. **Potential Issues**: Problems or edge cases missed
3. **Suggestions**: How to improve the plan
4. **Risk Assessment**: Biggest technical risks
5. **Alternative Approaches**: Better ways to accomplish this
Be critical. Look for:
- Missing error handling
- Overlooked dependencies
- Performance/scalability concerns
- Security vulnerabilities
- Testing gaps
- Unclear technical specifications`,
});
// Check if Codex MCP is available
if (typeof mcp__codex__codex === 'function') {
// Use Codex MCP review (preferred for technical accuracy)
await mcp__codex__codex({...});
} else {
// Fallback to Task agent
await Task({subagent_type: "general-purpose", ...});
}
CRITICAL : Use plan template at ${CLAUDE_PLUGIN_ROOT}/templates/html/plan-template.html
{{TITLE}}<!-- ===== CONTENT GOES HERE ===== -->claude_html/ and openmkdir -p claude_htmlclaude_html/plan_[task_description].htmlopen claude_html/plan_[task_description].htmlUser Request
→ Draft Plan (memory, with diagram)
→ Review (Codex MCP or Task agent)
→ Incorporate Feedback
→ Read Plan Template
→ Write HTML
→ Open File
→ User Reviews
→ User Approves
→ Execute
Weekly Installs
–
Source
First Seen
–
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装