TRIUM/
JD

Skills

Composable AI logic blocks. Fork a node, chain it into your build.

12 skills0 forked this session
  • cart
    session_url

    Stripe Checkout Intent Generator

    Payments.ts
    by @trace·2,481 forks
    export async function intent(cart: Cart) {
      const session = await stripe.checkout.sessions.create({
        line_items: cart.items.map(toLine),
        mode: "payment",
        success_url: `${BASE}/ok?id={CHECKOUT_SESSION_ID}`,
  • audio[]
    voice_id

    ElevenLabs Voice Clone Pipeline

    Voice.py
    by @vox.lab·1,902 forks
    def clone(samples: list[Path]) -> str:
        files = [("files", open(p, "rb")) for p in samples]
        r = client.voices.add(name=meta.name, files=files,
            description=meta.desc, labels={"accent": meta.acc})
  • pdf
    json

    Structured PDF Extractor

    Data.prompt
    by @rune·3,204 forks
    You are a precise table extractor. Given a PDF page,
    return JSON matching the schema below. Preserve units,
    never hallucinate cells, and emit null for empty.
    
    Schema: { rows: Array<{ ...fields }> }
  • url
    html

    Polite Web Scraper

    Web.ts
    by @halcy.on·1,580 forks
    await rateLimiter.acquire(host);
    const res = await fetch(url, {
      headers: { "user-agent": UA, "accept": "text/html" },
      signal: AbortSignal.timeout(8000),
    });
    if (res.status === 429) return backoff(url);
  • task
    model

    Budget-Aware Agent Router

    Agents.ts
    by @cousingreg·4,812 forks
    function pick(task: Task, budget: number) {
      const evals = MODELS.filter(m => m.cost <= budget);
      return evals.sort((a, b) =>
        score(b, task) - score(a, task))[0] ?? FALLBACK;
    }
  • image
    text

    Handwriting OCR Skill

    Vision.prompt
    by @nova.synth·712 forks
    Transcribe the handwritten note in the image verbatim.
    Preserve line breaks and indentation. Mark unreadable
    spans as [???]. Do not normalize spelling. Output plain
    text only — no commentary.
  • doc[]
    vector_ids

    Batched Embedder → Cellar

    Data.py
    by @mira.dev·988 forks
    for chunk in batched(docs, 64):
        vecs = embed(chunk, model="text-embed-3")
        cellar.upsert(
            ns="kb",
            items=[(d.id, v, d.meta) for d, v in zip(chunk, vecs)],
        )
  • text_stream
    pcm_stream

    Low-Latency TTS Stream

    Voice.ts
    by @vox.lab·1,344 forks
    for await (const tok of textStream) {
      buf += tok;
      if (sentenceBoundary(buf)) {
        yield* synth.stream(buf);
        buf = "";
      }
    }
  • request
    event

    Stripe Webhook Verifier

    Payments.ts
    by @kael·2,011 forks
    const sig = req.headers.get("stripe-signature")!;
    const body = await req.text();
    const event = stripe.webhooks.constructEvent(
      body, sig, process.env.STRIPE_WEBHOOK_SECRET!
    );
  • draft
    revised

    Self-Critique Loop

    Agents.prompt
    by @drift.ai·3,677 forks
    You wrote a draft. Now critique it as a senior reviewer.
    List exactly 3 weaknesses with line refs. Then rewrite
    the draft addressing every weakness. Output ONLY the
    revised draft — no preamble.
  • message
    agent_id

    Intent Router (multi-agent)

    Agents.ts
    by @kai.morrow·4,120 forks
    // Routes a user message to the right specialist agent.
    export async function route(msg: string) {
      const { intent, confidence } = await classify(msg);
      if (confidence < 0.6) return AGENTS.generalist;
      return AGENTS[intent] ?? AGENTS.generalist;
    }
  • text
    vector

    Embedding Cache (LRU + pgvector)

    Data.ts
    by @kai.morrow·2,044 forks
    const cache = new LRU<string, Float32Array>({ max: 10_000 });
    export async function embed(text: string) {
      const key = sha1(text);
      if (cache.has(key)) return cache.get(key)!;
      const v = await openai.embeddings.create({ model, input: text });
      cache.set(key, v); return v;
    }