All skills
boshu2 avatar

/domain

@fdf7de6
by Boboshu2/agentops446 stars
42

Clarify domain terms, bounded contexts and repository conventions. Use when: naming, rule ownership or Go and other language standards are unclear; avoid a broad survey.

Use this Skill: https://skilld.dev/gh/boshu2/agentops/domain

This session only. Nothing lands on disk.

referencesstandardsjavascript.md

≈528 tokens on demand. Your agent reads this file only when SKILL.md points to it.

JavaScript Standards (Tier 1)

Required

  • ES2020 or newer (Node 18+ runtime).
  • prettier for formatting; eslint with the recommended ruleset.
  • package.json declares "type": "module" for new packages.

Style

  • const by default; let only when reassignment is required; never var.
  • Arrow functions for callbacks; named function for top-level declarations.
  • Strict equality (=== / !==) — no loose equality.
  • One module per file; default export only when the module is the unit.

Async

  • async/await over raw .then() chains.
  • Always await or explicitly handle returned Promises.
  • Reject errors with Error instances, never raw strings.

Error Handling

  • No empty catch {} blocks; either re-throw or log with context.
  • Use try/catch only at boundaries (HTTP, IO, IPC); let errors bubble inside pure logic.
  • Validate external input before use; trust internal callers.

Common Issues

Pattern Problem Fix
==, != Coerces types silently Use ===, !==
parseInt(x) Defaults to base 10 only since ES5 but easy to miss Pass radix: parseInt(x, 10)
for...in on arrays Iterates inherited enumerable props Use for...of or .forEach
Mutating shared state Hard-to-trace bugs Spread/Object.assign for copies; Array methods that return new arrays
Float arithmetic 0.1 + 0.2 !== 0.3 Round to integer cents before compare

Testing

  • Vitest or Jest; node --test is acceptable for small libraries.
  • Use describe / it blocks; one logical assertion per it.
  • Mock external services; don't mock the unit under test.
  • Snapshot tests only for stable serialized output, never for UI-rich strings.

Security

  • Never use eval(), Function(), or new Function() with untrusted input.
  • Sanitize HTML before injecting into the DOM; prefer textContent over innerHTML.
  • Use crypto.randomUUID() / crypto.getRandomValues(), not Math.random(), for tokens.
  • Pin dependency versions in package-lock.json or pnpm-lock.yaml; audit with npm audit before release.

Source: SKILL.md on GitHub

No alerts8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill is a domain-driven design utility for reconciling ubiquitous language. It includes validation scripts and comprehensive engineering standards. No security risks were identified.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

Signed by skilld at fdf7de6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week

README badge

README badge for boshu2/agentops/domain