create-codeql-query-unit-test-python

Create unit tests for Python CodeQL queries using MCP testing tools.

30|3|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill create-codeql-query-unit-test-python
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-codeql-query-unit-test-python
Source: https://github.com/advanced-security/codeql-development-mcp-server/tree/main/.github/skills/create-codeql-query-unit-test-python
Command: npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill create-codeql-query-unit-test-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating robust unit tests for Python CodeQL queries used with the MCP Server to ensure accurate detection and quality guarantees across changes.

Core Features & Use Cases

  • Structured test directory scaffolding for Python CodeQL queries
  • Step-by-step guidance for test creation, reference resolution, and result validation
  • Integration with MCP testing tools (codeql_test_extract, codeql_test_run) to automate database creation and test execution

Quick Start

Install and scaffold a Python CodeQL test pack, then run MCP testing tools to extract and run the tests.

Frequently Asked Questions about create-codeql-query-unit-test-python

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

FAQPage Schema
How do I create unit tests for Python CodeQL queries?▼

You create Python CodeQL unit tests by scaffolding a structured test directory, resolving references, and validating query behavior. This ensures accurate detection and quality guarantees across changes to your codebase.

How do I automate CodeQL test execution using MCP tools?▼

You automate CodeQL test execution using MCP tools by running codeql_test_extract for database creation and codeql_test_run to execute the tests. This automates the extraction and validation workflow across Python codebases.

What is a CodeQL test pack and when do I need one for Python?▼

A CodeQL test pack is a structured directory containing test cases for validating query behavior. You need one when building and verifying CodeQL queries to ensure accurate detection and quality guarantees across Python codebase changes.

Can I use MCP Server tools to validate CodeQL query behavior across Python codebases?▼

Yes, you can use MCP Server tools to validate CodeQL query behavior across Python codebases. The workflow uses codeql_test_extract for database creation and codeql_test_run to execute and verify the query tests end-to-end.

What is the best way to structure Python CodeQL query tests?▼

The best way to structure Python CodeQL query tests is by scaffolding a dedicated test directory. This provides step-by-step guidance for test creation, reference resolution, and result validation to ensure robust query behavior.