重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
ln-523-auto-test-planner by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-523-auto-test-planner路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位此 SKILL.md 文件所在目录并向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
基于风险导向测试方法和真实的手动测试结果,为 Story 创建包含全面自动化测试覆盖(E2E/集成/单元)的测试任务。
| 输入 | 必填 | 来源 | 描述 |
|---|---|---|---|
storyId |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 是 |
| args, git branch, kanban, user |
| 要处理的 Story |
解析方式: Story 解析链。状态过滤器: To Review
自动化: 支持 autoApprove: true(当由 ln-520 调用时默认启用)以跳过手动确认。
必须阅读: 加载 shared/references/tools_config_guide.md、shared/references/storage_mode_detection.md 和 shared/references/input_resolution_pattern.md
提取:task_provider = 任务管理 → 提供者(linear | file)。
docs/tasks/kanban_board.md 自动发现团队 ID(参见 CLAUDE.md 中的“配置自动发现”)步骤 0:研究项目测试文件
步骤 1:加载研究和手动测试结果
task_provider = linear:get_issue(storyId) — 提取 Story.id(UUID,不是短 ID)
* 如果 task_provider = file:Read story.md — 提取 Story 元数据task_provider = linear:list_comments(issueId=storyId) → 查找匹配的评论
* 如果 task_provider = file:Glob("docs/tasks/epics/*/stories/*/comments/*.md") → 查找匹配的评论
* 如果未找到研究评论:基于 Story 验收标准和任务描述生成 3-5 个关键测试领域的要点(内联,无外部研究)。步骤 2:分析 Story + 任务
task_provider = linear:list_issues(parentId=Story.id, state="Done")
* 如果 task_provider = file:Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → 按 **Status:** Done 过滤处理过程: 定位带有“Manual Testing Results”标题的 Linear 评论 -> 验证格式版本 1.0 -> 使用正则表达式提取结构化部分(验收标准、按验收标准的测试结果、边界情况、错误处理、集成测试)-> 验证(至少 1 个通过的验收标准,验收标准数量与 Story 匹配,完整性检查)-> 将解析的数据映射到测试设计结构
错误处理: 缺少评论 -> 使用回退方案(内联研究或根据阶段 2 逻辑跳过),缺少格式版本 -> 警告(尝试旧版解析),缺少必需部分 -> 使用回退方案,没有通过的验收标准 -> 错误(修复实现)
必须阅读: 加载 shared/references/risk_based_testing_guide.md 以获取完整的方法论。
E2E 优先方法: 按业务风险(优先级 = 影响 x 概率)而非覆盖率指标来确定优先级。
工作流程:
步骤 1:风险评估
为手动测试中的每个场景计算优先级:
优先级 = 业务影响 (1-5) x 概率 (1-5)
决策标准:
步骤 2:E2E 测试选择(2-5 个): 基线 2 个(正向 + 负向)始终包含 + 0-3 个额外测试(仅限优先级 ≥15)
步骤 3:单元测试选择(0-15 个): 默认 0。仅为复杂的业务逻辑(优先级 ≥15)添加:金融、安全、算法
步骤 4:集成测试选择: 默认 0。仅在存在 E2E 覆盖缺口且优先级 ≥15 时添加:回滚、并发、外部 API 错误
步骤 5:验证: 每个测试都通过有用性标准(优先级 ≥15,置信度投资回报率,行为性,预测性,具体性,非重复性)
根据 test_task_template.md 生成完整的测试任务(11 个部分):
第 1-7 部分: 上下文、风险矩阵、E2E/集成/单元测试(包含优先级评分 + 理由)、覆盖率、完成定义
第 8 部分: 需要修复的现有测试(分析实现任务中受影响的测试)
第 9 部分: 基础设施变更(包、Docker、配置 - 基于测试依赖项)
第 10 部分: 文档更新(README、CHANGELOG、tests/README、配置文档)
第 11 部分: 遗留代码清理(已弃用的模式、向后兼容性、死代码)
显示预览以供审核。
步骤 1: 预览生成的测试计划(始终显示以确保透明度)
步骤 2: 确认逻辑:
步骤 3: 检查是否存在现有的测试任务
task_provider = linear:list_issues(parentId=Story.id, label="tests")task_provider = file:Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → 按 **Labels:** 包含 tests 进行过滤决策:
步骤 4a:创建模式(如果数量 = 0)
调用 ln-301-task-creator 工作器,并设置 taskType: "test"
传递给工作器:
工作器返回: 任务 URL + 摘要
步骤 4b:重新规划模式(如果数量 >= 1)
调用 ln-302-task-replanner 工作器,并设置 taskType: "test"
传递给工作器:
工作器返回: 操作摘要 + 警告
步骤 5: 将摘要返回给编排器(ln-520)
研究和手动结果已加载:
基于风险的测试计划已生成:
测试任务描述完整(11 个部分):
工作器委托已执行:
输出:
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/risk_based_testing_guide.mdshared/references/auto_discovery_pattern.mdshared/templates/test_task_template.md(工作器 ln-301/ln-302 通过模板加载加载)references/risk_based_testing_examples.mdshared/references/research_tool_fallback.md最小可行测试: 从基线 E2E(正向 + 负向)开始。每个额外的测试必须通过全部 6 个有用性标准。
基于风险的测试: 按业务影响 x 概率确定优先级。基于实际的手动测试结果,E2E 优先。优先级 ≥15 的场景由测试覆盖。
基于预期的测试: 对于确定性测试,使用 diff 比较实际结果与预期结果。必须阅读: 加载 ../ln-522-manual-tester/SKILL.md — “测试设计原则”部分。
版本: 1.0.0 最后更新: 2026-01-15
每周安装次数
137
仓库
GitHub 星标数
253
首次出现
2026年2月11日
安全审计
安装于
cursor129
opencode128
gemini-cli127
codex127
github-copilot127
claude-code126
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Creates Story test task with comprehensive automated test coverage (E2E/Integration/Unit) based on Risk-Based Testing methodology and REAL manual testing results.
| Input | Required | Source | Description |
|---|---|---|---|
storyId | Yes | args, git branch, kanban, user | Story to process |
Resolution: Story Resolution Chain. Status filter: To Review
Automation: Supports autoApprove: true (default when invoked by ln-520) to skip manual confirmation.
MANDATORY READ: Load shared/references/tools_config_guide.md, shared/references/storage_mode_detection.md, and shared/references/input_resolution_pattern.md
Extract: task_provider = Task Management → Provider (linear | file).
docs/tasks/kanban_board.md (see CLAUDE.md "Configuration Auto-Discovery")Step 0: Study Project Test Files
Step 1: Load Research and Manual Test Results
task_provider = linear: get_issue(storyId) — extract Story.id (UUID, NOT short ID)task_provider = file: Read story.md — extract Story metadatatask_provider = linear: list_comments(issueId=storyId) → find matching commentStep 2: Analyze Story + Tasks
task_provider = linear: list_issues(parentId=Story.id, state="Done")task_provider = file: Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → filter by **Status:** DoneProcess: Locate Linear comment with "Manual Testing Results" header -> Verify Format Version 1.0 -> Extract structured sections (Acceptance Criteria, Test Results by AC, Edge Cases, Error Handling, Integration Testing) using regex -> Validate (at least 1 PASSED AC, AC count matches Story, completeness check) -> Map parsed data to test design structure
Error Handling: Missing comment -> use fallback (inline research or skip per Phase 2 logic), Missing format version -> WARNING (try legacy parsing), Required section missing -> use fallback, No PASSED AC -> ERROR (fix implementation)
MANDATORY READ: Load shared/references/risk_based_testing_guide.md for complete methodology.
E2E-First Approach: Prioritize by business risk (Priority = Impact x Probability), not coverage metrics.
Workflow:
Step 1: Risk Assessment
Calculate Priority for each scenario from manual testing:
Priority = Business Impact (1-5) x Probability (1-5)
Decision Criteria:
Step 2: E2E Test Selection (2-5): Baseline 2 (positive + negative) ALWAYS + 0-3 additional (Priority ≥15 only)
Step 3: Unit Test Selection (0-15): DEFAULT 0. Add ONLY for complex business logic (Priority ≥15): financial, security, algorithms
Step 4: Integration Test Selection: DEFAULT 0. Add ONLY if E2E gaps AND Priority ≥15: rollback, concurrency, external API errors
Step 5: Validation: Each test passes Usefulness Criteria (Priority ≥15, Confidence ROI, Behavioral, Predictive, Specific, Non-Duplicative)
Generates complete test task per test_task_template.md (11 sections):
Sections 1-7: Context, Risk Matrix, E2E/Integration/Unit Tests (with Priority scores + justifications), Coverage, DoD
Section 8: Existing Tests to Fix (analysis of affected tests from implementation tasks)
Section 9: Infrastructure Changes (packages, Docker, configs - based on test dependencies)
Section 10: Documentation Updates (README, CHANGELOG, tests/README, config docs)
Section 11: Legacy Code Cleanup (deprecated patterns, backward compat, dead code)
Shows preview for review.
Step 1: Preview generated test plan (always displayed for transparency)
Step 2: Confirmation logic:
Step 3: Check for existing test task
task_provider = linear: list_issues(parentId=Story.id, label="tests")task_provider = file: Glob("docs/tasks/epics/*/stories/*/tasks/*.md") → filter by **Labels:** containing testsDecision:
Step 4a: CREATE MODE (if Count = 0)
Invoke ln-301-task-creator worker with taskType: "test"
Pass to worker:
Worker returns: Task URL + summary
Step 4b: REPLAN MODE (if Count >= 1)
Invoke ln-302-task-replanner worker with taskType: "test"
Pass to worker:
Worker returns: Operations summary + warnings
Step 5: Return summary to orchestrator (ln-520)
Research and Manual Results Loaded:
Risk-Based Test Plan Generated:
Test Task Description Complete (11 sections):
Worker Delegation Executed:
Output:
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/risk_based_testing_guide.mdshared/references/auto_discovery_pattern.mdshared/templates/test_task_template.md (workers ln-301/ln-302 load via Template Loading)references/risk_based_testing_examples.mdshared/references/research_tool_fallback.mdMinimum Viable Testing: Start with baseline E2E (positive + negative). Each additional test must pass all 6 Usefulness Criteria.
Risk-Based Testing: Prioritize by Business Impact x Probability. E2E-first from ACTUAL manual testing results. Priority ≥15 scenarios covered by tests.
Expected-Based Testing: For deterministic tests, compare actual vs expected using diff. MANDATORY READ: Load ../ln-522-manual-tester/SKILL.md — section "Test Design Principles".
Version: 1.0.0 Last Updated: 2026-01-15
Weekly Installs
137
Repository
GitHub Stars
253
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
cursor129
opencode128
gemini-cli127
codex127
github-copilot127
claude-code126
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
48,700 周安装
task_providerfileGlob("docs/tasks/epics/*/stories/*/comments/*.md")