用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/shader-slang/slang-skills --skill slangpy-code-writer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | slangpy-code-writer |
| license | MIT |
| description | Implement changes in SlangPy. Edit code, write tests, format, commit. |
| provides | ["code.read","code.edit","test.gen"] |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
m_ prefix_ prefixtyping_extensions for backward-compatible type hints (Python >= 3.9)[shader("compute")] attribute marks GPU entry pointsStructuredBuffer<T> / RWStructuredBuffer<T> for typed GPU arraysuint3 tid : SV_DispatchThreadID for thread indexing<T>, interfaces via interface IFoo, conformance via struct Foo : IFoo[Differentiable] float foo(float x) with bwd_diff(foo) for backpropslangpy/ (core/, bindings/, builtin/, or appropriate subpackage)slangpy/tests/pre-commit run --all-filesslangpy/bindings/ or slangpy/builtin/ -- subclass Marshall and implement resolve_types(), resolve_dimensionality(), gen_calldata(). See existing marshalls (e.g., TensorMarshall) for the pattern.slangpy/bindings/typeregistry.py -- add entry to PYTHON_TYPES dict.NativeCallDataCache constructor (src/slangpy_ext/utils/slangpyfunction.cpp).src/slangpy_ext/ affect the nanobind interfacesrc/sgl/ affect the core GPU abstractioncmake --build --preset linux-gcc-debugslangpy/core/calldata.py -- the Phase 2 pipeline (type resolution, vectorization, code generation, compilation)slangpy/bindings/codegen.py -- Slang compute kernel source generationSLANGPY_PRINT_GENERATED_SHADERS=1 to inspect generated kernelsgit checkout -b feature/descriptionslangpy/tests/cmake --build --preset linux-gcc-debug or pip install -e .pytest slangpy/tests -vpre-commit run --all-files (re-run if it modifies files)shader-slang/slangpy:mainAutonomy: Proceed through format, test, and commit without asking for confirmation. Only stop and notify the user if tests fail and the failure is not self-fixable.
/// Description.
void do_something();
/// @param v Float values.
/// @return Result.
uint32_t my_func(float2 v);
def myfunc(x: int, y: int) -> int:
"""
Description.
:param x: Some parameter.
:param y: Some parameter.
:return: Some return value.
"""
ValueError, TypeError, SlangPyError)AGENTS.md -- architecture (3 layers, 3 phases), key files, key classes, adding new types, type resolution, code styleCLAUDE.md -- references AGENTS.md, key rules (type annotations, tests, pre-commit)CONTRIBUTING.md -- PR process, branch workflow, testing requirements