bar-init

bar-init is a command for coding agents from bar181/bar-observatory. It costs 20 tokens per session (359 once invoked), scanned A, original, MIT.

A project setup command for BAR Observatory, a tool that records and stores information about coding-agent sessions. It creates local configuration and SQLite databases, where SQLite is a file-based database.

In plain words
What is it for?
It is for initializing BAR Observatory in the current project or another chosen directory, safely repeating setup when it has already been done.
Why use it?
It prepares the project directory so BAR Observatory commands and recording hooks have a place to store their data.

Command

Part of the bar-observatory plugin — 5 commands, 21 hooks shipped together

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 commands/bar181/bar-observatory/bar-init
Clone the repo
git clone --depth 1 https://github.com/bar181/bar-observatory

Or install bar-observatory, the plugin that ships this one along with the rest of its 5 commands, 21 hooks.

Wrote 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.

agentmods badge for bar-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/bar181/bar-observatory/bar-init.svg)](https://agentmods.dev/commands/bar181/bar-observatory/bar-init)
Your own site
<a href="https://agentmods.dev/commands/bar181/bar-observatory/bar-init"><img src="https://agentmods.dev/badge/commands/bar181/bar-observatory/bar-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 359 The whole file, excluding the scripts and references it only reads on demand.
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.00020 $0.00359
Opus 5 $0.00010 $0.00179
Sonnet 5 $0.00004 $0.00072
Haiku 4.5 $0.00002 $0.00036

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

Security

Grade A, and why

bar-init 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 4d 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.

commands/bar-init.md · 24 lines

What it actually says

$ARGUMENTS

Set up BAR Observatory in the current project. This is the first command to run — everything else (/bar-report, /bar-interpret, /bar-doctor, /bar-query, and the plugin's own hooks/MCP server) reads and writes the .bar/ directory this creates.

  1. Determine the target directory from $ARGUMENTS (a path), defaulting to . (the current project root — the directory the .bar folder should live under so the plugin's hooks and bar-mcp --db-root .bar find it with zero extra configuration).
  2. Run: bar init --dir <dir>
  3. This is idempotent — safe to run again on an existing project, it never overwrites a config that's already there ("Kept" instead of "Created" on a second run). Report exactly what it did (created vs. kept) and where: .bar/config.toml, .bar/ambient.sqlite, .bar/index.sqlite.
  4. If bar isn't found on PATH, tell the user to run cargo install bar-observatory first (and cargo install bar-hook bar-mcp too, for the plugin's hooks and MCP server to actually capture anything — see this repo's README for why those resolve via PATH today).
  5. Once init succeeds, tell the user their next step: run a real Claude Code task/session (the plugin's hooks capture it automatically from here on), then /bar-report to see it.
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. 4d ago First seen · 24 lines · 20 tokens per session scan A 27989ad7f932

Subscribe to this mod's changes

bar-init is a command published in the GitHub repository bar181/bar-observatory (22 stars, last pushed 7d ago), licensed MIT. It adds 20 tokens to every session and 359 once invoked, about $0.0001 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.