ai-sync: Instructions file for Codex

AGENTS.md

ai-sync AGENTS.md is an instructions file for Codex, OpenCode from XyrusCode/ai-sync. It costs 1,012 tokens per session, scanned B, original, MIT.

Repository instructions for XyrusCode/ai-sync, covering global agent rules and required development practices.

In plain words
What is it for?
Use them when working in XyrusCode/ai-sync, especially for managing long tasks and preparing reviewed changes.
Why use it?
They prevent context loss during long sessions and require changes to go through a branch and pull request instead of being committed directly to the main branch.

Instructions file for CodexOpenCode

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

This is XyrusCode/ai-sync's own configuration. It tells Codex and OpenCode how to work on ai-sync 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 ai-sync configures →

Reuse

Borrowing it

Nothing to install: this file belongs to XyrusCode/ai-sync. 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/XyrusCode/ai-sync/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/XyrusCode/ai-sync

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 ai-sync AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xyruscode/ai-sync/agents-md/github.svg)](https://agentmods.dev/instructions/xyruscode/ai-sync/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xyruscode/ai-sync/agents-md"><img src="https://agentmods.dev/badge/instructions/xyruscode/ai-sync/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 ai-sync AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xyruscode/ai-sync/agents-md"><img src="https://agentmods.dev/badge/instructions/xyruscode/ai-sync/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,012 This file is loaded in full into every session.
When invoked 1,012 The same file — it is already loaded in full.
Security scan B 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.01012 $0.01012
Opus 5.5 $0.00405 $0.00405
Sonnet 5.5 $0.00202 $0.00202
Haiku 4.5 $0.00101 $0.00101

Measured 27d ago against content hash ba6eaa0b4609, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ai-sync 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 27d 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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

- Before hand-rolling complex multi-step routines, inspect available skills using `skills list` or `skills find <query>`.
AGENTS.md · 81 lines

How it starts

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

AGENTS — Global instructions and critical rules

PR/MR Creation — CLI Auto-Detection

When creating a pull request or merge request, detect the remote and use the appropriate CLI:

  • GitHub (github.com) → Use gh pr create
  • Azure DevOps (dev.azure.com or *.visualstudio.com) → Use az repos pr create
  • GitLab (gitlab.com or self-hosted) → Use gl mr create

Implementation:

  1. Check the repo remote with git remote get-url origin
  2. Route to the appropriate CLI based on domain
  3. If CLI is not installed, assist with manual creation via web UI
  4. Assume CLIs are installed; they are standard on this machine

Critical Rules

  • Prevent context rot: When a session grows heavy (many turns, many files, re-deriving state), split the work into a fresh, nested context before output quality degrades. Use a native nested-session primitive if available; otherwise emit a self-contained handoff prompt. Checkpoint before splitting. See docs/context-rot.md for full procedure and templates.

  • Never commit directly to main. Always create a branch and open a Pull Request for review and CI before merging. This repository enforces review-first changes.

Tool Usage & Ecosystem Guidelines

All agent harnesses have access to the following shared tools and services. Use them when applicable:

Graphify (Codebase Knowledge Graph)

Knowledge graph engine and MCP service (graphify-mcp) at graphify-out/ mapping god nodes, communities, and cross-file dependencies.

Rules:

  • For codebase questions, first run graphify query "<question>" when graphify-out/graph.json exists. Use graphify path "<A>" "<B>" for relationships and graphify explain "<concept>" for focused concepts.
  • If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
  • After modifying code, run graphify update . to keep the graph current (AST-only, no API cost).

Ponytail (Lazy Senior Dev Mode)

Before writing any code, stop at the first rung that holds:

  1. Does this need to be built at all? (YAGNI)
  2. Does it already exist in this codebase? Reuse existing helpers/patterns, do not rewrite.
  3. Does the standard library already do this? Use it.
  4. Does a native platform feature cover it? Use it.
  5. Does an already-installed dependency solve it? Use it.
  6. Can this be one line? Make it one line.
  7. Only then: write the minimum code that works.

Read the full file on GitHub · 81 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. 27d ago Changed · +57 lines · +730 tokens per session scan A → B ba6eaa0b4609
  2. 1mo ago Changed · +14 lines · +153 tokens per session cc4aa36a4f22
  3. 1mo ago First seen · 10 lines · 129 tokens per session scan A 0db757ae6f97

Subscribe to this mod's changes

ai-sync AGENTS.md is an instructions file published in the GitHub repository XyrusCode/ai-sync (2 stars, last pushed 2d ago), licensed MIT. It adds 1,012 tokens to every session, about $0.0040 per session on Opus 5.5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories