LOCI Plugin for AI Coding Assistants
AI Writes Code. LOCI Gates It.
LOCI is a quality-gate agent for Claude Code that models regressions, power, latency, and control-flow safety directly from your compiled binary, from plan to merge. It requires no running code, no instrumentation, and no code changes: every result is grounded in real execution data recovered from the binary itself.
What LOCI does
LOCI connects Claude Code to LCLM (Large Code Language Model), a model trained on billions of assembly blocks and real hardware traces from IoT, networking, and safety-critical systems — not a general-purpose model wrapped around your code. Because analysis happens at the binary level, LOCI can answer questions about timing, energy, memory, and control flow that source-level tools can't: the actual compiled output, not an approximation of it.
Prerequisites
Requirement
Version
Required for
Python
3.12+
The loci CLI (local ELF/ build analysis)
any
Installs the loci CLI as a tool. Install this yourself — the plugin checks for it and gives you the install command if it's missing.
jq
any
Session hooks. Install this yourself - the plugin checks for it and gives you the install command if it's missing.
Cross-compiler depends on the project you work with.
Skills that work without a cross-compiler or backend network access: stack-depth, memory-report, control-flow.
Install
Install the plugin from inside Claude Code:
/plugin marketplace add https://github.com/auroralabs-loci/loci-claude
/plugin install loci@loci
/reload-plugins
/loci:setup
There is no separate CLI download step. The loci command-line tool is installed automatically in the background the first time a Claude Code session starts, using uv. If uv or jq aren't already on your system, Claude will tell you the install command to run.
Authentication
Timing and energy analysis reach the LOCI backend and require a signed-in session.
Run
! loci loginfrom inside Claude Code (orloci loginin your terminal).Confirm it worked with
loci auth status- it should showsigned_in.
stack-depth,memory-report, andcontrol-flowrun fully offline.exec-trace,loci-preflight, andloci-post-editrequire a signed-in session because they call the LOCI backend.
Quick Start
Once installed, try these in any C/C++/Rust project with compiled binaries:
Timing & energy — ask: "What's the execution cost of main()?"
Memory budget — ask: "How much ROM/RAM does my build use?"
Stack safety — ask: "Is my stack safe for TaskMain?"
Control-flow safety — ask: "What does the call graph for process_data() look like?"
Two skills also run automatically, with no invocation needed:
loci-preflightfires during/planmode — analyzes callees at the binary level before code is written.loci-post-editfires after every edit to C/C++/Rust source — diffs the binary and returns a regression verdict.
Skills Reference
Skill
Trigger
Sign-in required
What it does
loci-preflight
Automatic, in /plan mode
Yes
Audits the plan at binary level before code is written — timing, energy, and control-flow-graph impact.
loci-post-edit
Automatic, after edits to C/C++/Rust
Yes
Diffs pre/post compiled artifacts and returns a regression verdict on timing, energy, and control flow.
exec-trace
User-invoked
Yes
Function-level timing and energy from real-time hardware traces, powered by LCLM.
stack-depth
User-invoked
Yes
Worst-case stack depth via call-graph traversal and per-function frame sizes.
memory-report
User-invoked
Yes
ROM/RAM section breakdown and top consumers from compiled ELF binaries.
control-flow
User-invoked
Yes
Annotated control-flow graphs, optimized for LLM analysis.
trends
User-invoked
Yes
Per-function measurement history and optimization progress on the current branch.
help
/help
No
Confirms LOCI is loaded and lists available skills.
setup
/loci:setup, or automatically on CLI-missing errors
No
Installs, repairs, or verifies the loci CLI. Safe to re-run at any time.
bug-report
/bug-report
No
Generates a full diagnostic report when something isn't working.
Automatic Hooks
The plugin registers four hooks that run without user action:
Hook
Trigger
What it does
SessionStart
Session startup
Detects your project's build system, compiler, and target architecture; installs the loci CLI in the background if it's missing; and injects session context (auto-run rules, tool policy, response tone) for Claude to use. Never blocks session startup, even if detection or install fails.
PreToolUse
Before Edit, Write, or MultiEdit
Snapshots the current compiled .o for later delta analysis and runs a static call-graph pre-scan of the incoming code (before it's written to disk), surfacing any findings as context. Advisory only — always exits 0, never blocks the edit.
PostToolUse
After Edit, Write, or MultiEdit
Checks whether the change could alter a compiled function's body and, if so, injects a reminder instructing Claude to run the loci-post-edit skill immediately. Advisory only — always exits 0, never blocks.
Stop
End of session
If the loci CLI is present, flushes any pending analysis results to your account (loci stats flush-impacts).
Troubleshooting
loci CLI not found:
Check it's on PATH:
command -v lociandloci --version.If it's missing, the background install may still be running or may have failed. Run
/loci:setupto reinstall and verify — it's safe to re-run — orloci doctoronce the CLI is present.Confirm
uvis installed (command -v uv); the plugin needs it to install the CLI.
A skill reports auth_required:
Run
! loci loginin your terminal, then retry.Confirm
loci auth statusshowssigned_in.
Auto-skills didn't fire:
loci-preflightonly runs in/planmode — confirm you're planning new logic, not just asking a question.loci-post-editonly runs after edits to C/C++/Rust source files.Both compile the source themselves — they don't need a pre-built binary. They do require a supported LOCI target and a working cross-compiler for it on PATH, plus a valid session context from startup. If the compiler is missing, restore it (or point LOCI at it) and re-run.
On-demand skills didn't respond:
Type
/helpto confirm LOCI is loaded and see the full skill list.Restart Claude Code from inside your project directory if the build environment wasn't detected at session start.
Check that a cross-compiler is installed and on your PATH (see the table above).
Nothing seems to work:
Run /bug-report to generate a full diagnostic report.
LOCI Portal
Every analysis run from Claude Code is logged and visualized automatically at the LOCI Portal (app.auroralabs.com), no extra configuration needed. The Portal is where you view session history, binary analysis results, PR review status, and team/quota settings.
Account Plans
LOCI is available on a free tier with limited daily interactions. Paid tiers raise or remove that limit and unlock additional capabilities...
For current plans and pricing, see auroralabs.com/pricing.
Support
Email: loci@auroralabs.com
Plugin issues: github.com/auroralabs-loci/loci-claude/issues
Reference
Quick Start (web):
auroralabs.com/product#quick-startTalk to us:
auroralabs.com/contactLOCI install endpoint:
https://loci.auroralabs.com/install.sh
Last updated
Was this helpful?
