pr-narrator-mcp: Instructions file for Codex

AGENTS.md

pr-narrator-mcp AGENTS.md is an instructions file for Codex, OpenCode from mhaviv/pr-narrator-mcp. It costs 2,472 tokens per session, scanned A, original, MIT.

A set of AGENTS.md instructions for a project whose MCP server creates commit messages, pull-request titles, and pull-request descriptions from Git repository state. AGENTS.md is a file that tells coding agents how to work in a project.

In plain words
What is it for?
It is for working on, building, testing, linting, and reviewing the pr-narrator-mcp Node.js and TypeScript project.
Why use it?
It gives an agent the project’s purpose, structure, commands, and development rules so changes can be made and checked consistently.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is mhaviv/pr-narrator-mcp's own configuration. It tells Codex and OpenCode how to work on pr-narrator-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pr-narrator-mcp configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is vi.mock("../../src/utils/git.js", () => ({.

Reuse

Borrowing it

Nothing to install: this file belongs to mhaviv/pr-narrator-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mhaviv/pr-narrator-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/mhaviv/pr-narrator-mcp

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 pr-narrator-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mhaviv/pr-narrator-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/mhaviv/pr-narrator-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mhaviv/pr-narrator-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/mhaviv/pr-narrator-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-narrator-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mhaviv/pr-narrator-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/mhaviv/pr-narrator-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,472 This file is loaded in full into every session.
When invoked 2,472 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02472 $0.02472
Opus 5 $0.01236 $0.01236
Sonnet 5 $0.00494 $0.00494
Haiku 4.5 $0.00247 $0.00247

Measured 9d ago against content hash 0065d1d781f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pr-narrator-mcp AGENTS.md scanned grade A 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **No shell exec**: All git operations use `simple-git` — never `child_process` or `exec`.
AGENTS.md · 237 lines

How it starts

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

AGENTS.md — Coding Agent Instructions for pr-narrator-mcp

Project Summary

pr-narrator-mcp is an MCP (Model Context Protocol) server that generates commit messages, PR titles, PR descriptions, and related content from git repository state. It is published to npm as pr-narrator-mcp and runs as a CLI tool via npx pr-narrator-mcp.

  • Runtime: Node.js >=18, TypeScript 5.3+, ESM ("type": "module")
  • Dependencies: @modelcontextprotocol/sdk ^1.26.0, simple-git ^3.22.0, zod ^3.22.4
  • Build: tsup (ESM output, single entry src/index.ts, target node18)
  • Test: Vitest with globals, v8 coverage, Node environment
  • Lint: ESLint with @typescript-eslint/recommended-requiring-type-checking + Prettier
  • CI: GitHub Actions on Node 18/20/22 matrix

Build & Test Commands

npm install            # Install dependencies
npm run typecheck      # tsc --noEmit (run FIRST — must pass before test/build)
npm run test:run       # vitest run (single pass)
npm test               # vitest (watch mode)
npm run test:coverage  # vitest with v8 coverage
npm run build          # tsup → dist/
npm run lint           # eslint src/ test/
npm run lint:fix       # eslint --fix
npm run format         # prettier --write
npm run format:check   # prettier --check

Validation order: npm run typechecknpm run test:runnpm run buildnpm run lint

CI runs this matrix on Node 18, 20, and 22. Always verify your changes pass on Node 18 (the minimum).


Project Layout

src/
├── index.ts                        # MCP server entry, tool registration, stdio transport
├── config/
│   ├── schema.ts                   # Zod config schemas, defaults, type exports
│   └── loader.ts                   # Config loading from MCP env vars
├── tools/                          # One file per MCP tool (10 tools total)
│   ├── get-config.ts
│   ├── analyze-git-changes.ts
│   ├── generate-commit-message.ts
│   ├── validate-commit-message.ts
│   ├── extract-tickets.ts
│   ├── generate-pr-title.ts
│   ├── generate-pr-description.ts
│   ├── generate-pr.ts
│   ├── get-pr-template.ts
│   └── generate-changelog.ts
└── utils/
    ├── git.ts                      # Git operations via simple-git, path validation, branch detection
    └── formatters.ts               # String formatting, prefix handling, file categorization

test/                               # Mirrors src/ structure
├── config/
│   └── loader.test.ts
├── tools/
│   └── *.test.ts                   # One test file per tool
└── utils/
    ├── formatters.test.ts
    └── git.test.ts

Read the full file on GitHub · 237 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. 9d ago First seen · 237 lines · 2,472 tokens per session scan A 0065d1d781f7

Subscribe to this mod's changes

pr-narrator-mcp AGENTS.md is an instructions file published in the GitHub repository mhaviv/pr-narrator-mcp (1 stars, last pushed 6mo ago), licensed MIT. It adds 2,472 tokens to every session, about $0.0124 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.