openscience AGENTS.md

Repository-specific coding and testing instructions for synthetic-sciences/openscience, including preferred code patterns and commands.

In plain words
What is it for?
Use it when modifying this repository, regenerating its JavaScript SDK, choosing variable and control-flow patterns, or following its Bun and testing conventions.
Why use it?
It gives contributors consistent rules for style, naming, JavaScript generation, and automation, reducing disagreements and avoidable review changes.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/synthetic-sciences/openscience/agents-md
Clone the repo
git clone --depth 1 https://github.com/synthetic-sciences/openscience

Made for: Codex, OpenCode.

Per session 452 This file is loaded in full into every session.
When invoked 452 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00452 $0.00452
Opus 5 $0.00226 $0.00226
Sonnet 5 $0.00090 $0.00090
Haiku 4.5 $0.00045 $0.00045

Measured 2d ago against content hash f33631907295, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openscience AGENTS.md scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 85 lines

What it actually says

  • To regenerate the JavaScript SDK, run ./tooling/repo/generate.ts from the repo root.
  • ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
  • The default branch in this repo is main.
  • Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.

Style Guide

  • Keep things in one function unless composable or reusable
  • Avoid unnecessary destructuring. Instead of const { a, b } = obj, use obj.a and obj.b to preserve context
  • Avoid try/catch where possible
  • Avoid using the any type
  • Prefer single word variable names where possible
  • Use Bun APIs when possible, like Bun.file()
  • Rely on type inference when possible; avoid explicit type annotations or interfaces unless necessary for exports or clarity

Avoid let statements

We don't like let statements, especially combined with if/else statements. Prefer const.

Good:

const foo = condition ? 1 : 2

Bad:

let foo

if (condition) foo = 1
else foo = 2

Avoid else statements

Prefer early returns or using an iife to avoid else statements.

Good:

function foo() {
  if (condition) return 1
  return 2
}

Bad:

function foo() {
  if (condition) return 1
  else return 2
}

Prefer single word naming

Try your best to find a single word name for your variables, functions, etc. Only use multiple words if you cannot.

Good:

const foo = 1
const bar = 2
const baz = 3

Bad:

const fooBar = 1
const barBaz = 2
const bazFoo = 3

Testing

You MUST avoid using mocks as much as possible. Tests MUST test actual implementation, do not duplicate logic into a test.

Run the suite with bun test from backend/cli.

Changes

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.

  1. 2d ago First seen · 85 lines · 452 tokens per session scan A f33631907295

Subscribe to this mod's changes

openscience AGENTS.md is an instructions file published in the GitHub repository synthetic-sciences/openscience (3,362 stars, last pushed 2d ago), licensed Apache-2.0. It adds 452 tokens to every session, about $0.0023 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.