better-all

casper-studios/casper-marketplace · updated Apr 8, 2026

$npx skills add https://github.com/casper-studios/casper-marketplace --skill better-all
0 commentsdiscussion
summary

Note: This library is not yet indexed in DeepWiki or Context7.

skill.md

Documentation

Note: This library is not yet indexed in DeepWiki or Context7.

better-all Library

better-all provides Promise.all with automatic dependency optimization. Instead of manually analyzing which tasks can run in parallel, tasks declare dependencies inline and execution is automatically optimized.

Installation

pnpm add better-all

Basic Usage

import { all } from "better-all";

const results = await all({
  // Independent tasks run in parallel
  fetchUser: () => fetchUser(userId),
  fetchPosts: () => fetchPosts(userId),

  // Dependent task waits automatically
  combined: async (ctx) => {
    const user = await ctx.$.fetchUser;
    const posts = await ctx.$.fetchPosts;
    return { user, posts };
  },
});

// results.fetchUser, results.fetchPosts, results.combined all typed

Key Advantage: Automatic Optimization

// Manual approach - error-prone
const [user, posts] = await Promise.all([fetchUser(), fetchPosts()]);
const profile = await buildProfile(user, posts);
const [feed, stats] = await Promise.all([
  buildFeed(profile, posts),
  buildStats(profile),
]);

// better-all - dependencies declared, execution optimized
const results = await all({
  user: () => fetchUser(),
  posts: () => fetchPosts(),
  profile: async (ctx) => buildProfile(await ctx.$.user, await ctx.$.posts),
  feed: async (ctx) => buildFeed(await ctx.$.profile, await ctx.$.posts),
  stats: async (ctx) => buildStats(await ctx.$.profile),
});

Type Inference

Results are fully typed based on task return types:

const results = await all({
  count: () => Promise.resolve(42),
  name: () => Promise.resolve("test"),
  combined: async (ctx) => ({
    count: await ctx.$.count,
    name: await ctx.$.name,
  }),
});

// TypeScript knows:
// results.count: number
// results.name: string
// results.combined: { count: number; name: string }

References

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.834 reviews
  • Pratham Ware· Dec 28, 2024

    better-all reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Omar Desai· Dec 24, 2024

    better-all has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ishan Nasser· Dec 8, 2024

    Useful defaults in better-all — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kabir Agarwal· Dec 4, 2024

    Registry listing for better-all matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Kabir Park· Nov 27, 2024

    better-all is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Lucas Abbas· Nov 15, 2024

    better-all fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Kabir Ndlovu· Oct 18, 2024

    Keeps context tight: better-all is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Lucas Li· Oct 6, 2024

    We added better-all from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Benjamin Choi· Sep 25, 2024

    Useful defaults in better-all — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Layla Dixit· Sep 13, 2024

    Keeps context tight: better-all is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 34

1 / 4