Agent SkillsTencentCloud/CubeSandbox › sdk-e2e-cases

sdk-e2e-cases

GitHub

用于编写、审查和运行 CubeSandbox SDK 兼容性 E2E pytest 测试用例。涵盖用例开发、代码审查、执行及调试,支持生命周期、网络策略等场景的端到端验证。

tests/skills/sdk-e2e-cases/SKILL.md TencentCloud/CubeSandbox

Trigger Scenarios

编写或设计 SDK E2E 测试用例 审查测试代码正确性与安全性 执行 SDK 兼容性 E2E 测试 调试 E2E 测试失败问题

Install

npx skills add TencentCloud/CubeSandbox --skill sdk-e2e-cases -g -y
More Options

Non-standard path

npx skills add https://github.com/TencentCloud/CubeSandbox/tree/master/tests/skills/sdk-e2e-cases -g -y

Use without installing

npx skills use TencentCloud/CubeSandbox@sdk-e2e-cases

指定 Agent (Claude Code)

npx skills add TencentCloud/CubeSandbox --skill sdk-e2e-cases -a claude-code -g -y

安装 repo 全部 skill

npx skills add TencentCloud/CubeSandbox --all -g -y

预览 repo 内 skill

npx skills add TencentCloud/CubeSandbox --list

SKILL.md

Frontmatter
{
    "name": "sdk-e2e-cases",
    "description": "Write, review, and execute CubeSandbox SDK compatibility E2E pytest cases. Use when the user asks to add, design, review, debug, or run SDK E2E cases under tests\/e2e\/sdk_compat, or mentions lifecycle, network policy, sandbox templates, backend compatibility, pytest markers, or live E2E validation."
}

SDK E2E Cases

Use this skill for CubeSandbox SDK compatibility E2E work in tests/e2e/sdk_compat.

Required First Steps

  1. Read the relevant local docs before changing tests:
    • tests/e2e/sdk_compat/README.md
    • tests/e2e/sdk_compat/docs/case-authoring.md
    • tests/e2e/sdk_compat/docs/test-coverage.md
    • tests/e2e/sdk_compat/docs/framework-design.md
  2. Inspect nearby cases in the same domain directory before writing a new case.
  3. Decide whether the request is case authoring, review, execution, or debugging, then follow the matching workflow below.

Authoring Workflow

  1. Classify the behavior domain: commands, filesystem, host-mount, lifecycle, network, run_code, or concurrency.
  2. Decide whether the behavior is a shared SDK contract or backend-specific behavior.
  3. Use capability and environment markers for unsupported prerequisites. Do not hide backend differences with loose assertions.
  4. Prefer existing fixtures and helpers over new abstractions:
    • sdk_sandbox
    • sdk_e2e_config
    • sdk_backend
    • sandbox_create_options
    • sandbox_template_id
  5. Keep assertions contract-focused and diagnostics useful. Include IDs, states, URLs, status codes, and short response snippets where helpful, but do not log secrets or traffic access token values.
  6. Add or update docs only when the case introduces a new pattern, marker, environment variable, template requirement, or coverage category.

Review Workflow

Review SDK E2E changes for:

  • Correctness: the test asserts product/SDK contracts, not incidental implementation details.
  • Backend compatibility: shared cases run across selected backends, and unsupported behavior uses capability markers.
  • Lifecycle semantics: running means the sandbox data plane should be usable; do not mask backend bugs with broad retries.
  • Resource cleanup: created sandboxes are cleaned with existing fixtures/helpers unless intentionally preserved by framework behavior.
  • Security: do not print API keys, traffic access tokens, machine IPs, or sensitive headers.
  • Stability: avoid fixed sleeps, public internet assumptions without markers, and unbounded polling.
  • Maintainability: prefer existing helpers, readable markers, and focused tests.

Execution Workflow

From tests/e2e/sdk_compat, use the smallest command that validates the change:

pytest --collect-only -q
pytest --run-e2e -m "p0 and not slow"
pytest --run-e2e cases/lifecycle/test_create.py -q
pytest --run-e2e cases/network/test_policy.py -q

For live runs, check that required environment variables are documented and intentionally set. Use SDK_E2E_KEEP_SANDBOX_ON_FAILURE=true only when debugging failures.

Additional Reference

For concrete marker templates, review checklists, and command patterns, read REFERENCE.md.

Version History

  • 5cefcca Current 2026-08-08 07:59

Same Skill Collection

.claude/skills/run-dev/SKILL.md
examples/openclaw-integration/skills/cube-sandbox/SKILL.md

Metadata

Files
0
Version
5cefcca
Hash
a54fd91a
Indexed
2026-08-08 07:59

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-09 03:22
浙ICP备14020137号-1 $Carte des visiteurs$