Our review
This skill helps develop and verify TVM Foreign Function Interface (FFI) changes.
Strengths
- Provides a complete workflow: understanding, implementation, build, and test.
- Enforces strict code style guidelines for C++ and Python, improving code quality.
- Automates reproducibility by writing and running repro scripts.
- Simplifies GitHub issue handling via a dedicated command.
Limitations
- Requires prior knowledge of TVM and its FFI internals.
- Depends on the TVM build and test environment (/tvm-ffi-build, /tvm-ffi-test).
- May not cover all edge cases not described in the instructions.
Use this skill when implementing or fixing TVM FFI functionality, from bug reproduction to validation.
Avoid this skill for generic TVM development tasks not involving FFI, or if you are unfamiliar with the specified coding conventions.
Security analysis
CautionThe skill involves executing Python scripts and build/test commands, which could potentially run malicious code if given untrusted issue descriptions. The operations are legitimate for development but are powerful, warranting caution.
- •Runs Python repro scripts and build/test commands, which could execute arbitrary code. This is typical for a development workflow but requires caution.
Examples
/tvm-ffi-dev https://github.com/apache/tvm/issues/12345/tvm-ffi-dev Add a new FFI function to access tensor data via std::expected/tvm-ffi-devname: tvm-ffi-dev description: Develop and verify TVM FFI changes.
TVM FFI Dev
Usage
/tvm-ffi-dev # auto-run: pick next item or continue current work
/tvm-ffi-dev <GitHub issue URL>
/tvm-ffi-dev <text description>
Instructions
-
Understand the task:
- If given a GitHub issue URL, fetch with
gh issue view <URL> - Write a minimal Python repro script and run it to confirm the error. If it can't be reproduced, stop and report.
- If given text, use that as the requirement
- If given a GitHub issue URL, fetch with
-
Follow
/dev-autodevloop with these project-specific details:- If fixing an issue: Re-run the repro script to verify it passes, then delete it.
- Verify: Use
/tvm-ffi-build, then/tvm-ffi-test.
Code style
- C++: prefer
std::string_view,static_cast, STL algorithms over manual loops - C++: add move-qualified overloads (
&&) for accessors returning owned values - C++: align new APIs with C++ std equivalents (e.g.
std::expected,std::unexpected), list deviations explicitly - C++: use
std::moveon optionals (*std::move(val)), avoid double checking - C++: fast path first (value before error), minimize branches
- C++: ban implicit conversions for error types, use explicit constructors (e.g.
Unexpected(Error(...))) - Python: reuse stdlib types (e.g.
dataclasses.KW_ONLY) instead of redefining - Tests: call actual registered FFI functions, not reimplement logic
- Tests: use
ASSERT_TRUEfor null checks before dereferencing - Tests: no duplicate assertions, remove redundant checks
- Extract duplicated logic into helpers
- New user-facing APIs need documentation with usage examples
- Preserve original error info on rethrow, not generic messages
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.