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.
npx skills add harness/harness-ai --skill write-hqlgit clone --depth 1 https://github.com/harness/harness-aiWrote 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.
[](https://agentmods.dev/skills/harness/harness-ai/write-hql)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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_timevsduration,start_timestampvsstart_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
connectorIdfor each selected type — you need this for JOIN rules
What ships with it
11 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- reference.md 6.7 KB
- references/analysis-workflow.md 6.6 KB
- references/entity-reference/ci.md 1.7 KB
- references/patterns/batch.md 1.3 KB
- references/patterns/bottleneck-analysis.md 1.8 KB
- references/patterns/build-time-analysis.md 1.7 KB
- references/patterns/failure-diagnosis.md 1.9 KB
- references/patterns/flakiness.md 2.6 KB
- references/patterns/intermittent-vs-consistent.md 1.6 KB
- references/patterns/lint-first.md 1.7 KB
- references/patterns/retry-signals.md 1.6 KB
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.
- 1mo ago Changed · +20 lines · +9 tokens per session 54d753ea7a43
- 1mo ago First seen · 201 lines · 134 tokens per session scan A a2d2ceeec42d
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.
write-hql compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| write-hqlharness/harness-ai | Skill | 35 | today | Apache-2.0 | A | 143 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 82k | today | MIT | A | 200 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 102k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 396k | today | MIT | A | 36 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | today | CC0-1.0 | A | 113 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 332k | 5d ago | MIT | A | 21 | Claude Code |