elek AGENTS.md

elek AGENTS.md is an instructions file for Codex, OpenCode from selimozten/elek. It costs 1,987 tokens per session, scanned B, original, MIT.

Instructions for elek, a GitHub Action that runs AI code reviews on pull requests and issues. It explains how the TypeScript orchestrator receives GitHub events, gathers change data, and posts review comments.

In plain words
What is it for?
Use it when developing, testing, or changing the GitHub Action and its event-processing or comment-posting workflow.
Why use it?
It gives coding agents the project rules and preserves the review tool's limits, including that it cannot approve, merge, or close pull requests.

Instructions file for CodexOpenCode

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/selimozten/elek/agents-md
Clone the repo
git clone --depth 1 https://github.com/selimozten/elek

Made for: Codex, OpenCode.

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 elek AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/selimozten/elek/agents-md.svg)](https://agentmods.dev/instructions/selimozten/elek/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/selimozten/elek/agents-md"><img src="https://agentmods.dev/badge/instructions/selimozten/elek/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,987 This file is loaded in full into every session.
When invoked 1,987 The same file — it is already loaded in full.
Security scan B 1 finding. 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.01987 $0.01987
Opus 5 $0.00993 $0.00993
Sonnet 5 $0.00397 $0.00397
Haiku 4.5 $0.00199 $0.00199

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

Security

Grade B, and why

elek AGENTS.md scanned grade B with 1 finding 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

**`.mcp.json` carries `GITHUB_TOKEN`.** Written to
AGENTS.md · 176 lines

How it starts

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

AGENTS.md

Instructions for coding agents working in this repository. Read before editing.

What this is

elek is a model-agnostic GitHub Action that runs AI code reviews on pull requests and issues. It wraps pi coding agent and adds a tightly-scoped tool surface — the model can post inline review comments and update its tracking comment, but cannot approve, merge, or close a PR. That guarantee is structural: there is no plumbing to those endpoints. Don't add it casually.

How it runs

Composite GitHub Action. Single TypeScript orchestrator at src/entrypoints/run.ts runs end-to-end:

flowchart TD
    A[GitHub event] --> B[parse context]
    B --> C[detect trigger]
    C --> D[fetch PR / issue data]
    D --> E[build XML-tagged prompt]
    E --> F["spawn pi --mode json<br/>(stdio: ignore — pi hangs without it)"]
    F --> G[parse events,<br/>drive progressive comment updates]
    G --> H[drain inline-comment buffer]
    H --> I[post review comments]

Pi is run via the CLI (not the SDK) so we stay model-agnostic — any provider pi supports, elek supports.

File map

action.yml                            Composite GitHub Action declaration.
src/entrypoints/run.ts                Main orchestrator. Read this first.
src/entrypoints/post-buffered.ts      Drains MCP buffer; posts inline comments.
src/pi.ts                             pi CLI runner; parses --mode json events.
src/types.ts                          Shared types.
src/github/context.ts                 Parses the GitHub webhook payload.
src/github/trigger.ts                 @pi mention detection, actor filtering.
src/github/data.ts                    PR/issue data fetch + buildPrompt().
src/github/comments.ts                Tracking-comment lifecycle.
src/github/progress.ts                Live checklist body.
src/github/spinner.ts                 Animated elek SVG header.
src/github/mode.ts                    review / review+edit / agent presets.
src/github/git.ts                     git auth + branch ops.
src/mcp/handlers.ts                   Pure handler logic (testable, deps-injected).
src/mcp/github-review-server.ts       Thin McpServer shim around handlers.
test/*.test.ts                        Bun test, integration-style.
docs/ARCHITECTURE.md                  Deeper system overview.

Read the full file on GitHub · 176 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. 3d ago First seen · 176 lines · 1,987 tokens per session scan B 822432582d17

Subscribe to this mod's changes

elek AGENTS.md is an instructions file published in the GitHub repository selimozten/elek (19 stars, last pushed 10d ago), licensed MIT. It adds 1,987 tokens to every session, about $0.0099 per session on Opus 5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.