utility-core

Document and standardize shared TypeScript utility helpers for Madoc services.

57|15|Updated Nov 28, 2018
One-click install
npx skills add https://github.com/digirati-co-uk/madoc-platform --skill utility-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: utility-core
Source: https://github.com/digirati-co-uk/madoc-platform/tree/main/.agents/skills/utility-core
Command: npx skills add https://github.com/digirati-co-uk/madoc-platform --skill utility-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Changes to shared utility helpers can introduce subtle bugs, cross-service incompatibilities, and runtime failures; this Skill helps document, validate, and guide safe updates to Madoc's common TypeScript utilities to reduce regressions and ensure consistent behavior.

Core Features & Use Cases

  • JWT helpers: review, parse, verify, and sign token helpers to ensure correct validation and compatibility across services.
  • IIIF and metadata mapping: standardize IIIF helpers and metadata transformations for consistent indexing and display logic.
  • Error and Slonik utilities: maintain error classes, request helpers, and Slonik helpers to keep deterministic behavior and reliable database interactions.
  • Use Case: when updating parse-jwt or verify-signed-token, the Skill guides changes, recommends tests, and checks for browser/server compatibility.

Quick Start

Use the utility-core skill to review services/madoc-ts/src/utility/parse-jwt.ts and propose a safe, deterministic refactor with test coverage and cross-environment compatibility.

Frequently Asked Questions about utility-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely refactor shared TypeScript utilities without breaking cross-service compatibility?

Standardize shared TypeScript utility helpers by ensuring deterministic, side-effect-free implementations and cross-environment compatibility for server and browser contexts to prevent subtle bugs and cross-service incompatibilities during updates.

How does TypeScript JWT parsing and verification work across different environments?

TypeScript JWT parsing and verification works across environments by applying deterministic, side-effect-free helper functions that standardize token validation and signing for consistent behavior across server and browser contexts.

Can I use Slonik database utilities for unit and integration testing in TypeScript?

Yes, Slonik database utilities provide clear test and integration entry points for unit and integration testing scenarios, ensuring deterministic behavior and reliable database interactions during safe refactors.

What's the best way to standardize IIIF helpers and metadata mapping in TypeScript?

Standardize IIIF helpers and metadata transformations by documenting and validating the mapping logic to ensure consistent indexing and display behavior across all Madoc services.

Why do shared TypeScript error classes and request helpers need side-effect-free implementations?

Shared TypeScript error classes and request helpers need side-effect-free implementations to maintain deterministic behavior, reduce regressions, and ensure consistent runtime behavior across services during updates.

What are the limitations when updating shared TypeScript utility helpers across services?

Limitations include potential subtle bugs, cross-service incompatibilities, and runtime failures if changes lack proper test coverage, documentation, and cross-environment compatibility checks for server and browser contexts.