codeql

codeql is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 31 tokens per session (765 once invoked), scanned A, original, MIT.

A guide for using CodeQL, GitHub’s tool for finding security and reliability problems by querying a model of a codebase. It covers enabling scans, reading SARIF results, and fixing confirmed issues.

In plain words
What is it for?
Use it to enable CodeQL checks in GitHub Actions, investigate alerts on pull requests, write custom queries, and apply source-level fixes.
Why use it?
It helps developers set up code scanning and distinguish real problems from false alarms. It also discourages hiding warnings with exclusions instead of fixing their causes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it to enable CodeQL checks in GitHub Actions, investigate alerts on pull requests, write custom queries, and apply source-level fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/codeql
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill codeql
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codeql

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/codeql.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/codeql)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/codeql"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/codeql.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00765
Opus 5 $0.00015 $0.00382
Sonnet 5 $0.00006 $0.00153
Haiku 4.5 $0.00003 $0.00076

Measured 3d ago against content hash 2e2c37d39cc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codeql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codeql/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CodeQL Analysis AI Skill Guide

Overview & Engine Architecture

CodeQL models source code as a queryable database. GitHub Actions (or CLI) builds a CodeQL DB per language, runs query suites, and uploads SARIF to code scanning. Agents enable default suites first, fix real issues with root-cause patches, and add path/query exclusions only with documented rationale - not to hide debt permanently.

Source checkout
   -> CodeQL init + autobuild/build
       -> CodeQL analyze (query suite)
           -> SARIF upload -> GitHub code scanning alerts

When to use this skill

  • Turning on GitHub code scanning for a repo
  • Triaging CodeQL alerts on PRs
  • Adding custom queries for org-specific bugs
  • Comparing deep semantic findings vs pattern SAST (@semgrep)

Operational directives

  1. Start with security-extended or default suites; custom queries later.
  2. Ensure the build step compiles/interprets the code CodeQL needs (compiled languages especially).
  3. Fix alerts at the source (validation, authz, safe APIs); avoid "ack" without mitigation.
  4. Use paths-ignore sparingly for generated/vendor trees only.
  5. Treat PR scanning failures as merge blockers for high severity once baselines are clean.

Actions sketch

name: codeql
on:
  push: { branches: [main] }
  pull_request: { branches: [main] }
  schedule: [{ cron: "0 6 * * 1" }]
jobs:
  analyze:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: github/codeql-action/init@v3
        with:
          languages: javascript, python
      - uses: github/codeql-action/autobuild@v3
      - uses: github/codeql-action/analyze@v3

Triage guidance

Alert class Typical fix direction
SQL/NoSQL injection Parameterize; remove string concat
XSS Encode/sanitize by context
Path traversal Canonicalize + allowlist roots
Insecure randomness (security-sensitive) Use crypto RNG APIs

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 91 lines · 31 tokens per session scan A 2e2c37d39cc1

Subscribe to this mod's changes

codeql is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 765 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

ask-copilot

Use GitHub Copilot CLI in non-interactive mode to ask questions, review code, or generate snippets without manual interaction.

sickn33/agentic-awesome-skills · 30 tokens

agenttrace-session-audit

Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.

sickn33/agentic-awesome-skills · 34 tokens

ax-extract-workflow

Reconstruct workflow behind a past coding-agent artifact using local ax sessions/commits/skills/tool traces. Use when asked how X was built.

sickn33/agentic-awesome-skills · 35 tokens

implementing-github-advanced-security-for-code-scanning

Configure GitHub Advanced Security with CodeQL to perform automated static analysis and vulnerability detection across repositories at enterprise scale.

xalgorix/xalgorix · 34 tokens

integrating-sast-into-github-actions-pipeline

This skill covers integrating Static Application Security Testing (SAST) tools—CodeQL and Semgrep—into GitHub Actions CI/CD pipelines. It addresses configuring automated code scanning on pull requests and pushes, tuning rules to reduce false positives, uploading SARIF results to GitHub Advanced Security, and…

adriannoes/awesome-agentic-ai · 84 tokens

ai-cold-outreach

AI Cold Outreach workflow skill. Use this skill when the user needs When the user wants to build an AI-powered outreach system, write cold emails, improve deliverability, or scale personalized outreach. Also use when the user mentions 'cold email,' 'cold outreach,' 'outreach automation,' 'Instantly,' 'Smartlead,'…

diegosouzapw/awesome-omni-skills · 147 tokens