Skip to content
Current section: Sync

Rules, Skills and Configuration

Part of Sync.

Path What it holds
.cedr/sync.toml Which agents to write for, MCP servers, permissions and hooks
.cedr/rules/*.md Instructions, one rule per file, in file-name order
.cedr/skills/<name>/ Skills: a SKILL.md and any files beside it
.cedr/org-rules.json Your organization’s rules, as last pulled
.cedr/sync.lock What the last cedr sync wrote, so hand edits are caught
version = 1
targets = ["agents", "claude", "codex", "cursor"]
[mcp.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github@2025.4.8"]
env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" }
[mcp.docs]
url = "https://mcp.example.com/mcp"
headers = { Authorization = "Bearer ${DOCS_TOKEN}" }
[permissions]
allow = ["shell:npm test", "shell:git status"]
deny = ["shell:rm -rf", "read:.env"]
[[hooks]]
event = "after-edit"
command = "npm run format --silent"
  • Targets: agents (the shared AGENTS.md and .agents/skills/), claude, codex, cursor, gemini, copilot, opencode and antigravity.
  • Secrets: server settings may only name variables, as ${NAME}. Sync writes each one in the form its agent expects and refuses a value that looks like a real key.
  • Permissions use one vocabulary for every agent: shell:<command>, read:<files>, edit:<files>, fetch:<domain> and mcp:<server> or mcp:<server>/<tool>. Each agent gets what it can express; cedr sync lists anything an agent cannot, instead of dropping it quietly.
  • Hooks: before-shell, after-edit, session-start and stop, written as each agent’s own hook events.

A rule file can carry front matter:

---
description: Database migrations
paths: ["migrations/**"]
agents: ["claude"]
---
Every migration runs in one transaction and has a rollback.

paths makes it a path-scoped rule (Cursor and Copilot get native scoped rules; other agents get a section of AGENTS.md). agents limits it to those agents’ own instruction files.

Agent Files
Every agent AGENTS.md, .agents/skills/
Claude Code .mcp.json, .claude/settings.json (permissions and hooks), .claude/skills/, .claude/rules/, and CLAUDE.md only for Claude-only rules
Codex .codex/config.toml (MCP servers), .codex/rules/cedr.rules, .codex/hooks.json
Cursor .cursor/mcp.json, .cursor/rules/*.mdc, .cursor/cli.json, .cursor/hooks.json
Gemini CLI .gemini/settings.json
GitHub Copilot .vscode/mcp.json, .vscode/settings.json, .github/instructions/, .github/hooks/cedr.json
opencode opencode.json
Antigravity .agents/mcp_config.json, .agents/rules/, .agents/hooks.json

Settings files are merged: Sync manages only its own keys and leaves the rest of the file as it was. Markdown it generates starts with a comment saying so; cedr sync will not overwrite a Markdown file it did not write unless you pass --force.