Agent skill

Error Conventions

by joselado in joselado/pyqula

How pyqula raises errors -- which exception type for which failure, the registries behind string-selected options (mode=, solver=, channel=, operator names), and the shared Hilbert-space guards in…

GPL-3.0Auto-check passed

Install Error Conventions

skills CLI
$ npx skills add joselado/pyqula --skill error-conventions -a claude-code

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

GitHub CLI
$ gh skill install joselado/pyqula error-conventions --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/joselado/pyqula.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/error-conventions .claude/skills/error-conventions && 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
error-conventions
GitHub stars
145
Token cost
~1.1k tokens
SKILL.md length
452 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
GPL-3.0

At a glance

How pyqula raises errors -- which exception type for which failure, the registries behind string-selected options (mode=, solver=, channel=, operator names), and the shared Hilbert-space guards in…

  • SKILL.md covers The two forms that were swept…, Options selected by a string and Hilbert-space requirements
  • Calls python

What it does

Error Conventions is an agent skill from joselado/pyqula. How pyqula raises errors -- which exception type for which failure, the registries behind string-selected options (mode=, solver=, channel=, operator names), and the shared Hilbert-space guards in check.py. Load this before writing any raise statement in src/pyqula, before adding or changing an option selected by a string, and before writing a guard that checks whether a Hamiltonian is spinful, has Nambu or has a sublattice -- the package went through a deliberate sweep to reach this state and a hand-written…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Python library to compute properties of quantum tight binding models, including topological, electronic and magnetic properties and including the effect of many-body interactions. The licence is GPL-3.0.

Example prompts

  • “/error-conventions”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit a61709a. 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

    Shell commands in SKILL.md call:

    • python

    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

Error Conventions loads about 1.1k tokens when it runs. Until then it costs about 165 tokens; SKILL.md has 452 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~165
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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 joselado/pyqula at commit a61709a, republished under its GPL-3.0 licence (© joselado). 452 words, ~1,057 tokens.

Download SKILL.mdSave it as .claude/skills/error-conventions/SKILL.md (or your agent's skills folder).
name
error-conventions
description
How pyqula raises errors -- which exception type for which failure, the registries behind string-selected options (mode=, solver=, channel=, operator names), and the shared Hilbert-space guards in check.py. Load this before writing any raise statement in src/pyqula, before adding or changing an option selected by a string, and before writing a guard that checks whether a Hamiltonian is spinful, has Nambu or has a sublattice -- the package went through a deliberate sweep to reach this state and a hand-written guard undoes part of it. Also load it when reviewing a diff that adds error handling, or when a test asserts on an error message.

Error conventions

Argument and Hilbert-space guards raise a real exception with a message saying what the routine requires: ValueError for a bad input value or a Hamiltonian in the wrong Hilbert space, NotImplementedError for a combination that is simply not built yet, TypeError for a wrong type.

The two forms that were swept out

Neither should come back:

  • a bare raise, which surfaces as RuntimeError: No active exception to reraise and names neither the input nor the requirement
  • a bare raise NotImplementedError, which names the category but not what is unsupported

Where a guard's message can name the offending value -- the mode string, the two mismatched sizes, the type that was passed -- it does, rather than printing it and raising separately.

The expected bare-raise count is nine

The only bare raise left in src/pyqula is the jump-to-except idiom inside a try body (five sites), where it is control flow rather than an error report, plus four ordinary re-raises inside except handlers, which re-raise a live exception and are not the message-less form at all. An AST walk therefore finds nine bare raise nodes in the package. Nine is the expected count, not a regression:

bash
python -c "
import ast,os
n=0
for root,d,fs in os.walk('src/pyqula'):
    for f in fs:
        if not f.endswith('.py'): continue
        for node in ast.walk(ast.parse(open(os.path.join(root,f)).read())):
            if isinstance(node,ast.Raise) and node.exc is None: n+=1
print(n)"

Options selected by a string

An option selected by a string (mode=, solver=, channel=, an operator name) lists the accepted values in the error, so that a typo is self-diagnosing.

Five dispatches go one step further and keep their names in a registry, so the accepted set can be enumerated and adding a name is one dict entry rather than a new elif branch. What matters is that the advertised list is derived from the registry instead of being a second list maintained by hand beside the chain -- that is what stops the two from drifting, which is the failure this shape exists to prevent:

dispatchregistrynames
named operatorsoperatorlist.pyoperatorlist.get_operator_names()
mean-field guesses (mf=)meanfield.pymeanfield.get_guess_names()
pairing symmetries (mode=)sctk/pairing.pypairing.get_pairing_modes()
high-symmetry kpoint labelskpointstk/labels.pylabels.get_label_names()
h.extract(name) quantitiesextract.pyextract.get_extractable_names()

A new string-selected option should follow that shape rather than adding an elif.

Show full SKILL.md (114 more words)Show less

Hilbert-space requirements

These go through three shared guards in check.py:

  • require_spin(h,what)
  • require_nambu(h,what)
  • require_sublattice(h,what)

where what is the noun phrase the message opens with ("an exchange field", "the d-vector"). They supply the fixed tail naming the remedy (h.turn_spinful(), h.setup_nambu_spinor()), so a new routine does not reinvent either the wording or the fix. Use them instead of a hand-written raise ValueError("... needs a spinful Hamiltonian").

Two families of guard carry more information than the generic one and are deliberately left as they are: the check_mode("spinful_nambu") family, which names both flags' values, and the local Hubbard-U guard, which points at the spinless V1/V2/V3/Vr alternative. When a specific message says more than the shared one would, keep it.

© joselado, GPL-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

Just SKILL.md in .claude/skills/error-conventions of joselado/pyqula.

Open the folder on GitHubat commit a61709a

Compare with similar skills

Error Conventions 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.

Error Conventions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Conventions this skilljoselado/pyqula145—~1.1kAutomated safety check: PassGPL-3.0
Ecc Conventionsaffaan-m/ECC275k—~2.8kAutomated safety check: PassMIT
Logistics Exception Managementaffaan-m/ECC275k4 repos~4.2kAutomated safety check: PassApache-2.0
Raisely AutomationComposioHQ/awesome-claude-skills77k3 repos~730Automated safety check: PassNone
Naming Conventionsthedaviddias/Front-End-Checklist74k—~481Automated safety check: PassMIT
Conventional CommitJanDeDobbeleer/oh-my-posh24k—~1.2kAutomated safety check: NotesMIT

Similar skills

  • Ecc Conventions

    affaan-m/ECC

    Development conventions and patterns for ECC. An agent skill from affaan-m/ECC.

    275k GitHub stars~2.8k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Codified freight-exception handling expertise for shipment delays, damages, losses, shortages, and carrier disputes, with escalation protocols, carrier-specific behaviors by mode, claims procedures…

    275k GitHub starsUsed in 4 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Raisely Automation

    ComposioHQ/awesome-claude-skills

    Automate Raisely tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~730 tokens
    Productivity & AutomationAuto-check passed
  • Naming Conventions

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets, component styles, and responsive behavior related to Use consistent CSS naming conventions.

    74k GitHub stars~481 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Conventional Commit

    JanDeDobbeleer/oh-my-posh

    Workflow for generating conventional commit messages following the Conventional Commits specification.

    24k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Registry Changelog

    udecode/plate

    Author and verify Plate registry changelog entries for user-visible registry UI, kit, example, and registry metadata changes.

    17k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from joselado/pyqula

  • Refresh Docs

    joselado/pyqula

    Refresh pyqula's documentation after a change - recount the test suite, propagate every number that moved, re-run the static user-guide checks, and rebuild documentation/userguide.pdf.

    145 GitHub stars~816 tokensUpdated yesterday
    Auto-check passed
  • New Feature

    joselado/pyqula

    The completeness checklist for adding a user-facing feature to pyqula - where the implementation goes, what kind of test it needs, and the five documentation surfaces that must move with it.

    145 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • GPU Backend

    joselado/pyqula

    pyqula's CPU/GPU switch (src/pyqula/gpu.py), how a routine is routed onto the device, per-call precision, and the tiered porting plan in documentation/gpuportingplan.md.

    145 GitHub stars~679 tokensUpdated yesterday
    Auto-check passed
  • User Guide Voice

    joselado/pyqula

    The maintainer's writing voice for documentation/userguide.md -- the three registers (chapter prose, section intros, catalogue bullets), the spelling decisions, what not to write, and which chapters…

    145 GitHub stars~985 tokensUpdated yesterday
    Auto-check passed
  • Wannierization

    joselado/pyqula

    pyqula's Wannierization (wanniertk/), what h.getwannierhamiltonian() returns, the disentanglement window keywords and which combinations raise NotImplementedError, and the bundled pure-Python…

    145 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Questions about Error Conventions

What does Error Conventions do?

How pyqula raises errors -- which exception type for which failure, the registries behind string-selected options (mode=, solver=, channel=, operator names), and the shared Hilbert-space guards in…. Error Conventions is an agent skill from joselado/pyqula.py.

How do I install Error Conventions in Claude Code?

Run `npx skills add joselado/pyqula --skill error-conventions -a claude-code`. Or copy the skill folder (.claude/skills/error-conventions in joselado/pyqula) into .claude/skills/error-conventions in your project. Claude Code loads it when a task matches its description.

How do I install Error Conventions in Codex?

Run `npx skills add joselado/pyqula --skill error-conventions -a codex`. Or copy the skill folder (.claude/skills/error-conventions in joselado/pyqula) into .agents/skills/error-conventions in your project. Codex loads it when a task matches its description.

Can I use Error Conventions 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 joselado/pyqula --skill error-conventions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-conventions, .gemini/skills/error-conventions, .github/skills/error-conventions and .opencode/skills/error-conventions in your project.

What does Error Conventions need to run?

Going by SKILL.md and its folder, Error Conventions needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Error Conventions 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 Error Conventions 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 Error Conventions use?

Error Conventions is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Conventions use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Error Conventions?

Skills that share tags, products or a category with Error Conventions: Ecc Conventions (affaan-m/ECC, 275k stars), Logistics Exception Management (affaan-m/ECC, 275k stars), Raisely Automation (ComposioHQ/awesome-claude-skills, 77k stars) and Naming Conventions (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Conventions?

joselado (a GitHub user) maintains it in joselado/pyqula, which has 145 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 7, 2026.

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