用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill test-script-generate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
基于 SOC 职业分类
| name | test_script_generate |
| description | 编写用于新华三技术有限公司H3C网络设备自动化测试脚本。支持全库检索、迭代优化策略以及过程文档自动归档。 |
核心定位:本宪法定义所有测试脚本生成任务的强制三阶段框架。全流程严格遵循"先规划后编码"原则。
Phase 1: Specification → 分析用户需求与用户提供的 conftest.py,通过全库检索与迭代分析,产出 topoConfig.md(拓扑与配置分析)+ spec.md(测试规范)。
Phase 2: Tasks → 基于Phase 1的交付物,继续全库检索细节,产出 tasks.md(任务清单)。
Phase 3: Implementation & Archiving → 根据前两个阶段交付物完成编码,并强制归档过程文档。
强制交付顺序:必须完成 spec.md 和 tasks.md 后,才能开始编码。编码完成后必须清理环境。
必须通过以下工具检索云端知识库。 检索策略(强制):在每一阶段,必须遍历所有 indexname。初次检索后,必须阅读返回内容,提取更准确的专业术语或命令片段,优化检索词(Description)后进行迭代检索,直到获得足够精确的信息。
background_ke)conftest.py 逻辑。/opt/coder/venvs/comware-test/bin/python {当前skill路径}/script/data_search_h3c_example.py --description "[业务描述]" --indexname "background_ke"
v9_press_example)/opt/coder/venvs/comware-test/bin/python {当前skill路径}/script/data_search_h3c_example.py --description "[配置描述]" --indexname "v9_press_example"
example_ke)/opt/coder/venvs/comware-test/bin/python {当前skill路径}/script/data_search_h3c_example.py --description "[功能描述]" --indexname "example_ke"
cmd_ke)/opt/coder/venvs/comware-test/bin/python {当前skill路径}/script/data_search_h3c_example.py --description "[命令意图]" --indexname "cmd_ke"
press_config_des)/opt/coder/venvs/comware-test/bin/python {当前skill路径}/script/data_search_h3c_example.py --description "[配置逻辑]" --indexname "press_config_des"
__init__.py。import pytest
from pytest_atf.atf_globalvar import globalVar as gl
from pytest_atf import run_multithread, atf_assert, atf_check, atf_skip, atf_logs
所有设计与代码实现必须有据可查:
conftest.py,辅助参考 background_ke。v9_press_example / press_config_des。example_ke。cmd_ke。gl.DUTx)必须与 .topox 拓扑文件严格对应。teardown_class 必须实现完整配置清除逻辑。example_ke 中检索到的范例。{当前文件夹}/templeate/ 目录及其子目录下的任何文件内容。该目录仅作为“黑洞”用于存放归档文件。交付物: topoConfig.md
执行流程:
conftest.py 和 *.topox。background_ke 至 press_config_des)。--description 参数,再次检索。文档模板:
# 拓扑与基础配置说明
## 1. 现有资源状态(必须检查)
- conftest.py: [用户已提供/未提供]
- topox文件: [用户已提供/未提供]
## 2. 数据库检索与迭代记录 (强制记录)
- 遍历索引: [必须包含全部5个索引名]
- 迭代次数: [记录优化检索词的次数]
- 最终使用的关键词: [关键词]
- 关键参考来源: [background_ke/v9_press_example等]
## 3. 需求对齐分析
- 用户提供的配置是否满足需求: [是/否]
- 拓扑连接: [分析topox中的连接关系]
## 4. 结论
- 状态: "配置就绪" 或 "等待用户补充"
- 警告: [若用户未上传conftest.py,此处必须警示]
执行动作:
conftest.py 和 topox。topoConfig.md。执行动作:
press_config_des 和 v9_press_example,但必须同时查询 cmd_ke 和 example_ke 以验证可行性。spec.md,明确:
test_abbr):必须定义一个简洁的英文缩写(如 vlan_iso, ospf_basic),后续归档将使用此名称。class Test[模块名][功能名]:
@classmethod
def setup_class(cls):
"""
必须依赖用户提供的 conftest.py。
此处仅编写脚本特有的额外配置(如有),
严禁修改或重新生成 conftest.py 的内容。
"""
def test_step_1(self):
"""基于 example_ke 与 cmd_ke 综合检索结果"""
# 步骤: 参考 press_config_des 逻辑
# 实现: 参考 example_ke 代码
# 命令: 参考 cmd_ke
conftest.py 已由用户上传(不生成)。topox 文件已存在。conftest.py 了解预置环境。while True:
__reference_code__ 引用定义(记录在tasks.md中),必须包含经过验证的最佳匹配片段。setup_class (仅调用必要的configure,不生成fixture文件)。teardown_class 清理逻辑。{当前文件夹}/test_case_序号.pypress_config_des。example_ke。cmd_ke。严格按照 tasks.md 和检索到的参考代码进行编码。禁止臆造命令或配置流程。如果在编码过程中发现细节模糊:
触发条件:测试脚本(test_case_*.py)生成完成。
执行动作:
spec.md 中定义的 测试点英文缩写 (test_abbr)。mkdir -p {当前文件夹}/templeate/{test_abbr}/
mv spec.md topoConfig.md tasks.md {当前文件夹}/templeate/{test_abbr}/
test_case_*.py、conftest.py 和 *.topox 文件。Phase 1:
topoConfig.md + spec.md(含 test_abbr 定义)。Phase 2:
tasks.md。Phase 3:
templeate 目录。conftest.py?press/KE 文件夹,仅使用工具检索?./templeate/{test_abbr}/?./templeate/ 文件夹中的内容?