ODS: Command for GitHub Copilot

.github/prompts/nightly-code-review.md

nightly-code-review is a command for GitHub Copilot from Osmantic/ODS. It costs 0 tokens per session (774 once invoked), scanned A, original, Apache-2.0.

An autonomous CI code-review workflow that examines recent commits and makes small, targeted fixes to selected source files.

In plain words
What is it for?
Use it for nightly reviews of Python, shell, TypeScript, and TSX changes, and for applying clearly correct bug fixes without adding features or refactoring for style.
Why use it?
It removes the need for a person to manually inspect every recent change during a continuous integration run, while avoiding broad or uncertain edits.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt. Also seen: names the AskUserQuestion tool.

This is Osmantic/ODS's own configuration. It tells GitHub Copilot how to work on ODS 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 ODS configures →

About the project

ODS is a system for turning a PC, Mac, or Linux computer into a private local AI server, meaning a machine that runs models and related AI services itself. It supports local model inference, chat, voice, agents, workflows, document retrieval, search, and image generation. The catalogue includes commands and an instruction for operating or configuring this system.

Osmantic/ODS · 6,213 stars · on GitHub · discord.gg

Reuse

Borrowing it

Nothing to install: this file belongs to Osmantic/ODS. 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/Osmantic/ODS/main/.github/prompts/nightly-code-review.md
Clone the repo
git clone --depth 1 https://github.com/Osmantic/ODS

Made for: GitHub Copilot.

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 nightly-code-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/osmantic/ods/nightly-code-review.svg)](https://agentmods.dev/commands/osmantic/ods/nightly-code-review)
Your own site
<a href="https://agentmods.dev/commands/osmantic/ods/nightly-code-review"><img src="https://agentmods.dev/badge/commands/osmantic/ods/nightly-code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 774 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00774
Opus 5 $0.00000 $0.00387
Sonnet 5 $0.00000 $0.00155
Haiku 4.5 $0.00000 $0.00077

Measured yesterday against content hash 343027d9216e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

nightly-code-review 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 yesterday.

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.

.github/prompts/nightly-code-review.md · 77 lines

How it starts

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

Nightly Code Review (Autonomous CI Mode)

You are running in a CI pipeline. You MUST operate fully autonomously. Do NOT use AskUserQuestion. Do NOT pause for user input. Do NOT create new files.

Goal

Analyze recent commits and make targeted code improvements. Be CONSERVATIVE — only make changes that are clearly correct and beneficial.

Rules

  1. NEVER modify protected files: .github/, .env*, ods/installers/, ods/ods-cli, ods/config/
  2. ONLY modify .py, .sh, .ts, and .tsx files
  3. Every change must be verifiable as an improvement — do not guess
  4. Prefer no change over a risky change
  5. Do NOT add docstrings, comments, or type annotations unless fixing an actual bug requires it
  6. Do NOT refactor working code for style preferences
  7. Do NOT add error handling, fallbacks, or defensive checks (project follows Let It Crash principle)
  8. Do NOT add features or new functionality
  9. Keep changes minimal and focused — small targeted fixes, not sweeping refactors

Steps

Step 1: Gather Context

Run git log --oneline -N (N = COMMITS_TO_ANALYZE provided below) to see recent changes.

Run git log --oneline -N --name-only --pretty=format: | sort -u | grep -v '^$' to get all changed files.

Step 2: Identify Issues

For each recently changed code file, read it and look for:

  1. Bugs: Logic errors, off-by-one errors, race conditions, incorrect comparisons
  2. Dead code: Unused imports, unreachable branches, variables assigned but never read
  3. Type safety: Missing or incorrect type annotations that could mask bugs
  4. Simplification: Overly complex logic that can be simplified without changing behavior (KISS principle)
  5. Ruff violations: Run ruff check <file> on changed Python files and apply auto-fixes with ruff check <file> --fix
  6. ShellCheck violations: Run shellcheck <file> on changed shell scripts

Step 3: Make Improvements

For each issue found:

  1. Read the full file to understand context
  2. Use the Edit tool to make the fix
  3. Run python -m py_compile <file> to verify syntax for Python files
  4. Run bash -n <file> to verify syntax for shell scripts

Read the full file on GitHub · 77 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. yesterday First seen · 77 lines · 0 tokens per session scan A 343027d9216e

Subscribe to this mod's changes

nightly-code-review is a command published in the GitHub repository Osmantic/ODS (6,213 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 774 tokens. 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-09-06.