write-hql

write-hql is a skill for Claude Code from harness/harness-ai. It costs 143 tokens per session (3,109 once invoked), scanned A, a copy of write-hql, Apache-2.0.

A guide for writing and running HQL, Harness Query Language, against Harness data. It helps query information about pipelines, deployments, continuous integration, and security.

In plain words
What is it for?
Use it to answer counts and rankings, find trends and failure rates, investigate slow or failing processes, and analyze Harness records.
Why use it?
It helps avoid invalid queries by finding available data types and fields and checking the query before running it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the harness plugin — 73 skills, 1 MCP server shipped together

Good fit Use it to answer counts and rankings, find trends and failure rates, investigate slow or failing processes, and analyze Harness records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/harness/harness-ai/write-hql
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 harness/harness-ai --skill write-hql
Clone the repo
git clone --depth 1 https://github.com/harness/harness-ai

Made for: Claude Code.

Or install harness, the plugin that ships this one along with the rest of its 73 skills, 1 MCP server.

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 write-hql

README.md
[![agentmods](https://agentmods.dev/badge/skills/harness/harness-ai/write-hql/github.svg)](https://agentmods.dev/skills/harness/harness-ai/write-hql)
Your own site
<a href="https://agentmods.dev/skills/harness/harness-ai/write-hql"><img src="https://agentmods.dev/badge/skills/harness/harness-ai/write-hql/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 write-hql

Your own site · 80×15
<a href="https://agentmods.dev/skills/harness/harness-ai/write-hql"><img src="https://agentmods.dev/badge/skills/harness/harness-ai/write-hql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,109 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 100% copy Near-identical to another mod 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.00143 $0.03109
Opus 5.5 $0.00057 $0.01244
Sonnet 5.5 $0.00029 $0.00622
Haiku 4.5 $0.00014 $0.00311

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

Security

Grade A, and why

write-hql 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.

Origin

This is a copy

100% identical to write-hql — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/claude/skills/write-hql/SKILL.md · 221 lines

How it starts

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

Write HQL

Write, validate, and run HQL queries against Harness data, primarily for dashboard widget creation. This skill teaches the query language, the type discovery workflow, and the validation loop. For non-dashboard multi-query analysis (overview, drill-down, synthesis), also follow analysis-workflow.md.

Instructions

Step 0: Learn HQL syntax

Read the companion files in this skill directory before writing any queries:

  • reference.md — practical examples, type casting rules, JOIN syntax, anti-patterns.
  • references/patterns/*.md — worked query patterns per question shape (failure-diagnosis, build-time-analysis, bottleneck-analysis, flakiness, retry-signals, intermittent-vs-consistent, lint-first, batch).
  • references/entity-reference/ci.md — CI-native field discipline (stage_build_time vs duration, start_timestamp vs start_ts).

Fetch the live grammar via harness_get(resource_type='kg_grammar') only when the reference files do not cover the syntax you need.

Step 1: Discover queryable types (summaries only)

harness_list(resource_type='kg_queryable_type_summary')

You can filter by object kind to reduce the response:

harness_list(resource_type='kg_queryable_type_summary', kinds=['OBJECT_KIND_VIEW'])

This returns lightweight summaries: identifier (type_id for HQL), name, description, kind (OBJECT_KIND_*), connectorId, tags. Pick 1-5 types relevant to the user's question.

IMPORTANT: The only valid filter parameters are kinds (OBJECT_KIND_*) and annotations. Do NOT pass filters, name, compact, or any other made-up parameters — they are silently ignored and you will get the full unfiltered list.

Treat the returned list as authoritative and complete: if a type is not in it, you cannot query it. Do not guess or recall identifiers from earlier conversations, other accounts, or examples.

Selection criteria:

  • Match by name to user intent
  • For cost/billing → types with "ccm", "cost", "billing" in the name
  • For pipelines/CI-CD → types with "pipeline", "stage", "execution" in the name
  • For issues/tickets → types with "issue", "ticket", "jira", "sei" in the name
  • For security → types with "sto", "vulnerability", "scan" in the name
  • For audit/activity → types with "audit", "event", "activity" in the name
  • For infrastructure → types with "kubernetes", "cloud", "infrastructure" in the name
  • Consider type annotations to understand semantic purpose
  • Prefer OBJECT_KIND_VIEW over OBJECT_KIND_ENTITY when both cover the same data
  • Select 1-5 types that best match the user's query
  • Note connectorId for each selected type — you need this for JOIN rules

Read the full file on GitHub · 221 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 Changed · +20 lines · +9 tokens per session 54d753ea7a43
  2. 1mo ago First seen · 201 lines · 134 tokens per session scan A a2d2ceeec42d

Subscribe to this mod's changes

write-hql is a skill published in the GitHub repository harness/harness-ai (35 stars, last pushed today), licensed Apache-2.0. It adds 143 tokens to every session and 3,109 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to write-hql, differing in 0 lines, and is treated as a copy.

Related

write-hql compared with skills from other repositories

write-hql next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
write-hqlharness/harness-aiSkill35todayApache-2.0A143Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k5d agoMITA21Claude Code