Agent skill

Writing Hashql Diagnostics

by hashintel in hashintel/hash

HashQL diagnostic writing patterns using hashql-diagnostics crate.

AGPL-3.0Auto-check passedDevelopment

Install Writing Hashql Diagnostics

skills CLI
$ npx skills add hashintel/hash --skill writing-hashql-diagnostics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hashintel/hash writing-hashql-diagnostics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hashintel/hash.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/writing-hashql-diagnostics .claude/skills/writing-hashql-diagnostics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
writing-hashql-diagnostics
GitHub stars
1.7k
Token cost
~724 tokens
SKILL.md length
150 words
Files
2 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
AGPL-3.0

At a glance

HashQL diagnostic writing patterns using hashql-diagnostics crate.

  • Creating error messages
  • SKILL.md covers Core Principles, Quick Reference and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Severity levels

What it does

Writing Hashql Diagnostics is an agent skill from hashintel/hash. HashQL diagnostic writing patterns using hashql-diagnostics crate. Use when creating error messages, warnings, Labels, Messages, Severity levels, Patches, Suggestions, or improving diagnostic quality in HashQL code.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/guidelines.md`).

It sits in Development. The repository describes itself as: 🚀 The open-source, multi-tenant platform for self-building knowledge graphs and simulation. The licence is AGPL-3.0.

When your agent uses it

  • Creating error messages
  • Severity levels
  • Improving diagnostic quality in HashQL code

Example prompts

  • “/writing-hashql-diagnostics”

What it can do on your machine

Read from SKILL.md and the folder at commit 1fa0c7b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Writing Hashql Diagnostics loads about 724 tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 150 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~724
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hashintel/hash at commit 1fa0c7b, republished under its AGPL-3.0 licence (© hashintel). 150 words, ~724 tokens.

Download SKILL.mdSave it as .claude/skills/writing-hashql-diagnostics/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
writing-hashql-diagnostics
description
HashQL diagnostic writing patterns using hashql-diagnostics crate. Use when creating error messages, warnings, Labels, Messages, Severity levels, Patches, Suggestions, or improving diagnostic quality in HashQL code.
license
AGPL-3.0

HashQL Diagnostic Writing

Provides HASH-specific patterns for writing high-quality diagnostics using the hashql-diagnostics crate, ensuring messages are helpful, actionable, and follow consistent style conventions.

Core Principles

Diagnostics should be helpful, not just correct:

✅ DO:

  • Start messages with lowercase
  • Use backticks for code elements: expected `bool`, found `String`
  • Make messages actionable and specific
  • Use "invalid" not "illegal"
  • Keep help messages as imperatives: "add type annotations"

❌ DON'T:

  • End messages with punctuation (unless multi-sentence)
  • Use apologetic language ("sorry", "unfortunately")
  • Write vague messages ("something went wrong")
  • Capitalize message starts (unless code identifier)

Quick Reference

Creating a Diagnostic
rust
use hashql_diagnostics::{Diagnostic, Label, Message, Severity};

let mut diagnostic = Diagnostic::new(category, Severity::Error)
    .primary(Label::new(span, "expected `bool`, found `String`"));

diagnostic.add_label(Label::new(other_span, "expected because of this"));
diagnostic.add_message(Message::help("try using a comparison"));
Severity Levels
SeverityWhen to Use
BugInternal compiler error
FatalUnrecoverable error
ErrorMust be fixed to compile
WarningSuspicious code to review
NoteInformational context
Message Style
rust
// ✅ Good
"cannot find variable `count` in this scope"
"expected `;` after expression"

// ❌ Bad
"Error: Variable not found."  // capitalized, punctuation
"Sorry, there's a type mismatch"  // apologetic
Adding Suggestions
rust
use hashql_diagnostics::{Message, Patch, Suggestions};

let suggestion = Suggestions::patch(Patch::new(span, "corrected_code"));
diagnostic.add_message(
    Message::help("fix the typo").with_suggestions(suggestion)
);

References

© hashintel, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/writing-hashql-diagnostics of hashintel/hash.

  • SKILL.md
  • references/guidelines.md

Open the folder on GitHubat commit 1fa0c7b

Compare with similar skills

Writing Hashql Diagnostics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Writing Hashql Diagnostics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Writing Hashql Diagnostics this skillhashintel/hash1.7k—~724Automated safety check: PassAGPL-3.0
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from hashintel/hash

All 17 skills in this repo
  • Documenting Rust Code

    hashintel/hash

    Rust documentation practices for HASH codebase. An agent skill from hashintel/hash.

    1.7k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Handling Rust Errors

    hashintel/hash

    HASH error handling patterns using error-stack crate. An agent skill from hashintel/hash.

    1.7k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Cargo.toml dependency management patterns for HASH workspace.

    1.7k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Testing Hashql

    hashintel/hash

    HashQL testing strategies including compiletest (UI tests), unit tests, and snapshot tests.

    1.7k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Writing Hashql Jexpr

    hashintel/hash

    HashQL J-Expr syntax for writing queries. An agent skill from hashintel/hash.

    1.7k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when creating, moving, splitting, or organizing TypeScript files and folders.

    1.7k GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Categories

Questions about Writing Hashql Diagnostics

What does Writing Hashql Diagnostics do?

HashQL diagnostic writing patterns using hashql-diagnostics crate. Writing Hashql Diagnostics is an agent skill from hashintel/hash. HashQL diagnostic writing patterns using hashql-diagnostics crate.

When should I use Writing Hashql Diagnostics?

Writing Hashql Diagnostics fits situations like: creating error messages; severity levels; improving diagnostic quality in HashQL code.

How do I install Writing Hashql Diagnostics in Claude Code?

Run `npx skills add hashintel/hash --skill writing-hashql-diagnostics -a claude-code`. Or copy the skill folder (.agents/skills/writing-hashql-diagnostics in hashintel/hash) into .claude/skills/writing-hashql-diagnostics in your project. Claude Code loads it when a task matches its description.

How do I install Writing Hashql Diagnostics in Codex?

Run `npx skills add hashintel/hash --skill writing-hashql-diagnostics -a codex`. Or copy the skill folder (.agents/skills/writing-hashql-diagnostics in hashintel/hash) into .agents/skills/writing-hashql-diagnostics in your project. Codex loads it when a task matches its description.

Can I use Writing Hashql Diagnostics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hashintel/hash --skill writing-hashql-diagnostics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-hashql-diagnostics, .gemini/skills/writing-hashql-diagnostics, .github/skills/writing-hashql-diagnostics and .opencode/skills/writing-hashql-diagnostics in your project.

What does Writing Hashql Diagnostics need to run?

SKILL.md names no scripts, command-line tools or credentials: Writing Hashql Diagnostics is instructions for the agent only.

Does Writing Hashql Diagnostics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Writing Hashql Diagnostics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Writing Hashql Diagnostics use?

Writing Hashql Diagnostics is published under the AGPL-3.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Writing Hashql Diagnostics use?

About 724 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.

What are the alternatives to Writing Hashql Diagnostics?

Skills that share tags, products or a category with Writing Hashql Diagnostics: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing Hashql Diagnostics?

hashintel (a GitHub organization) maintains it in hashintel/hash, which has 1,668 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

Source: hashintel/hash on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.