用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tile-ai/TileOPs --skill test-op命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Generate or re-align one `src/tileops/manifest/` entry from a reference-API docs URL. Caller provides the manifest key (`op_name`); skill writes that one entry. Idempotent.
Scaffold a new T2 (L1-direct) Op file from a single `src/tileops/manifest/` entry by following the 7-step playbook in docs/design/ops-design.md. Emits the 17 scaffold slots (S1-S7, S12-S21); leaves family-specific protocol variables, optional hooks, and kernel implementations to downstream skills.
Drive the full migration for an op family — audit, delegate per-op alignment to align-op, run cross-op cleanup. Two terminal outcomes: SUCCESS opens a PR; CLEANUP_REGRESSION exits blocked without a PR when post-cleanup tests fail.
基于 SOC 职业分类
正在显示 SKILL.md
| name | test-op |
| description | Write tests for the target spec using PyTorch as ground truth, verify they fail on current code. |
op_name, manifest_signature, pytorch_equivalent, source_test — passed by align-family orchestrator.
op_name, manifest_signature, pytorch_equivalent, source_teststateDiagram-v2
[*] --> READ_SPEC
READ_SPEC --> ASSESS_EXISTING: manifest signature + pytorch_equivalent loaded
ASSESS_EXISTING --> WRITE_TESTS_EXTEND: semantic extension — old assertions still valid
ASSESS_EXISTING --> WRITE_TESTS_REPLACE: semantic update — old assertions incompatible
WRITE_TESTS_EXTEND --> VERIFY_FAILS: new tests added, existing kept
WRITE_TESTS_REPLACE --> VERIFY_FAILS: outdated tests deleted, new tests written
VERIFY_FAILS --> DONE: confirmed failing on current code
VERIFY_FAILS --> DONE_SKIP: tests already pass (base class fixed by previous op)
Read manifest_signature to determine target interface:
signature.inputs → forward() params (tensor inputs)signature.params → __init__() params (configuration)docs/design/ops-design.md. The manifest is the source of truth.Read current test file (source_test). Compare existing test construction and assertions against the new spec:
Op(M, N) to Op(dim)) → semantic update (delete outdated tests, write replacements)Write tests using PyTorch reference as ground truth:
# Example — derive from manifest, don't copy this literally
expected = torch.nn.functional.softmax(x, dim=dim)
actual = op(x)
torch.testing.assert_close(actual, expected, rtol=rtol, atol=atol)
TestBase pattern (gen_inputs() + ref_program() + check()). Follow docs/design/testing.md.ref_program on the op's workload class in workloads/. Define it on the test class only when the workload describes an input shape rather than an op.source_test file. No new files.outputs.*.dtype is int type), use torch.equal for exact comparison.Run the new tests against current code:
python -m pytest <source_test> -v
New tests must fail on current code. Construction-time error counts (e.g., current __init__ doesn't accept dim).
DONE_SKIP: if tests already pass (base class fixed by a previous op's migration), this is valid. Proceed to implement-op.