sage-sanity-check

Identify SAGE-specific anti-patterns in Rust code.

2|1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/nikomatsakis/sage-dev --skill sage-sanity-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-sanity-check
Source: https://github.com/nikomatsakis/sage-dev/tree/main/.agents/skills/sage-sanity-check
Command: npx skills add https://github.com/nikomatsakis/sage-dev --skill sage-sanity-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit identifies and prevents SAGE-specific anti-patterns in code, ensuring code quality and integrity.

Core Features & Use Cases

  • Code Review: Identifies SAGE-specific anti-patterns in modified code.
  • Pattern Matching: Checks for non-exhaustive matches, inference variables on type errors, and error type constructions without diagnostics.
  • Use Case: Before reporting code changes as complete, the Sage Sanity Check can be run to ensure no anti-patterns are present.

Quick Start

Run the Sage Sanity Check on modified code by invoking it with the description of the changes and the instructions file.

Frequently Asked Questions about sage-sanity-check

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

FAQPage Schema
How do I check Rust code for non-exhaustive matches and anti-patterns?

To check Rust code for non-exhaustive matches, run a sanity check to identify SAGE-specific anti-patterns. The tool scans modified code to detect inference variables on type errors and error type constructions lacking diagnostics, ensuring code integrity.

What are SAGE-specific anti-patterns in Rust code?

SAGE-specific anti-patterns in Rust code include non-exhaustive matches, inference variables appearing on type errors, and constructing error types without associated diagnostics. Identifying these patterns maintains code quality and prevents subtle issues.

How do I run a sanity check on modified Rust code before reporting changes?

To run a sanity check on modified Rust code, invoke the tool with a description of your changes and the instructions file. It analyzes the code and reports any detected SAGE-specific anti-patterns, ensuring modifications meet quality standards.

Can I use this anti-pattern detection tool for general Rust codebases?

This anti-pattern detection tool is specifically intended for code quality assurance within the SAGE codebase. While it identifies standard Rust issues like non-exhaustive matches, its checks for error type constructions are tailored to SAGE-specific standards.

Why does my Rust error type construction lack diagnostics?

Rust error type construction lacks diagnostics when developers bypass standard error reporting practices. The sanity check identifies this anti-pattern, flagging error constructions that fail to provide diagnostic information to help debug type errors.