gmt-integration

Integrates GMT date handling into application frameworks with stable cache keys and epoch bridges.

6|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/northguild/gmt --skill gmt-integration-northguild
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gmt-integration
Source: https://github.com/northguild/gmt/tree/main/packages/gmt/skills/gmt-integration
Command: npx skills add https://github.com/northguild/gmt --skill gmt-integration-northguild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @northguild/gmt.

What problem does it solve? Integrating a Temporal-first date library into real applications raises boundary questions: how to build stable cache keys and router params from dates, how to move nanosecond timestamps across JSON and databases without precision loss, how to convert foreign epochs like NTP or Excel serials, and which lint plugin to install for Date-ban enforcement. ## Core Features & Use Cases - Stable boundary representations: Build cache keys, router params, and table-sort keys from validated ISO 8601 strings and normalized epoch numbers instead of Date objects. - Nanosecond-safe serialization: Keep bigint nanoseconds internally, cross JSON with formatNanoseconds/parseNanoseconds, and truncate to the target store's precision (e.g., PostgreSQL microseconds) before persisting. - Foreign epoch bridges: Convert to and from NTP timestamps, Windows FILETIME, .NET ticks, Excel day serials, and PostgreSQL microseconds using the precision/convert helpers. - Lint package selection: Match the project's toolchain to @northguild/gmt-eslint, @northguild/gmt-biome, or @northguild/gmt-oxlint. - Use Case: A user storing event timestamps in PostgreSQL uses toNanoseconds internally, truncates to microseconds before insert, and validates timezone ids with isValidTimeZone before using them as cache keys. ## Quick Start Ask the assistant to help integrate @northguild/gmt into your app, for example to build validated date cache keys or convert an Excel serial date to an ISO string.

Frequently Asked Questions about gmt-integration

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

FAQPage Schema
How do I create stable cache keys for dates in JavaScript?▼

Use ISO 8601 strings or normalized epoch numbers as cache keys, never Date objects or fuzzy strings. Validate timezone ids with isValidTimeZone before using them as keys, since invalid zones are sentinel failures rather than real zones.

How do I store nanosecond timestamps in PostgreSQL?▼

Keep nanoseconds as bigint internally, then call truncateNanoseconds(ns, "us") before writing, because PostgreSQL timestamptz holds only microseconds. Without truncation the read-back value will not equal what was written.

Which lint plugin should I use to ban Date in my project?▼

Match the plugin to your existing toolchain: @northguild/gmt-eslint for ESLint, @northguild/gmt-biome for Biome, or @northguild/gmt-oxlint for Oxlint. Install only the one matching your linter; they are toolchain-specific, not mutually exclusive.

Can I convert Excel serial dates or NTP timestamps to ISO strings?▼

Yes, the precision/convert bridges handle NTP, FILETIME, .NET ticks, Excel serials, and PostgreSQL microseconds. Note that Excel serial 60 is the phantom 1900-02-29 and returns an empty string, and fromNtpTimestamp requires the era because NTP seconds wrap every ~136 years.

Why does JSON.stringify throw on nanosecond timestamps?▼

JSON.stringify throws on raw bigint values, and nanoseconds since the epoch exceed the safe integer range of number. Use formatNanoseconds to send the decimal string over the wire and parseNanoseconds to restore the bigint on the other side.