semantic-bug-detector

Detect semantic bugs by comparing code behavior against inferred intent.

142|14|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill semantic-bug-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantic-bug-detector
Source: https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/semantic-bug-detector
Command: npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill semantic-bug-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill identifies subtle logic errors (semantic bugs) where the code's actual behavior mismatches the intent expressed through its names, comments, and documentation.

Core Features & Use Cases

  • Intent Inference: Analyzes function/variable names, comments, and docstrings to understand intended behavior.
  • Implementation Analysis: Examines code logic, control flow, and operations.
  • Mismatch Detection: Pinpoints discrepancies between intent and implementation, reporting specific bug types like off-by-one errors, inverted logic, and boundary mismatches.
  • Use Case: You have a function is_positive(x) with a docstring stating it checks if x is greater than zero, but the implementation uses >= 0. This Skill will flag that the implementation includes zero, contradicting the stated intent.

Quick Start

Use the semantic-bug-detector skill to analyze the provided Python code snippet for semantic bugs.

Frequently Asked Questions about semantic-bug-detector

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

FAQPage Schema
How do I detect semantic logic errors in code where the implementation contradicts the intent?

To detect semantic logic errors, analyze code behavior against its intended purpose inferred from names, comments, and documentation to identify intent-implementation discrepancies like off-by-one errors and inverted logic.

What is semantic bug detection and how does it identify boundary mismatches?

Semantic bug detection is the process of finding logic errors by examining code structure and naming conventions to pinpoint boundary mismatches where actual behavior contradicts the stated intent from docstrings.

Can I use intent verification to find off-by-one errors across multiple programming languages?

Yes, intent verification analyzes function names and comments to understand intended behavior across multiple programming languages, successfully detecting off-by-one errors and inverted logic in the implementation.

What is the best way to debug code when the logic contradicts the docstring?

The best way to debug code contradicting its docstring is analyzing the implementation's control flow against the inferred intent to pinpoint specific mismatches, such as checking if a value is greater than zero versus greater than or equal to zero.

Does semantic analysis work for finding inverted logic without explicit test cases?

Yes, semantic analysis works for finding inverted logic without explicit test cases by inferring expected behavior from documentation and naming conventions, then flagging discrepancies in the actual code operations.

When should I not rely on semantic bug detection for code quality checks?

You should not rely on semantic bug detection when code lacks descriptive names or comments, because the mechanism requires textual descriptions and naming conventions to infer intent and identify implementation discrepancies.