sql-analysis

sql-analysis is a skill for Claude Code, Codex from agentscope-ai/agentscope-java. It costs 79 tokens per session (800 once invoked), scanned A, original, Apache-2.0.

A guide for answering business questions by writing and checking SQL queries against a data warehouse.

In plain words
What is it for?
Use it to investigate tabular business data, such as how many records exist, what is changing over time, or which items rank highest.
Why use it?
It turns questions about counts, trends, comparisons, or rankings into validated queries and readable results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to investigate tabular business data, such as how many records exist, what is changing over time, or which items rank highest.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentscope-ai/agentscope-java/sql-analysis
About the project

AgentScope Java is a framework for building distributed software agents that use language models to perform tasks over extended sessions. It is intended for enterprise applications needing agent coordination, controlled tool use, isolated workspaces, event streaming, and distributed session management. The catalogue entries provide skills and instructions for working with this framework.

agentscope-ai/agentscope-java · 6,013 stars · on GitHub · java.agentscope.io

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 agentscope-ai/agentscope-java --skill sql-analysis
Clone the repo
git clone --depth 1 https://github.com/agentscope-ai/agentscope-java

Made for: Claude Code, Codex.

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 sql-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentscope-ai/agentscope-java/sql-analysis/github.svg)](https://agentmods.dev/skills/agentscope-ai/agentscope-java/sql-analysis)
Your own site
<a href="https://agentmods.dev/skills/agentscope-ai/agentscope-java/sql-analysis"><img src="https://agentmods.dev/badge/skills/agentscope-ai/agentscope-java/sql-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sql-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentscope-ai/agentscope-java/sql-analysis"><img src="https://agentmods.dev/badge/skills/agentscope-ai/agentscope-java/sql-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 800 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00079 $0.00800
Opus 5.5 $0.00032 $0.00320
Sonnet 5.5 $0.00016 $0.00160
Haiku 4.5 $0.00008 $0.00080

Measured 1mo ago against content hash 8ba9852e45b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sql-analysis 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 1mo 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.

agentscope-examples/agents/agentscope-dataagent/src/main/resources/shared/agents/data-agent/skills/sql-analysis/SKILL.md · 75 lines

How it starts

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

SQL Analysis Skill

Repeatable SOP for turning a business question into a verifiable SQL answer.

Steps

  1. Restate the question as a metric. In one sentence, write: " by over , filtered by ". If any of those four (metric / grouping / window / filter) is missing or ambiguous, ask one clarifying question and stop. Do not guess.

  2. Locate the source. Decide where the data lives:

    • Look in knowledge/ first for any schema notes, data-dictionary entries, or prior query examples uploaded by the user.
    • If the right table is not obvious, delegate to the data-explorer sub-agent with the metric definition as the prompt — its job is to identify the canonical source.
  3. Draft the query. Write the SQL in a fenced sql block. Conventions:

    • Always include the time window in a WHERE clause — never query the full history "just in case".
    • Always SELECT an explicit column list — never SELECT * in an answer.
    • Use CTEs (WITH x AS (...)) over nested subqueries for anything beyond two levels of nesting.
    • Comment any non-obvious filter (-- excludes internal test accounts).
  4. Validate before reporting. Run the query and check:

    • Row count is in the ballpark you expected (1 row, 10 rows, ~30 daily buckets, etc.). A surprising row count is almost always a bug — investigate.
    • No NULLs in the grouping column unless that is the intended cohort.
    • At least one numeric sanity check: a known total, a known reference value, or a min/max range that matches reality.
    • If anything looks off, do not report the number — fix the query first.
  5. Write the report. Use this exact structure:

    ## Answer
    <one-sentence direct answer with the headline number(s)>
    
    ## Result
    <small markdown table — at most ~15 rows; for longer results, summarise
    and offer to render a chart or attach the full CSV>
    
    ## Query
    ```sql
    <the exact query you ran>
    

    Sources & validation

    • Table(s): schema.table_name (row count, freshness if known)
    • Validation:
    • Caveats: <known data quality issues, missing dates, etc.>

Read the full file on GitHub · 75 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. 1mo ago First seen · 75 lines · 79 tokens per session scan A 8ba9852e45b3

Subscribe to this mod's changes

sql-analysis is a skill published in the GitHub repository agentscope-ai/agentscope-java (6,013 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 800 once invoked, about $0.0003 per session on Opus 5.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-08-30.

Related

Other skills, from other repositories

p5.js

Production pipeline for interactive and generative visual art using p5.js. Creates browser-based sketches, generative art, data visualizations, interactive experiences, 3D scenes, audio-reactive visuals, and motion graphics — exported as HTML, PNG, GIF, MP4, or SVG. Covers: 2D/3D rendering, noise and particle systems…

agentic-in/elephant-agent · 152 tokens

ASCII Video

Production pipeline for ASCII art video — any format. Converts video/audio/images/generative input into colored ASCII character video output (MP4, GIF, image sequence). Covers: video-to-ASCII conversion, audio-reactive music visualizers, generative ASCII art animations, hybrid video+audio reactive, text/lyrics…

agentic-in/elephant-agent · 118 tokens

llama.cpp

Run LLM inference with llama.cpp on CPU, Apple Silicon, AMD/Intel GPUs, or NVIDIA — plus GGUF model conversion and quantization (2–8 bit with K-quants and imatrix). Covers CLI, Python bindings, OpenAI-compatible server, and Ollama/LM Studio integration. Use for edge deployment, M1/M2/M3/M4 Macs, CUDA-less…

agentic-in/elephant-agent · 90 tokens

Obliteratus

Remove refusal behaviors from open-weight LLMs using OBLITERATUS — mechanistic interpretability techniques (diff-in-means, SVD, whitened SVD, LEACE, SAE decomposition, etc.) to excise guardrails while preserving reasoning. 9 CLI methods, 28 analysis modules, 116 model presets across 5 compute tiers, tournament…

agentic-in/elephant-agent · 103 tokens

AudioCraft

PyTorch library for audio generation including text-to-music (MusicGen) and text-to-sound (AudioGen). Use when you need to generate music from text descriptions, create sound effects, or perform melody-conditioned music generation.

agentic-in/elephant-agent · 49 tokens

Segment Anything

Foundation model for image segmentation with zero-shot transfer. Use when you need to segment any object in images using points, boxes, or masks as prompts, or automatically generate all object masks in an image.

agentic-in/elephant-agent · 43 tokens