Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

dev-test开发测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

3,818

周安装

164

GitHub Stars

公开资料未说明

下载量

1,338
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dev-test(开发测试)
来源仓库:https://github.com/sliverp/dev-test
安装命令:
openclaw skills install dev-test
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install dev-test

简介

实施结构化开发和测试 SOP,涵盖代码研究、实现与回归验证全流程。

  • 适合让 Agent 编写单元测试、端到端用例或根据日志定位问题。
  • 提供最小化实现、测试模式匹配和自动化执行建议。
  • 安装命令:openclaw skills install dev-test;需确认项目测试框架和运行命令。
  • 注意区分本地模拟与生产环境,避免误改真实逻辑。

SKILL.md

name
dev-test
description
Structured development and testing SOP for implementing code changes. Covers codebase study, minimal focused implementation, test writing patterns, test execution, and diff review. Applies to any development work — bug fixes, features, refactors, or open-source contributions. Use when you need a disciplined development workflow with built-in quality checks.

Dev Test — Development & Testing SOP

Overview

A structured workflow for implementing code changes with quality built in. Covers the full cycle from understanding the codebase to having a verified, reviewable diff.

Use cases: Bug fixes, feature development, refactoring, open-source contributions, any code change that needs to be correct and maintainable.

Workflow

Phase 1: Study Before Coding

Never write code before understanding the context. This phase prevents wasted effort and bad designs.

1a. Understand the project conventions

Check for and read these files (if they exist):

  • CONTRIBUTING.md — contribution guidelines
  • .editorconfig — formatting rules
  • pyproject.toml / package.json / Makefile — project config, linting, formatting
  • tox.ini / .flake8 / .eslintrc — code style rules

1b. Study the area of change

  • Read the module(s) you'll be modifying
  • Trace the execution path around the bug/feature
  • Understand data flow: what goes in, what comes out
  • Note dependencies: what other modules interact with this code

1c. Study existing tests

  • Find the test directory structure: tests/, __tests__/, test/
  • Note the test framework: pytest, jest, go test, JUnit, etc.
  • Study naming conventions: test_feature.py, feature.test.ts, feature_test.go
  • Note fixture/setup patterns used
  • Check for test utilities, factories, or mocks

1d. Draft a mental model

Before writing code, articulate:

  • What needs to change (specific behavior)
  • Where in the code (files, functions, classes)
  • How you'll change it (approach)
  • What could go wrong (edge cases, regressions)

Phase 2: Implement

Core principles

  1. Minimal, focused changes

- Fix the bug / add the feature. Nothing else. - Avoid unrelated formatting changes, import reordering, or drive-by refactors. - If you spot something else to fix, note it for a separate commit/PR.

  1. Follow existing patterns

- Match the codebase's style, not your preferred style - Use the same naming conventions, indentation, comment style - If the project uses snake_case, don't introduce camelCase

  1. Add comments for non-obvious logic

- "Why" comments, not "what" comments - Explain trade-offs, workarounds, and intentional decisions

  1. Design for quality
PrincipleMeaningExample
Defense-in-depthLayer multiple protectionsValidate input at API + service + DB layer
Backward compatibilityDon't break existing behaviorAdd new params with defaults
Graceful degradationHandle missing featuresPlatform-specific code falls back safely
ExtensibilityPrefer composable designsPlugin/middleware over hardcoded switch
Single responsibilityOne function = one jobExtract logic instead of growing functions

Phase 3: Write Tests

Test categories (implement in order)

  1. Fix verification — prove the bug is fixed / feature works
   test_feature_handles_null_input()        # The exact scenario from the issue
  1. Edge cases — boundary conditions
   test_feature_with_empty_string()
   test_feature_with_max_length_input()
   test_feature_with_special_characters()
  1. Error handling — invalid inputs, failure paths
   test_feature_raises_on_invalid_type()
   test_feature_returns_none_on_missing_key()
  1. Regression — existing behavior preserved
   test_existing_behavior_unchanged()
   test_other_module_still_works()

Test writing guidelines

  • One assertion per test (ideally) — makes failures easy to diagnose
  • Descriptive namestest_oauth_token_refreshes_when_expired not test_token
  • Arrange-Act-Assert pattern:
  def test_feature():
      # Arrange
      input_data = create_test_data()

      # Act
      result = feature(input_data)

      # Assert
      assert result.status == "success"
  • Use fixtures for reusable setup
  • Mock external dependencies — network calls, file system, databases
  • Test behavior, not implementation — don't assert on internal state

Phase 4: Run Tests

Progressive testing strategy

# 1. Run only your new/modified tests first (fast feedback)
python -m pytest tests/test_my_feature.py -v --tb=short
# or: npm test -- --testPathPattern=my_feature
# or: go test ./pkg/my_feature/... -v

# 2. Run the full test module/directory
python -m pytest tests/ -v --tb=short

# 3. Run the entire test suite (before committing)
python -m pytest --tb=short
# or: npm test
# or: go test ./...

Handling test results

ScenarioAction
All pass ✅Proceed to diff review
Your tests failFix the code, re-run
Pre-existing failuresNote them, don't fix (out of scope)
Flaky tests (pass/fail randomly)Run 3x to confirm flakiness, note in PR
Tests you can't run (need env/infra)Note in PR, explain what you tested manually

Phase 5: Review the Diff

Before committing, review every line of your diff.

# Overview of what changed
git diff --stat

# Full diff
git diff

# If already staged
git diff --cached

Diff review checklist

  • [ ] Every change is intentional (no accidental edits)
  • [ ] No debug prints, TODO comments, or temporary code left in
  • [ ] No secrets, tokens, or personal paths hardcoded
  • [ ] No unrelated formatting changes
  • [ ] All new functions/classes have appropriate docstrings/comments
  • [ ] Test coverage looks adequate for the changes
  • [ ] File additions are in the right directories

Phase 6: Commit

# Stage specific files (never use `git add .`)
git add path/to/modified_file.py
git add tests/test_new_feature.py

# Verify staged files
git diff --cached --stat

# Commit with conventional message
git commit -m "fix(module): short description of what was fixed

Longer explanation of why, if non-obvious.

Addresses #issue_number"

Commit message format

{type}({scope}): {concise description}

{body: what and why, not how}

{footer: issue refs, test results, breaking changes}
TypeWhen
fixBug fix
featNew feature
refactorCode restructure (no behavior change)
testAdding/fixing tests only
docsDocumentation changes only
choreBuild/tooling/dependency changes

Output

  • Committed code changes + tests on feature branch
  • All tests passing
  • Clean, reviewable diff

Tips

  • This skill works standalone for any development task.
  • In a contribution pipeline, it follows repo-setup and feeds into pr-pilot.
  • For large features, repeat Phase 2-5 in small increments rather than one big change.
  • When pair-programming with AI: have the AI study the codebase (Phase 1) before asking it to implement anything.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.55%
按下载量换算1,011

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills