Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/generous-corp/pulp/timebasenpx skills add Generous-Corp/pulp --skill timebasegit clone --depth 1 https://github.com/Generous-Corp/pulpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/generous-corp/pulp/timebase)<a href="https://agentmods.dev/skills/generous-corp/pulp/timebase"><img src="https://agentmods.dev/badge/skills/generous-corp/pulp/timebase.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.03646 |
| Opus 5 | $0.00021 | $0.01823 |
| Sonnet 5 | $0.00008 | $0.00729 |
| Haiku 4.5 | $0.00004 | $0.00365 |
Grade A, and why
timebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 259 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Timebase
Use this skill when changing core/timebase, tempo conversion, or the transport
quantizer's beat/frame arithmetic.
Contracts
kTicksPerQuarteris 705,600. Musical positions are stored and accumulated as integerTickPosition; samples use integerSamplePosition. Tick-position, duration, andMonotonicBeatarithmetic saturates at the signed 64-bit endpoints; it must not invoke signed-overflow UB.TempoMapandMeterMapare editable document values built through nonthrowing factories. Their first point is tick zero and points are strictly ordered. Meter changes must compile on exact preceding bar boundaries.CompiledTempoMapis immutable and sample-rate-specific. Construct it only throughCompiledTempoMap::compile()and handleTempoMapError; public throwing construction is forbidden. Its first tempo point is tick zero, points are strictly ordered, and BPM is finite in[1, 1000].- Tempo ramps are BPM-linear in tick position. Integrate them analytically; do not approximate ramps block-by-block or accumulate floating-point deltas.
- Every segment begins at an integer sample anchor.
samples_to_ticks()returns the first canonical tick mapping to that sample when one exists. Exact sample -> tick -> sample requires a tick grid at least as dense as samples. On a sparser grid, useresolve_sample()and inspectrepresented_sample,absolute_error_samples, andexact; the nearest tick is returned. - Arbitrary tick -> sample -> tick cannot be identity because many ticks share an integer sample. Test monotonicity and canonical-sample preservation instead.
- Render-time phase mapping may use
fractional_ticks_to_samples()and its analytic inversefractional_samples_to_ticks(). Both retain the compiled integer segment anchors but avoid rounding their input/output domains; keep ramp round-trip coverage at fractional interior positions. TempoCursoris the allocation-free playback path. Monotonic sample advances consume segment transitions once (amortized O(1)); seeks and loop wraps reset it explicitly. Differential tests must match cold-map canonical results.CompiledMeterMapuses zero-based bars and exact integer bar/tick conversion. Tempo changes never affect bar conversion and meter changes never affect tick/sample conversion. Conversion is total acrossINT64_MIN..INT64_MAX: exact results are returned when representable and out-of-range results saturate without signed-overflow UB.- Keep
TransportQuantizer's public behavior stable. Generic beat/frame/grid arithmetic belongs in<pulp/timebase/quantize.hpp>and the format wrapper delegates to it. BeatDivisionis an append-only persisted ordinal vocabulary. Append new values immediately beforeCount, assign every ordinal explicitly, and keepbeat_fraction()reduced.division_ticks()must fail if a future fraction is not exactly representable on the 705,600-tick quarter-note lattice.BeatDivisionowns the canonical fraction table. The oldersignal::units::Divisionvocabulary is a compatibility adapter: preserve its lowercase public spellings and persisted ordinals, map it toBeatDivision, and derive its beat values frombeat_fraction_or(). Append both enums in the same change and keep exhaustive compile-time and runtime parity coverage intest_signal_units.cpp; never add a second division formula in signal.- Grid projection consumes explicit document and monotonic anchors in
GridProjectionRange; it does not infer transport state from an unwrapped sample clock. This matchesplayback::MasterTransport: pre-loop material uses its ordinary document interval, loop passes repeat the loop's document sample interval and tempo image, and seeks change the document anchor without resettingMonotonicBeat. Ranges and callbacks are half-open, so splitting a callback cannot duplicate a boundary. Keep capacity and signed-domain failure explicit and leave caller output untouched on insufficient capacity. Bound candidate opportunities before entering either timeline- or bar-grid loops; counting only emitted points leaves incoherent remote-sample ranges able to burn unbounded callback time. - For document-clock projection, enumerate the rounded end tick as a candidate
and let
[timeline_sample_start, timeline_sample_start + frame_count)decide ownership. Sparse maps can give a valid one-frame transport range equal rounded tick endpoints (at 1 BPM/48 kHz, tick 0 maps to sample 0 and tick 1 to sample 4). Returning early drops tick 0 from a1 + 3split even though a four-frame block emits it; excluding the end candidate merely moves the bug. The next range's sample filter prevents duplication. - A host-beat-mapped transport range carries fractional host tick endpoints and
maps an exact document tick proportionally into output frames. Preserve that
metadata in the dependency-lower grid range and match playback's half-open,
floor-to-frame rule. Range-local proportions are not callback invariant when
a loop boundary's output count was rounded. Retain one
HostGridAnchor(normalized source tick, absolute frame, ticks per frame) across the continuous session interval, give each range its absolute first frame and loop-pass document-to-source offset, and floor on that stable clock before clamping to the owning half-open range. Initialize the source tick from the first resolved range in a normalization epoch, not from an absolute host beat that the transport has already wrapped into document coordinates; reset the anchor on an epoch or slope discontinuity. Never feed such a range throughCompiledTempoMap::ticks_to_samples(): session tempo is independent of the document tempo, including on split loop ranges. project_ratchet_interval()treats the hit count as including the onset and excludes the later clock boundary. It distributes integer-tick remainders from the original interval coordinates on every projection; do not advance a floating-point phase or carry remainder state between callbacks. Half-open windows must concatenate to the same schedule as one whole-window call. Reject a hit count greater than the integer-tick span rather than emitting duplicate positions.LoopRegion(<pulp/timebase/loop_region.hpp>) is two document positions plus whether they are in force, and it lives here rather than beside a consumer because that is the whole of it.playback::LoopRegionis an alias of it andtimeline_editor::UiPlayhead::loopnames it directly, so the rung that runs the transport and the rung that draws the ruler cannot drift apart.enabledgates wrapping, not existence: a disabled loop keeps its bounds so a view goes on drawing the region and re-enabling returns the user to it.- A value type both the transport rung and the editor rung need belongs here,
and this module is the only place it can go.
playback's floor andtimeline_editor's floor exclude each other;timebaseis in both, so it is their entire intersection apart fromplatform/runtime. Reaching for a shared home anywhere else means widening a floor row, which is the thing the ladder exists to prevent. Before adding one, confirm the intersection still holds inMODULE_FLOORS(timeline_engine_dependency_floor_check.py) rather than assuming it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 259 lines · 42 tokens per session scan A ba11a2506c99
timebase is a skill published in the GitHub repository Generous-Corp/pulp (16 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 3,646 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…