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/nguyenyou/scalex/agents-mdgit clone --depth 1 https://github.com/nguyenyou/scalexWrote 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/nguyenyou/scalex/agents-md)<a href="https://agentmods.dev/instructions/nguyenyou/scalex/agents-md"><img src="https://agentmods.dev/badge/instructions/nguyenyou/scalex/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.02767 | $0.02767 |
| Opus 5 | $0.01384 | $0.01384 |
| Sonnet 5 | $0.00553 | $0.00553 |
| Haiku 4.5 | $0.00277 | $0.00277 |
Grade A, and why
scalex 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 3d 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 — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
What is Scalex
Scalex is a Scala code intelligence CLI for coding agents. It provides fast symbol search, find definitions, and find references — without requiring an IDE, build server, or compilation. Designed as a Codex plugin.
IMPORTANT: No company references
NEVER mention any company names, internal project names, proprietary codebases, or organization-specific details in any output — including commit messages, PR descriptions, changelogs, roadmaps, documentation, code comments, or conversations. Always use generic examples (e.g. HttpMessageService, UserServiceLive) instead.
Search scope
Source code lives in src/ (production) and tests/ (test suite). When searching for Scala code, scope searches to these directories. Avoid searching repo-wide — benchmark/ contains ~17.7k Scala files from the scala3 compiler clone that will pollute results.
Workflow
- Before planning or implementing any feature, first add it to
docs/ROADMAP.mdunder the appropriate section - The roadmap is the source of truth for what's planned and what's done
- Bug fix workflow: When receiving a bug report, always write a failing test that reproduces the bug before writing the fix. This validates the bug is real and ensures the fix is verifiable. Only then apply the code fix and confirm the test passes.
Build & Run
# Run via scala-cli (development)
scala-cli run src/ -- <command> [args...]
# Run tests
scala-cli test src/ tests/
# Build GraalVM native image (requires GraalVM + scala-cli)
./build-native.sh
# Output: ./scalex (26MB standalone binary)
# Validate Codex plugin structure
Codex plugin validate plugins/scalex/
Architecture
Source code is in src/, tests in tests/ (Scala 3.8.2, JDK 21+). When searching the codebase, scope to these directories to avoid hitting benchmark data or build artifacts.
src/ # Production source code
├── project.scala # scala-cli directives only
├── model.scala # Data types, enums, version constant
├── extraction.scala # AST parsing & single-file extraction functions
├── index.scala # Git integration, persistence, WorkspaceIndex, filtering
├── analysis.scala # Cross-index analysis (hierarchy, overrides, deps, diff, ast-pattern)
├── format.scala # Text formatters for symbols and references
├── cli.scala # Arg parsing, workspace resolution, @main entry point
├── command-helpers.scala # Shared filters: filterSymbols, filterRefs, mkNotFoundWithSuggestions
├── dispatch.scala # Command map + runCommand
└── commands/ # One file per command (ls to discover all 25 commands)
├── definition.scala # cmdDef
├── search.scala # cmdSearch
├── refs.scala # cmdRefs
├── hierarchy.scala # cmdHierarchy
├── overview.scala # cmdOverview
└── ... # 25 commands total
tests/ # Test suite
├── test-base.test.scala # Shared test fixture (workspace setup)
├── extraction.test.scala # Extraction tests
├── index.test.scala # Index/search/persistence tests
├── analysis.test.scala # Analysis tests (hierarchy, overrides, deps, etc.)
└── cli.test.scala # CLI/formatting/command output tests
benchmark/ # Benchmark data (gitignored)
├── scala3/ # Shallow clone of scala/scala3 for benchmarks
└── results/ # Hyperfine JSON exports
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.
- 3d ago First seen · 169 lines · 2,767 tokens per session scan A 96b5a7d45d03
scalex AGENTS.md is an instructions file published in the GitHub repository nguyenyou/scalex (94 stars, last pushed 2mo ago), licensed MIT. It adds 2,767 tokens to every session, about $0.0138 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.
Other instructions, from other repositories
repobrain copilot-instructions.md
Copilot instructions for study8677/repobrain, covering github copilot bootstrap instructions and hard rule — query the repobrain hub first.
repobrain AGENTS.md
AGENTS.md instructions for study8677/repobrain: Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules.…
Ctxo CLAUDE.md
Instructions for alperhankendi/Ctxo, covering claude.md — ctxo, project overview, quick reference, dev (pnpm workspace) and usage (consumer).
trace-mcp AGENTS.md
Instructions for nikolai-vysotskyi/trace-mcp: IMPORTANT: For ANY code exploration task, ALWAYS use trace-mcp tools first. NEVER use Read/Grep/Glob/Bash(ls,find) for navigating source code.
sverklo CLAUDE.md
Instructions for sverklo/sverklo, covering sverklo development, using sverklo tools, project structure and build & test.
codesage AGENTS.md
Instructions for iliaal/codesage, covering codesage, build, sanity check before pushing, crate map and search pipeline.