sci-brain CLAUDE.md

A repository guide for sci-brain, a plugin that gives AI coding assistants structured workflows for literature research, idea generation, writing, review, and autonomous research. Its main components are instruction files and supporting scripts.

In plain words
What is it for?
Use it when modifying sci-brain’s skills, research workflows, advisor resources, knowledge files, or compatibility with supported coding assistants.
Why use it?
It explains the project’s purpose, architecture, skills, and migration rules so agents can work in the right part of the plugin.

Instructions file

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/quantumbfs/sci-brain/claude-md
Clone the repo
git clone --depth 1 https://github.com/QuantumBFS/sci-brain
Per session 3,445 This file is loaded in full into every session.
When invoked 3,445 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.03445 $0.03445
Opus 5 $0.01723 $0.01723
Sonnet 5 $0.00689 $0.00689
Haiku 4.5 $0.00345 $0.00345

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

Security

Grade A, and why

sci-brain CLAUDE.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.

CLAUDE.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guide

This is the canonical project guide for agents working in this repository. Claude Code reads it directly; AGENTS.md routes Codex, OpenCode, and pi here so the project description stays in one place.

Project Overview

sci-brain is a skill-based plugin for AI coding assistants (Claude Code, Codex, OpenCode, pi) that provides structured literature, ideation, writing, review, and autonomous-research workflows. It is not a traditional application — its main product is the set of SKILL.md interaction protocols and their supporting scripts and references.

Skills

The 12 skills in skills/ are each defined by a SKILL.md with YAML frontmatter and instructions:

  • brainstorm-ideas — The main ideation entry point. Socratic research mentor that understands user background, finds attackable problems, and encourages deeper thinking. When an advisor is selected, it launches that advisor as a subagent and loads literature from advisors/<slug>/.knowledge/. It also owns the structured ideas-report mode, usable at Phase 3 wrap-up or directly on a past session log.
  • survey — Parallel literature search via 7 strategies, populates <project>/.knowledge/ with verified references, regenerates INDEX.md, and writes curated NOTES.md. It also owns the report mode that produces a grounded technology/field assessment from a populated KB; download-ref fetches and renders full text between discovery and writing.
  • paper-writer — Use when drafting or revising an actual scientific manuscript. Encodes the von Delft / Martinis workflow: figures first → telegram outline → body → polish abstract+intro+conclusions last. Distinct from the upstream ideas report in brainstorm-ideas — this skill requires real results.
  • paper-reviewer — The review/enhance an existing manuscript counterpart to paper-writer's drafting. Reads the whole paper, emits location-anchored comments against eight writing guidelines (one-concept sentences, define-before-use, one-job paragraphs, DRY, display-math discipline, figure integration) plus reference & fact verification (CrossRef → Semantic Scholar → MCP → web fetch, repairs via download-ref). Comment-first and non-destructive: applies only approved edits, then re-runs the compile-check. Distinct from survey report mode, which assesses a field rather than a manuscript.
  • slide-writer — Builds PDF slide decks in Typst + Touying for scientific talks, lectures, and briefings. Ships a browsable zoo under skills/slide-writer/zoo/: five color themes (academic/dark/minimal/vibrant/brand), nine layout templates (spread, twocol, hero, cards, punch …), and ~25 palette-aware gadgets (rail_pull, callout, figbox, stat_row, spec_list, theorem/definition/lemma/proof boxes, data_table, conclusion_grid, codebox, toc, pacing), plus optional CeTZ diagram helpers (tensor, automaton-state, flowbox) and pinit pin annotations. Compile gallery.typ to browse it (--input theme=<name> to retheme). The technical (Typst/Touying) companion to the slide-writing skill's logical (outline sign-off, brand) layer; borrows that workflow and enriches it. Phase 5 hands figure-heavy slides to figure-taste.
  • figure-taste — Reviews the visual design quality of a figure, plot, or diagram and prints a scorecard. Source-aware (renders the figure to a raster to look at it via helpers/render.py, reads matplotlib/Typst/SVG source so fixes can cite a line), report-only, terminal-first. Scores against an 18-rule rubric (11 general — alignment, proximity, color, hierarchy, contrast, colorblind-safety, …; plus 7 scientific-plot rules — text size, line weight, space use, chartjunk, legend, cross-panel consistency, resolution). Distinct from paper-reviewer (which checks whether a figure is cited/discussed in the text, not how it looks) and paper-writer (which authors figures). Full rubric in skills/figure-taste/checklist.md.
  • autoresearch — The autoresearch pipeline, one skill with four stage files under references/stages/. Reads research/STATE.md, verifies stage gate artifacts, and follows the current stage: topics (brainstorms topics scored on Checkable/Cheap/Headroom/Publishable; user picks; primary/guard score metrics with gaming risks; red-teamed, user-confirmed acceptance gate per topic → topics.md), db (insight-coverage-driven reference downloads via download-ref, distillation into user-selected research/INSIGHTS.md, domain database, pinned reference implementations, research/CATALOG.md; owns the survey gate), validator (publishable bar in GOAL.md, user-confirmed validation method, sealed gitignored holdout, Docker-canonical validate CLI with rich JSON errors, negative-control strictness self-test; owns the validator gate), and run (the loop: attempts in worktrees with LOG.md, validator-scored under a hard time limit; the user chooses a recommended cycle size during initial setup, while the agent may adjust each actual cycle by need within the authorized attempt budget; every draft hypothesis must state a mechanism against the gap to the bar and its prior art, ranked on expected gap closure with cost as a constraint, filtered for novelty and triviality; when stuck it refreshes insights via survey into ## Candidate; each cycle report plots every scored attempt's raw primary score with no cumulative headline KPIs, the index and campaign retain cross-cycle summaries, and each reflection thinks through 4–6 candidates before ranking the best 2–4 evidence-grounded next directions with explicit reasons and a top recommendation; the first plan of each authorization is user-confirmed; each soft gate asks which direction and how many attempts to authorize). Each attempt commits code + LOG.md + report.json on its attempt-NNN branch; a cycle-end sync pushes those branches plus main.
  • flow — Autonomous deep-thinker that conquers one hard goal via a CDCL/DPLL-style search loop: a preflight gate (is the goal testable? are all context/KB facts loaded?), then iterate decide (what-if: assume a condition, test "closer to goal?" + "easier to achieve?") → propagate (simulate: run consequences forward, reflect; may fan out 2–3 subagents on wide forks) → learn (note a reusable clause after every trial) → backjump (non-chronological, to the real cause) → pivot (meta-restart: re-aim to an equally-valuable easier goal when stuck, keeping all notes). Domain-agnostic and KB-optional. Writes a per-trial journal to docs/flow/<goal-slug>.md (template in skills/flow/journal-template.md). Terminates SOLVED / PIVOTED-SOLVED / EXHAUSTED (≤3 pivots). Distinct from brainstorm-ideas (open-ended, collaborative) — flow is goal-locked and autonomous.
  • know-me-better — Indexes a paper collection (Zotero / PDF folder / Google Scholar) into the active KB. Default target is <project>/.knowledge/; when invoked from /incarnate targets advisors/<slug>/.knowledge/. Writes .raw/ JSON, delegates references.bib writes via download-ref helpers.
  • download-ref — Adds one or many new arXiv IDs / DOIs to a knowledge base (<project>/.knowledge/ by default; advisors/<slug>/.knowledge/ when invoked from advisor flows). Fetches Semantic Scholar metadata, downloads PDFs (with SciHub fallback); when the user opts in, also fetches arXiv LaTeX sources and renders those refs (incl. DOI entries with an arXiv preprint) from flattened LaTeX (full_text: latex) via --tex-source, otherwise all refs render via pymupdf4llm. Regenerates INDEX.md, appends to the KB's references.bib. Supports --from-bib for bulk operations on an existing BibTeX.
  • conversation-dump — Extracts dialog from Claude Code or Codex CLI session logs, classifies user messages across 6 academic dimensions, outputs tagged dialog reports to docs/dialog/.
  • incarnate — Creates or updates a named advisor from JSONL histories or imported Markdown dialogs. It classifies conversations, extracts recurring trigger→reaction patterns, confirms logic jumps with the user, and synthesizes advisors/<slug>/profile.md; it can also stop after analysis-only artifacts. The advisor's literature cache lives at advisors/<slug>/.knowledge/.

Read the full file on GitHub · 116 lines

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 · 116 lines · 3,445 tokens per session scan A d8b0e20d508e

Subscribe to this mod's changes

sci-brain CLAUDE.md is an instructions file published in the GitHub repository QuantumBFS/sci-brain (81 stars, last pushed 6d ago), licensed MIT. It adds 3,445 tokens to every session, about $0.0172 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.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens