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 rules/heyayushh/stacc/bungit clone --depth 1 https://github.com/heyAyushh/staccWrote 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/rules/heyayushh/stacc/bun)<a href="https://agentmods.dev/rules/heyayushh/stacc/bun"><img src="https://agentmods.dev/badge/rules/heyayushh/stacc/bun.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.00000 | $0.02455 |
| Opus 5 | $0.00000 | $0.01228 |
| Sonnet 5 | $0.00000 | $0.00491 |
| Haiku 4.5 | $0.00000 | $0.00246 |
Grade A, and why
bun scanned grade A with 1 finding 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 yesterday.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url); This is a copy
100% identical to bun — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.
bun Best Practices
Bun is our go-to runtime for high-performance JavaScript/TypeScript backend services. It's an all-in-one toolkit designed for speed and developer experience. Adhere to these guidelines to maximize Bun's potential and maintain code quality.
1. Embrace Bun's Integrated Toolchain
Bun's strength lies in its unified toolchain. Always default to Bun's built-in features over external alternatives unless a specific project requirement dictates otherwise.
✅ GOOD: Use Bun's native tools
- Package Management:
bun installfor dependencies,bun addfor new packages. - Bundling:
bun buildfor zero-config bundling and standalone executables. - Testing:
bun testfor Jest-compatible testing, including watch mode and coverage. - Runtime:
bun runorbun <file>for execution.
# Install dependencies (faster than npm/yarn)
bun install
# Add a new package
bun add zod
# Run tests
bun test --coverage
# Build for deployment (e.g., a serverless function)
bun build ./src/index.ts --target=bun --outfile=./dist/server
❌ BAD: Mixing package managers or external bundlers unnecessarily
Avoid npm install or yarn add in Bun projects. Don't use Webpack or Rollup if bun build suffices.
2. Modern JavaScript Language Features
Always use current ECMAScript features (ES2015+). This improves readability, reduces bugs, and aligns with modern development.
✅ GOOD: Modern JS syntax
// 1. Prefer `const` and `let` over `var`
const API_URL = 'https://api.example.com';
let retryCount = 0;
// 2. Use ES Modules for all imports/exports
import { serve } from 'bun'; // Bun's native HTTP server
import { z } from 'zod';
// 3. Use Classes for object-oriented patterns
class UserService {
#users = new Map(); // 4. Private class fields for true encapsulation
constructor() {
this.#users.set('1', { id: '1', name: 'Alice' });
}
// 5. Arrow functions for methods to preserve `this` context
getUser = (id) => {
return this.#users.get(id);
};
}
// 6. Nullish coalescing (??) for default values
const user = new UserService().getUser('2');
const userName = user?.name ?? 'Guest'; // 7. Optional chaining (?.) for safe property access
// 8. Async/await for asynchronous operations
async function fetchData(url) {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Failed to fetch:', error);
return null;
}
}
// 9. Use `Map` for key-value pairs where keys aren't always strings or order matters
const configMap = new Map([
['port', 3000],
['debugMode', true],
]);
// 10. Reliable Array checks
const data = [];
if (Array.isArray(data)) {
console.log('Data is an array.');
}
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.
- yesterday First seen · 333 lines · 0 tokens per session scan A 607e3bab475c
bun is a cursor rule published in the GitHub repository heyAyushh/stacc (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,455 tokens. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to bun, differing in 2 lines, and is treated as a copy.
Other cursor rules, from other repositories
vue-typescript-patterns
Cursor rule "vue-typescript-patterns" from soaring-xiongkulu/easyaiot, covering vue3 + typescript 开发规范, vue 组件规范, vue sfc 组件规范, typescript 规范 and 状态管理.
nextjs-typescript-app-cursorrules-prompt-file
Cursor rules for Next.js development with TypeScript integration.
ts
Cursor rule "ts" from un-pany/v3-admin-vite, covering ts 开发规范, 类型, 命名, 代码组织 and 错误处理.
platform-pattern-2-filesystem-operations
Cursor rule "platform-pattern-2-filesystem-operations" from PaulJPhilp/EffectPatterns, covering platform pattern 2: filesystem operations and example.
define-a-type-safe-configuration-schema
Cursor rule "define-a-type-safe-configuration-schema" from PaulJPhilp/EffectPatterns, covering define a type-safe configuration schema and example.
handle-unexpected-errors-by-inspecting-the-cause
Cursor rule "handle-unexpected-errors-by-inspecting-the-cause" from PaulJPhilp/EffectPatterns, covering handle unexpected errors by inspecting the cause and example.