mvx_semgrep_creator

Generate custom Semgrep rules for MultiversX Rust smart contracts.

12|5|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/multiversx/mx-ai-skills --skill mvx-semgrep-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mvx_semgrep_creator
Source: https://github.com/multiversx/mx-ai-skills/tree/main/antigravity/skills/mvx_semgrep_creator
Command: npx skills add https://github.com/multiversx/mx-ai-skills --skill mvx-semgrep-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers automatically enforce MultiversX-specific coding best practices and identify potential vulnerabilities by creating custom Semgrep rules.

Core Features & Use Cases

  • Pattern Identification: Guides users to identify common MultiversX anti-patterns like unsafe math operations or missing payment checks.
  • Rule Generation: Provides a template to construct Semgrep rules tailored for Rust smart contracts on MultiversX.
  • Testing & Refinement: Outlines the process for testing generated rules against codebases and iterating to reduce false positives.
  • Use Case: A developer wants to ensure all #[payable] functions in their MultiversX smart contract include a call_value() check to prevent accidental unpayable endpoints. This skill helps them write a Semgrep rule to automate this check.

Quick Start

Use the mvx_semgrep_creator skill to write a Semgrep rule that flags potential arithmetic overflow issues in Rust code.

Frequently Asked Questions about mvx_semgrep_creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Semgrep rule to detect missing payment checks in MultiversX smart contracts?

To write a Semgrep rule for missing payment checks, you target `#[payable]` functions in Rust that lack a `call_value()` check. This skill generates custom rule templates to automatically identify these vulnerable endpoints and enforce MultiversX best practices.

How can I use Semgrep to find unsafe math operations in Rust smart contracts?

You can use Semgrep to find unsafe math operations by generating custom rules that flag potential arithmetic overflow issues in Rust code. This skill guides you through identifying these MultiversX anti-patterns and constructing rules to automate the security auditing process.

What are common anti-patterns to scan for in MultiversX Rust smart contracts?

Common MultiversX anti-patterns to scan for include unsafe math operations, floating-point usage, and missing payment checks in `#[payable]` functions. Semgrep rules can automate the detection of these issues to improve smart contract security.

How do I test custom Semgrep rules to reduce false positives in my codebase?

To reduce false positives, test custom Semgrep rules by running them against your Rust smart contract codebase and iteratively refining the pattern definitions. This skill outlines the testing process to ensure rules accurately target anti-patterns without flagging valid code.

Can I use Semgrep for automated code analysis on MultiversX smart contracts?

Yes, you can use Semgrep for automated code analysis on MultiversX smart contracts. This skill helps you create custom rules to facilitate automated security auditing and enforce development best practices for Rust smart contracts on the MultiversX platform.