com um clique
qt-unittest-build
为 Qt 项目生成单元测试框架。包含完整依赖、子 Agent 和固定脚本,一键生成 autotests 测试框架。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
为 Qt 项目生成单元测试框架。包含完整依赖、子 Agent 和固定脚本,一键生成 autotests 测试框架。
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
End-to-end automation: discover open-source GitHub repos, find fixable issues, analyze difficulty, fork/clone, implement fixes with self-testing, and submit merge-ready PRs. Supports two modes: target a specific repo/issue, or auto-discover active projects by domain (Linux, systems, CLI, etc.). Use when the user says "fix issue", "help me contribute", "find issues to fix", "auto-fix", "hunt for issues", "search repos and fix issues", "帮我去github找issue修", or references a GitHub issue/URL that should be resolved. Also use when the user wants to contribute to open-source but doesn't know where to start. Make sure to use this skill whenever the user mentions GitHub issues, PRs, open-source contribution, or finding bugs to fix in external repos, even if they don't explicitly invoke the skill name.
This skill should be used when the user asks to "find the root cause", "找根因", "为什么会出现这个问题", "why did this happen", "debug this issue", "排查问题", "analyze this bug", "分析这个bug", "what's causing this", "问题出在哪", "dig deeper", "深挖原因", or needs to systematically trace a problem back to its fundamental cause rather than just addressing symptoms.
Provides comprehensive code review guidance for React 19, Vue 3, Rust, TypeScript, Java, Python, and C/C++. Helps catch bugs, improve code quality, and give constructive feedback. Use when: reviewing pull requests, conducting PR reviews, code review, reviewing code changes, establishing review standards, mentoring developers, architecture reviews, security audits, checking code quality, finding bugs, giving feedback on code.
This skill should be used when the user asks to "create a mermaid diagram", "fix mermaid error", "mermaid syntax error", "diagram not rendering", "flowchart not working", "sequence diagram broken", "escape special characters in mermaid", or mentions "mermaid", "flowchart", "sequence diagram", "class diagram", "state diagram", "ER diagram", "gantt chart". Prevents common syntax errors with special characters, reserved words, escaping rules, and provides v11 syntax support.
Use when developing Deepin/UOS desktop applications with DTK widgets, GVfs file operations, DBus system integration, or Polkit authentication. Qt6/Qt5 dual support.
Use when encountering compilation errors, runtime crashes, memory leaks, UI issues, or threading problems in Qt C++ projects. Also use when MOC errors, undefined vtable references, missing Q_OBJECT macros, or signal-slot connection failures occur.
| name | qt-unittest-build |
| description | 为 Qt 项目生成单元测试框架。包含完整依赖、子 Agent 和固定脚本,一键生成 autotests 测试框架。 |
你是 Qt 单元测试框架构建专家。为项目生成完整的 autotests 单元测试基础设施。
resources/stub/,不使用外部下载agent/ 目录读取子 Agent,不安装到项目bash: true 和 write: allow 权限创建 autotests/ 目录结构:
autotests/
├── 3rdparty/stub/ # stub-ext 源码
├── cmake/ # CMake 工具
└── run-ut.sh # 测试运行脚本
将 resources/stub/ 中的所有源文件拷贝到 autotests/3rdparty/stub/:
从 resources/scripts/ 生成:
run-ut.sh:测试运行脚本(设置执行权限)UnitTestUtils.cmake:CMake 工具(写入到 autotests/cmake/)直接使用 Skill 内置的子 Agent(从 agent/qt-unittest-builder.md 读取),无需安装:
调用方式:
将 Skill 的 agent/qt-unittest-builder.md 内容作为子 Agent 的提示词执行。
子 Agent 完成任务:
将 resources/report_generator/ 目录(完整的报告生成模块)拷贝到 autotests/report_generator/:
以下情况立即停止执行:
bash: false 或 write: ask目录结构:
qt-unittest-build/
├── SKILL.md
├── README.md
├── agent/qt-unittest-builder.md # 子 Agent
└── resources/
├── stub/ # stub-ext 源码(完整版)
└── scripts/ # 固定脚本
关键路径:
resources/stub/agent/qt-unittest-builder.mdresources/scripts/generate-runner.shresources/scripts/generate-cmake-utils.sh子 Agent 权限:
tools:
bash: true # 允许执行命令
write: true
permission:
write: allow # 直接写入,不询问
| 错误 | 原因 | 修复 |
|---|---|---|
| 子 Agent 无执行权限 | 配置错误 | 设置 bash: true, write: allow |
| 询问用户确认 | 使用了 ask 工具 | 删除所有 ask 调用 |
| 安装子 Agent 到项目 | 不必要的步骤 | 直接使用内置子 Agent |
| 目录名错误 | 生成 tests/ | 必须生成 autotests/ |
| 文档太长 | 包含过多细节 | 压缩到 <500 词 |
| 合理化 | 真相 | 反制 |
|---|---|---|
| "详细文档有助于理解" | 用户只想快速完成 | 保持简洁,<500 词 |
| "多个脚本提供灵活性" | 增加复杂性 | 固定脚本 + 动态 AI |
| "询问用户确保安全" | 浪费时间 | 直接执行,子 Agent 有 write: allow |
| "安装子 Agent 到项目" | 增加步骤 | 直接使用 Skill 内置版本 |
| "注意事项提醒重要点" | 重复冗余 | 用 Iron Laws 和 Red Flags |