ln-404-test-executor by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-404-test-executor路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位此 SKILL.md 文件所在目录并向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
通过实现/执行单个 Story 的最终测试任务(标签为 "tests"),将其推进到待审核状态。
| 输入 | 必需 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 来源 |
|---|
| 描述 |
|---|
taskId | 是 | 参数、父级 Story、看板、用户 | 要执行的测试任务 |
解析方式: 任务解析链。状态过滤器: 待办(标签:tests)
必读: 加载 shared/references/tools_config_guide.md、shared/references/storage_mode_detection.md 和 shared/references/input_resolution_pattern.md
提取:task_provider = 任务管理 -> 提供商(linear | file)。
| 方面 | Linear 模式 | 文件模式 |
|---|---|---|
| 加载任务 | get_issue(task_id) | Read("docs/tasks/epics/.../tasks/T{NNN}-*.md") |
| 加载 Story | get_issue(parent_id) | Read("docs/tasks/epics/.../story.md") |
| 更新状态 | save_issue(id, state) | 编辑文件中的 **Status:** 行 |
| 测试结果 | create_comment({issueId, body}) | 将评论写入 .../comments/{ISO-timestamp}.md |
文件模式状态转换: 待办 → 进行中 → 待审核
必读: 加载 shared/references/mcp_tool_preferences.md — 处理代码文件时,只要 hex-line MCP 可用,就始终使用它。除非 hex-line 不可用,否则不要回退到标准的 Read/Edit 工具。
shared/references/goal_articulation_gate.md — 陈述这些测试的真实目标(必须验证哪些业务行为,而不是“编写测试”)。非目标: 测试基础设施或框架行为而非业务逻辑。隐藏约束: 哪些现有测试可能因实现更改而失败。docs/project/infrastructure.md — 获取服务器 IP、端口、服务端点。阅读 docs/project/runbook.md — 了解测试环境设置、Docker 命令、测试执行先决条件。使用 runbook 中的确切命令。shared/references/code_efficiency_criterion.md — 根据计划编写/更新测试;重用现有夹具/辅助函数;运行测试;修复失败的现有测试;按要求更新基础设施/文档部分。在交接前,验证 3 个效率自检(特别是:重用夹具而非重复设置)。关键: 当新编写的测试失败时,停止并在更改任何内容之前进行分析(失败的新测试通常表明实现中存在错误,而非测试问题 — 盲目修复会掩盖根本原因)。
步骤 1:验证测试正确性
ref_search_documentation(query="[领域] 预期行为")步骤 2:决策
| 测试匹配验收标准? | 操作 |
|---|---|
| 是 | 代码中存在 BUG → 修复实现,而非测试 |
| 否 | 测试错误 → 修复测试断言 |
| 不确定 | 必须: 查询 MCP 参考 + 在更改前询问用户 |
步骤 3:在 Linear 评论中记录 "测试 [名称] 失败。分析:[测试正确 / 测试错误]。操作:[修复了代码 / 修复了测试]。理由:[理由]"
红色标志(需要用户确认):
toContain 代替 toEqual)绿色信号(可安全进行):
默认使用精确匹配断言:
| 严格(首选) | 宽松(除非有理由,否则避免) |
|---|---|
| 精确相等性检查 | 部分/子字符串匹配 |
| 精确长度检查 | "具有任意长度"检查 |
| 完整对象比较 | 部分对象匹配 |
| 精确类型检查 | 真值/假值检查 |
禁止使用警告级别的断言 - 测试要么通过,要么失败,没有警告。
对于确定性响应(API、转换):
"如果你知道期望值,就断言确切的值。"
禁止: 在知道确切值时,使用宽松断言来"让测试通过"。
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mddocs/tasks/kanban_board.mdshared/references/research_tool_fallback.md版本: 3.2.0 最后更新: 2026-01-15
每周安装量
152
仓库
GitHub 星标数
245
首次出现
2026 年 1 月 24 日
安全审计
安装于
claude-code138
gemini-cli137
opencode137
codex137
cursor136
github-copilot132
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}.
Runs a single Story final test task (label "tests") through implementation/execution to To Review.
| Input | Required | Source | Description |
|---|---|---|---|
taskId | Yes | args, parent Story, kanban, user | Test task to execute |
Resolution: Task Resolution Chain. Status filter: Todo (label: tests)
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).
| Aspect | Linear Mode | File Mode |
|---|---|---|
| Load task | get_issue(task_id) | Read("docs/tasks/epics/.../tasks/T{NNN}-*.md") |
| Load Story | get_issue(parent_id) | Read("docs/tasks/epics/.../story.md") |
| Update status | save_issue(id, state) | Edit the line in file |
File Mode transitions: Todo → In Progress → To Review
MANDATORY READ: Load shared/references/mcp_tool_preferences.md — ALWAYS use hex-line MCP for code files when available. No fallback to standard Read/Edit unless hex-line is down.
shared/references/goal_articulation_gate.md — State REAL GOAL of these tests (which business behavior must be verified, not "write tests"). NOT THE GOAL: testing infrastructure or framework behavior instead of business logic. HIDDEN CONSTRAINT: which existing tests might break from implementation changes.docs/project/infrastructure.md — get server IPs, ports, service endpoints. Readdocs/project/runbook.md — understand test environment setup, Docker commands, test execution prerequisites. Use exact commands from runbook.shared/references/code_efficiency_criterion.md — Author/update tests per plan; reuse existing fixtures/helpers; run tests; fix failing existing tests; update infra/doc sections as required. Before handoff, verify 3 efficiency self-checks (especially: reuse fixtures instead of duplicating setup).CRITICAL: When a newly written test fails, STOP and analyze BEFORE changing anything (failing new tests often indicate implementation bugs, not test issues — fixing blindly masks root cause).
Step 1: Verify Test Correctness
ref_search_documentation(query="[domain] expected behavior")Step 2: Decision
| Test matches AC? | Action |
|---|---|
| YES | BUG IN CODE → Fix implementation, not test |
| NO | Test is wrong → Fix test assertion |
| UNCERTAIN | MANDATORY: Query MCP Ref + ask user before changing |
Step 3: Document in Linear comment "Test [name] failed. Analysis: [test correct / test wrong]. Action: [fixed code / fixed test]. Reason: [justification]"
RED FLAGS (require user confirmation):
toContain instead of toEqual)GREEN LIGHTS (safe to proceed):
Use exact match assertions by default:
| Strict (PREFER) | Loose (AVOID unless justified) |
|---|---|
| Exact equality check | Partial/substring match |
| Exact length check | "Has any length" check |
| Full object comparison | Partial object match |
| Exact type check | Truthy/falsy check |
WARN-level assertions FORBIDDEN - test either PASS or FAIL, no warnings.
For deterministic responses (API, transformations):
"If you know the expected value, assert the exact value."
Forbidden: Using loose assertions to "make test pass" when exact value is known.
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mddocs/tasks/kanban_board.mdshared/references/research_tool_fallback.mdVersion: 3.2.0 Last Updated: 2026-01-15
Weekly Installs
152
Repository
GitHub Stars
245
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
claude-code138
gemini-cli137
opencode137
codex137
cursor136
github-copilot132
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
36,300 周安装
**Status:**| Test results | create_comment({issueId, body}) | Write comment to .../comments/{ISO-timestamp}.md |