create-codeql-query-unit-test-cpp

Design and validate CodeQL unit tests for C++ queries using the MCP Server.

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-cpp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-codeql-query-unit-test-cpp
Source: https://github.com/advanced-security/codeql-development-mcp-server/tree/main/.github/skills/create-codeql-query-unit-test-cpp
Command: npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill create-codeql-query-unit-test-cpp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create comprehensive unit tests for CodeQL queries targeting C++ code, guiding you to design, validate, and extend test coverage using the MCP Server tools.

Core Features & Use Cases

  • Structured test layout including test sources, reference files, and expected results for C++ CodeQL queries.
  • Step-by-step guidance to extract test databases, run queries, and validate results across multiple C++ features (templates, STL, modern syntax).
  • Integration with MCP Server tooling to streamline test development, execution, and result verification in real-world projects.

Quick Start

Create a new C++ test directory, add a query reference file and an Example.cpp, then run the MCP test pipeline to generate and validate the test database.

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

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

FAQPage Schema
How do I create unit tests for C++ CodeQL queries?

To create unit tests for C++ CodeQL queries, design a structured test layout with test sources, reference files, and expected results, then extract test databases and validate outputs using the MCP Server pipeline.

What is the correct .expected file format for CodeQL query tests?

The correct .expected file format for CodeQL query tests defines expected outputs to validate query results accurately. Enforcing correct formatting ensures your C++ unit tests reliably verify query behavior across various code features.

Does CodeQL unit testing support modern C++ features like templates?

Yes, CodeQL unit testing supports modern C++ features including templates, STL, and modern syntax. The test workflow validates query results across these typical C++ features while ensuring compatibility with various C++ standards.

How do I extract a test database for a C++ CodeQL query?

To extract a test database for a C++ CodeQL query, add an Example.cpp file and a query reference file to your test directory. Running the MCP test pipeline then generates and validates the extracted test database.

Can I use the MCP Server to automate CodeQL test workflows?

Yes, you can use the MCP Server to automate CodeQL test workflows. It provides tooling integration to streamline test development, execution, and result verification for C++ queries in real-world projects.