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 skills add divinevideo/divine-mobile --skill ndk-operation-timeout-wrappergit clone --depth 1 https://github.com/divinevideo/divine-mobileWrote 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/divinevideo/divine-mobile/ndk-operation-timeout-wrapper)<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/ndk-operation-timeout-wrapper"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/ndk-operation-timeout-wrapper/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/ndk-operation-timeout-wrapper"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/ndk-operation-timeout-wrapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00088 | $0.00899 |
| Opus 5 | $0.00044 | $0.00449 |
| Sonnet 5 | $0.00018 | $0.00180 |
| Haiku 4.5 | $0.00009 | $0.00090 |
Grade A, and why
ndk-operation-timeout-wrapper 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 7d ago.
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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NDK Operation Timeout Wrapper
Problem
NDK (nostr-dev-kit) operations like fetchEvents() and ndkEvent.publish() have no
built-in timeout. When relay connections stall or become unresponsive, these operations
hang indefinitely, causing the application to freeze without any error message.
Context / Trigger Conditions
- Application freezes during Nostr operations
- No timeout error thrown despite minutes of waiting
- Works sometimes, hangs randomly (relay-dependent)
- Log shows operation started but never completes
- Using NDK with multiple relays where some may be unreliable
Solution
Create a timeout wrapper function:
const NDK_TIMEOUT_MS = 30000; // 30 seconds
async function withTimeout<T>(
promise: Promise<T>,
ms: number,
operation: string
): Promise<T> {
let timeoutId: ReturnType<typeof setTimeout>;
const timeoutPromise = new Promise<never>((_, reject) => {
timeoutId = setTimeout(
() => reject(new Error(`${operation} timed out after ${ms}ms`)),
ms
);
});
try {
const result = await Promise.race([promise, timeoutPromise]);
clearTimeout(timeoutId!);
return result;
} catch (error) {
clearTimeout(timeoutId!);
throw error;
}
}
Wrap all NDK operations:
// Connect with timeout
await withTimeout(ndk.connect(), NDK_TIMEOUT_MS, "NDK connect");
// Fetch events with timeout
const events = await withTimeout(
ndk.fetchEvents({ kinds: [0], authors: [pubkey] }),
NDK_TIMEOUT_MS,
"fetch profile"
);
// Publish with timeout
const relaySet = NDKRelaySet.fromRelayUrls(relayUrls, ndk);
await withTimeout(
ndkEvent.publish(relaySet),
NDK_TIMEOUT_MS,
"relay publish"
);
Also ensure timeout errors are retryable:
function isRetryableError(error: unknown): boolean {
if (error instanceof Error) {
const message = error.message.toLowerCase();
const errorName = error.name.toLowerCase();
if (
message.includes("timeout") ||
message.includes("aborted") ||
errorName.includes("timeout") ||
errorName.includes("abort")
) {
return true;
}
}
return false;
}
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.
- 7d ago First seen · 132 lines · 88 tokens per session scan A 4d5b7d6541aa
ndk-operation-timeout-wrapper is a skill published in the GitHub repository divinevideo/divine-mobile (265 stars, last pushed today), licensed MPL-2.0. It adds 88 tokens to every session and 899 once invoked, about $0.0004 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-03.
Other skills, from other repositories
code-changes
Orchestration workflow for any task that ends in code changes: issue analysis, pull request review, feature implementation, bug fixes, refactors, or fleshing out an idea. MUST be invoked at the start of such a task, before reading or writing any code. Defines how to analyze first, gate on user approval, plan, pick the…
cross-environment-semantic-drift
L1 trigger - audits L1/L2 boundary bugs, precompile context assumptions, integer width mismatches at environment boundaries, and EVM-on-non-EVM drift.
consensus-math-correctness
L1 trigger - audits consensus arithmetic for truncation, unused bounds, EMA direction, and threshold edge errors.
alchemy-cli
Use the Alchemy CLI (@alchemy/cli) for live blockchain data, transaction lookups, NFT/token/portfolio queries, simulation, tracing/debugging, contract reads/writes, wallet-signed sends, swaps and cross-chain bridges, Solana RPC/DAS plus wallet sends, webhook management, and Alchemy app administration. Preferred…
finish-it
Scope-cutting and shipping discipline from Derek Yu's 'Finishing a Game' and 'Death Loops', jam culture, and veteran shipping practice — diagnose why a game project stalled, cut to a shippable core, define a binary finish line, ship it. Use when: a game project is stalled or sprawling, 'I keep adding features', 'it's…
skmtc-debug
Diagnose failures in SKMTC sessions — no output, wrong output, error messages, bundle freshness, parseIssues, "Registered definition mismatch", ref cycles, "Module not found" in generated code, or any other broken behavior. Applies across both CLI usage and generator authoring contexts. Use this skill when the user…