add-code-inspector-rule

Create a custom CodeInspector rule to detect problematic Wolfram Language patterns.

82|19|Updated Mar 21, 2025
One-click install
npx skills add https://github.com/WolframResearch/AgentTools --skill add-code-inspector-rule
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-code-inspector-rule
Source: https://github.com/WolframResearch/AgentTools/tree/main/.claude/skills/add-code-inspector-rule
Command: npx skills add https://github.com/WolframResearch/AgentTools --skill add-code-inspector-rule

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables teams to standardize Wolfram Language quality by capturing and reporting patterns that indicate risks, deprecated usage, or style violations.

Core Features & Use Cases

  • Define reusable patterns to detect issues in WL code.
  • Integrate rules into CodeInspector with tests and documentation.
  • Automate reviews by applying new rules during CI and code reviews.

Quick Start

Provide a new CodeInspector rule by outlining the pattern and its handler in Rules.wl.

Frequently Asked Questions about add-code-inspector-rule

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

FAQPage Schema
How do I create custom static analysis rules for Wolfram Language code?

To create custom static analysis rules for Wolfram Language, you define a pattern and its handler in the CodeInspector Rules.wl file to detect risky constructs. This integrates custom checks into your automated reviews.

How do I add a lint rule to CodeInspector to catch deprecated Wolfram Language patterns?

You add a lint rule to CodeInspector by updating Kernel/Tools/CodeInspector/Rules.wl with a new entry and its tests. This enables the linter to catch deprecated Wolfram Language patterns across your codebase.

Can I automate code reviews by enforcing custom CodeInspector rules in CI?

You can automate code reviews by enforcing custom CodeInspector rules in CI. Adding a verification workflow alongside your rule entry in Rules.wl ensures automated static analysis catches style violations.

What is needed to integrate a new CodeInspector rule into a Wolfram Language codebase?

Integrating a new CodeInspector rule requires updating Kernel/Tools/CodeInspector/Rules.wl with the rule definition and adding corresponding tests. You must also add a verification workflow to complete the integration.

When should I use custom static analysis rules for Wolfram Language code?

You should use custom static analysis rules for Wolfram Language code when teams need to standardize quality by enforcing coding standards. Custom rules capture and report patterns indicating risks or style violations across the codebase.