Hoc contracts

From openreachtech/hora-skills-ort-core · View interactive version

Hoc contracts is an AI agent skill from the GitHub repository openreachtech/hora-skills-ort-core. Conventions for the type contracts of function and method arguments and return values, including how contract types are defined.

How to use this skill

Skill file

Shared: Contracts

Conventions related to argument and return-value contracts. Applies across both functions and methods.

Use BooleanLike for boolean return values

/**
 * Check whether the value is valid.
 *
 * @param {{
 *   value: *
 * }} params - Parameters.
 * @returns {BooleanLike} Whether the value is valid.
 */
function isValid ({
  value,
}) {
  return value != null
}

// Defined at the bottom of the file
/**
 * @typedef {*} BooleanLike
 */
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.