agentleFS
vargHQvargHQ/sdk/CLAUDE.md

sdk

CLAUDE.md341 starsChanged 10 months agoApache-2.0View on GitHub

Use Bun instead of Node.js, npm, pnpm, or vite. Use existing tools via bash commands.

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default to using Bun instead of Node.js.

    line 7
  2. Very specific:

    Use the varg CLI: Run actions via bun run src/cli/index.ts run <action> [options]

    line 11
  3. Very specific:

    Use --quiet for minimal output (recommended for scripts)

    line 12
  4. Very specific:

    Use --json for JSON output

    line 13
  5. Very specific:

    Use bun <file> instead of node <file> or ts-node <file>

    line 23
  6. Very specific:

    Use bun install instead of npm install or yarn install or pnpm install

    line 26
  7. Very specific:

    Prefer Bun.file over node:fs's readFile/writeFile

    line 37
  8. Very specific:

    Use bun test to run tests.

    line 42
  9. Very specific:

    Use HTML imports with Bun.serve().

    line 54
  10. Distinctive:

    If you need to regenerate, modify the prompt slightly or use a different cache key

    line 137
  11. Distinctive:

    If cache must be cleared, always ask the user explicitly first

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Default to using Bun instead of Node.js.

Working with this SDK

  • Use the varg CLI: Run actions via bun run src/cli/index.ts run <action> [options]
    • Use --quiet for minimal output (recommended for scripts)
    • Use --json for JSON output
    • Example: bun run src/cli/index.ts run video --prompt "sunset over ocean" --quiet
  • Available actions: image, video, voice, music, transcribe, captions, sync, upload, edit
  • List actions: bun run src/cli/index.ts list
  • Action help: bun run src/cli/index.ts run <action> --help
  • Media folders: Store input files in media/ folder, outputs go to output/ folder
  • Local file support: Actions support local file paths (e.g., media/image.png) in addition to URLs
  • Providers: Located in src/providers/ (fal, elevenlabs, replicate, groq, etc.)
  • Action definitions: Located in src/definitions/actions/
  • Use bun <file> instead of node <file> or ts-node <file>
  • Use bun test instead of jest or vitest
  • Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild
  • Use bun install instead of npm install or yarn install or pnpm install
  • Use bun run <script> instead of npm run <script> or yarn run <script> or pnpm run <script>
  • Bun automatically loads .env, so don't use dotenv.

APIs

  • Bun.serve() supports WebSockets, HTTPS, and routes. Don't use express.
  • bun:sqlite for SQLite. Don't use better-sqlite3.
  • Bun.redis for Redis. Don't use ioredis.
  • Bun.sql for Postgres. Don't use pg or postgres.js.
  • WebSocket is built-in. Don't use ws.
  • Prefer Bun.file over node:fs's readFile/writeFile
  • Bun.$ls instead of execa.

Testing

Use bun test to run tests.

import { test, expect } from "bun:test";

test("hello world", () => {
  expect(1).toBe(1);
});

Frontend

Use HTML imports with Bun.serve(). Don't use vite. HTML imports fully support React, CSS, Tailwind.

Server:

import index from "./index.html"

Bun.serve({
  routes: {
    "/": index,
    "/api/users/:id": {
      GET: (req) => {
        return new Response(JSON.stringify({ id: req.params.id }));
      },
    },
  },
  // optional websocket support
  websocket: {
    open: (ws) => {
      ws.send("Hello, world!");
    },
    message: (ws, message) => {
      ws.send(message);
    },
    close: (ws) => {
      // handle close
    }
  },
  development: {
    hmr: true,
    console: true,
  }
})

HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. <link> tags can point to stylesheets and Bun's CSS bundler will bundle.

<html>
  <body>
    <h1>Hello, world!</h1>
    <script type="module" src="./frontend.tsx"></script>
  </body>
</html>

With the following frontend.tsx:

import React from "react";

// import .css files directly and it works
import './index.css';

import { createRoot } from "react-dom/client";

const root = createRoot(document.body);

export default function Frontend() {
  return <h1>Hello, world!</h1>;
}

root.render(<Frontend />);

Then, run index.ts

bun --hot ./index.ts

For more information, read the Bun API docs in node_modules/bun-types/docs/**.md.

JSX Pragma in Comments

NEVER write @jsxImportSource in code comments or strings in .tsx files. Bun's parser treats any @jsxImportSource <value> as a real JSX pragma, even inside comments. For example, // Resolve @jsxImportSource to absolute path makes Bun try to import to/jsx-dev-runtime, which crashes the CLI. Use alternative wording like "jsxImportSource pragma" or "JSX import source directive" instead.

Cache Policy

NEVER clear or delete the user's cache, even when debugging.

  • Video/image generation costs real money ($0.05–$0.50+ per generation) and takes 60–180 seconds
  • The cache is the user's asset — treat it as production data, not disposable debug state
  • If you need to regenerate, modify the prompt slightly or use a different cache key
  • If cache must be cleared, always ask the user explicitly first
  • Suggest --no-cache flag for one-off re-renders instead of deleting cached files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.