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 instructions/jrkrishh/connectr/agents-mdgit clone --depth 1 https://github.com/JrKrishh/connectrWrote 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/instructions/jrkrishh/connectr/agents-md)<a href="https://agentmods.dev/instructions/jrkrishh/connectr/agents-md"><img src="https://agentmods.dev/badge/instructions/jrkrishh/connectr/agents-md.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.02021 | $0.02021 |
| Opus 5 | $0.01010 | $0.01010 |
| Sonnet 5 | $0.00404 | $0.00404 |
| Haiku 4.5 | $0.00202 | $0.00202 |
Grade A, and why
connectr 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ConnectR shared-agent protocol (managed by connectr init)
This project is worked on by multiple AI agents sharing one brain via the "connectr" MCP server. Before starting any task: call board_view to see open work, and recall for prior decisions. Claim before build: ticket_create then ticket_claim before writing any code - this prevents duplicate work. Remember durable decisions and facts with remember; search shared memory with recall before assuming. Before editing files other agents might touch, claim_files them; call release_files when done. Post evidence (test output, commit SHAs) with ticket_update; finish with ticket_close + resolution. When something fails (command error, broken test, wrong assumption), store it with remember kind='lesson': what happened + root cause in text, the corrective action in fix. Before retrying a failure or starting risky work, recall kind='lesson' so you never repeat a mistake another agent already paid for.
Codebase map (2026-08-26)
connectr-mcp v0.1.0 — TypeScript ESM, Node >=20. npm test = tsc build + vitest (incl. a two-process
race test); npm run smoke = two real MCP client sessions over stdio against the built server.
src/types.ts— store schema: AgentInfo, Fact (kind: fact|decision|lesson, optionalfix), Ticket (+routedTo), FileClaimsrc/store.ts— JSON store at.connectr/store.json; cross-process lockfile (O_EXCL, 10s stale-steal) + atomic temp-rename writes; claims auto-expire (2h)src/memory.ts— shared-brain helpers:searchFacts(kind-aware scoring),findDuplicate(near-dup rejection),recentLessonssrc/detect.ts— tool detection (dispatch CLIs on PATH, participant IDEs by config dir, sign-in by existence of the tool's ownauthFile— never read;signedInis null when unknowable, andhomeis injectable for tests) +suggestOrchestra(rank tools for a plan via routing-rule hits; generic terms like "build" ignored at plan scale) + the PLAN.md templatesrc/planner.ts— the conversational front door's instruction:plannerTicket(intent, {planFile})builds the ticket whose description tells an agent how to decompose an intent into routed tickets (title conventions, contracts, parallel-safety, no duplicates). One source of truth, used byconnectr planand the ticketconnectr newseedssrc/worktree.ts— parallel isolation: a git worktree per ticket on branchconnectr/<id>under.connectr/trees/.copyWiringcarries the gitignored init products into each tree and dispatch pinsCONNECTR_STOREto the main store, or the agent would get a private brain;realChangestreats only genuine work as dirty (ConnectR's own scaffolding and untracked dirs it created are excluded);mergeWorktreerefuses on dirty trees and names conflicts rather than losing a versionsrc/host.ts— shared host actions used by CLI run, TUI dash and web UI:addTaskFromInput(parse + route + create),planIntent(park an intent as a planner ticket routed to the project's default/reasoning tool),planOpenTickets(route-and-copy open set, include/exclude),prepareWorkspace(the single place isolation is decided - every dispatch path must go through it),launchPlanned,recordAttempt(a failed run is written toTicket.attempts, reopens the ticket and drops the dead owner) andsweepDeadRuns(same reconciliation for detached runs whose agent is no longer live)src/tools.ts— the tool registry. Every coding tool is aToolSpecrecord (id, kind, bin, args template with{cwd}/{model}/{prompt}/{mode}, per-mode flags, modelArgs, prompt delivery, homeDir, init target slugs) instead of a branch.BUILTIN_TOOLSships the three verified CLIs + three participant IDEs;normalizeToolSpecvalidates user declarations from configtools[];toolRegistrymerges them (same id replaces a built-in);expandArgsrenders a concrete argvsrc/learn.ts— outcome-learned routing at tool:model granularity (targetKey/parseTarget/agentTarget, model taken from the agent's whoami registration):categoryOf(title, desc)matches the title first and only widens to the description when the title says nothing;learnRoutesscores targets per category from closed tickets (completions = wins, takeovers + routing-misses + failed attempts = losses (failures are counted even while the ticket is open, which is the only negative signal most boards produce), Laplace-smoothed); an override needs 3+ outcomes and the rule's own tool to have been tried (any of its models counts); a category can be won by another model of the same tool; surfaced viaconnectr routesandroutedTo.via/reasonsrc/ui/server.ts—connectr uiHTTP server (node:http, 127.0.0.1 only, zero deps): /api/state (tickets carrytree:{commits,dirty}from a 3s-cached worktree scan), /api/events (SSE, 1s change-push), /api/task, /api/dispatch (dry=plan preview), /api/log (basename-guarded tails), /api/diff + /api/merge (^t\d+$-validated review & merge), /api/sweep (reopen dead-agent tickets). Auto-continue:config.autoContinue+ a tick (CONNECTR_AUTO_TICK ms, default 5s) that launches eligible open tickets (< 2 failed attempts); every child launched by this host gets an exitreconcile— unclosed ticket ⇒ failed attempt + reopen, same contract asconnectr runsrc/ui/page.ts— the whole dashboard as one embedded HTML page (no build step, no CDN). Every backslash in the client JS must be doubled — the file is a template literal, and a single one is eaten before the browser sees it (see lesson f29). Notifications are client-only:noticeChangesdiffs consecutive SSE pushes (closed / reopened / commits appeared), fires only whendocument.hasFocus()is false, title badge needs no permission, nativeNotificationis the opt-in bell (localStorageconnectr-notify). Shell-aware: whenwindow.connectrexists (the Electron preload), it adds a Projects button and the Ctrl+K project switcher; in a browser it stays a plain page; board columns, agents, memory, claims, run tails, add + confirm-dispatchsrc/server/index.ts— the MCP server (stdio): whoami, remember/recall, ticket_create/claim/update/close, board_view, claim_files/release_filessrc/routing.ts— task→tool routing:matchRulescores each rule by how many of its alternation terms the text supports and picks the best-supported (user rules in.connectr/config.jsonwin outright over DEFAULT_RULES: backend/auth→claude-code, cli/scripts/data→codex, docs/research→gemini), so a passing mention can't outvote the subject;parseTaskInputhandles thetitle @tool[:model]manual-assign syntax;permissionMode(safe|auto|yolo, default auto) lives in the same configsrc/spawn.ts— headless dispatch of routed tickets:buildCommand(tool, cwd, model, mode, platform)maps tool+model+permission mode to flags (MODE_FLAGStable;safeModelguards the shell string), POSIX spawns argv directly while win32 wraps claude/gemini in powershell for the .cmd shims,launchTicketwraps prompt+log,detachmode (fd-stdio + unref) lets children outlive the dash; logs to.connectr/runs/*.logsrc/cli/index.ts—connectrCLI: serve, init, new (project creation: folder + PLAN.md + suggested orchestra, scoped wiring, seeds the planner ticket), plan (the front door: intent -> planner agent -> routed tickets,--rundispatches them), task add (auto/manual route + model, validates --tool), run (parallel dispatch = the host loop, injects planFile), routes, status, board, doctor, dash, uisrc/cli/targets.ts—initwiring for 6 tools; only touches its own marker-wrapped blocks /connectrentriessrc/tui/dash.tsx— interactive host TUI, polls store 1×/s:aadd task (auto-route or@tool[:model]),rdispatch open tickets detached,ltail newest run log, lesson badges in memory
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.
- 2d ago First seen · 40 lines · 2,021 tokens per session scan A 1db555d6c80c
connectr AGENTS.md is an instructions file published in the GitHub repository JrKrishh/connectr (0 stars, last pushed 7d ago), licensed MIT. It adds 2,021 tokens to every session, about $0.0101 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-31.
Other instructions, from other repositories
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).
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.
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.
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.
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).
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.