ai
CLAUDE.md4 starsChanged 10 months agoMITView on GitHub
.env contains all AI provider keys. Be sure to use the LSP tool to help get / understand code. Code documentation MUST use TSDoc style. When using TSDoc consider what tags are stripped by TSDoc, and if stripped don't put user valuable information in them - only relevant knowledge for developers or code skimmers belongs there. When running tests only run live tests relevant to the changes, full live tests will and should be asked for to be done manually.…
- Reads credentials
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changelog-generatorSkill
- code-reviewSkill
- implementation-reviewSkill
- llms-md-updaterSkill
- readme-updaterSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Import management: - Do not re-export ever, the only allowed place is when it _FULLY MAKES SENSE_ to do so with index.ts files.
- Distinctive: line 16
Commenting: - Avoid needless comments, if you make comments they should purely be documentational not inlined model reasoning.
- Distinctive: line 18
Add / Update Tests: - When making changes or adding functionality ensure you add and/or update both LIVE and UNIT tests.
- Very specific: line 26
Default to using Bun instead of Node.js.
- Very specific: line 28
Use bun <file> instead of node <file> or ts-node <file>
- Very specific: line 31
Use bun install instead of npm install or yarn install or pnpm install
- Very specific: line 33
Use bunx <package> <command> instead of npx <package> <command>
- Very specific: line 43
Prefer Bun.file over node:fs's readFile/writeFile
- Very specific: line 48
Use bun test to run tests.
- Very specific: line 60
Use HTML imports with Bun.serve().
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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.
Files
Project Rules
- 100% TypeScript – No
any, implicit types, or unchecked assumptions - No library abstractions – Use library APIs directly; never truncate/morph library data
- AirBnB style – Follow AirBnB TypeScript/JavaScript conventions
- Zero lint/type errors –
bun lintandbun typecheckmust pass - Electron-first – Desktop app; web security assumptions don't apply
- No re-exports – Import library types directly; don't create barrel files
- No tooling suppressions – No
eslint-disable,@ts-ignore, etc. - Shared UI components – Reusable components for shared styling/views
- Small files – Target ~300 LOC; refactor when beneficial
- Icon libraries only – No custom inline SVGs
- Intentional testing – Unit tests + live API tests; all tests must pass
- Persist atomic values only – Compute derived fields (duration, netCost) at runtime
- Import management - Do not re-export ever, the only allowed place is when it FULLY MAKES SENSE to do so with index.ts files.
- Commenting - Avoid needless comments, if you make comments they should purely be documentational not inlined model reasoning.
- Error Handling - Prioritize pro-active error handling, use modern try catch patterns and be mindful of plausible error spots.
- Add / Update Tests - When making changes or adding functionality ensure you add and/or update both LIVE and UNIT tests.
.env contains all AI provider keys.
Be sure to use the LSP tool to help get / understand code. Code documentation MUST use TSDoc style. When using TSDoc consider what tags are stripped by TSDoc, and if stripped don't put user valuable information in them - only relevant knowledge for developers or code skimmers belongs there. When running tests only run live tests relevant to the changes, full live tests will and should be asked for to be done manually. All providers are fully isolated 'modules', no cross provider utilization should occur.
Default to using Bun instead of Node.js.
- Use
bun <file>instead ofnode <file>orts-node <file> - Use
bun testinstead ofjestorvitest - Use
bun build <file.html|file.ts|file.css>instead ofwebpackoresbuild - Use
bun installinstead ofnpm installoryarn installorpnpm install - Use
bun run <script>instead ofnpm run <script>oryarn run <script>orpnpm run <script> - Use
bunx <package> <command>instead ofnpx <package> <command> - Bun automatically loads .env, so don't use dotenv.
APIs
Bun.serve()supports WebSockets, HTTPS, and routes. Don't useexpress.bun:sqlitefor SQLite. Don't usebetter-sqlite3.Bun.redisfor Redis. Don't useioredis.Bun.sqlfor Postgres. Don't usepgorpostgres.js.WebSocketis built-in. Don't usews.- Prefer
Bun.fileovernode:fs's readFile/writeFile - Bun.$
lsinstead 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 { createRoot } from "react-dom/client";
// import .css files directly and it works
import './index.css';
const root = createRoot(document.body);
export default function Frontend() {
return <h1>Hello, world!</h1>;
}
root.render(<Frontend />);Then, run index.ts
bun --hot ./index.tsFor more information, read the Bun API docs in node_modules/bun-types/docs/**.mdx.
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
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.

