coding-clyde

Ctx Sync — AI skill for Claude Code

AI community

Single source of truth (.ai/) for AI coding assistants.

How to install Ctx Sync

This entry records only its repository, not the path inside it, so there is no exact command to give. Open coding-clyde/ctx-sync and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ctx Sync does

Single source of truth (.ai/) for AI coding assistants. Compiles and syncs CLAUDE.md, .cursor/rules, Copilot & Windsurf while auditing tokens and secrets.

Alternatives in AI

  • Skilldock — SkillDock is an AI skill manager and skill management desktop app for Claude Code, Cursor, Codex, Windsurf, Ge 490 ★
  • LLM Wiki Compiler — Claude Code plugin that compiles markdown knowledge files into a topic-based wiki 224 ★
  • Skills Link — Sync your local skills across 41+ AI coding agents with a single command 191 ★

README

ctx-sync

One source of truth for AI editor context. Write rules once in `.ai/`, compile them into the native files every assistant expects, audit how many tokens they consume, and block credentials before they reach CI.

  • Node.js 20+ and TypeScript, ESM, strict mode.
  • Zero runtime dependencies. dependencies is empty by contract; the CLI uses only Node built-ins.
  • Deterministic output. Same source, same bytes.
  • Safe writes. Files not generated by ctx-sync are never overwritten without --force.
  • CI-ready. ctx-sync check catches drift and leaked secrets; --strict also enforces token budgets.

Why

AI assistants each invented their own context file layout. Teams copy the same rules into four files, they drift, nobody knows which one is current, and an API key eventually ends up in a prompt. ctx-sync treats editor context like code:

Source Compiled output Consumer
.ai/**/*.md CLAUDE.md Claude Code
.ai/**/*.md .cursor/rules/.mdc Cursor
.ai/**/*.md .github/copilot-instructions.md GitHub Copilot
.ai/**/*.md .windsurfrules Windsurf

Quick start

npm ci && npm run build        # until ctx-sync is published to npm

ctx-sync init                  # create .ai/ with ready-to-edit templates
ctx-sync sync                  # audit, then write CLAUDE.md, .cursor/rules/, ...
ctx-sync check                 # CI gate: fail on drift or exposed secrets

(From a source checkout, `node dist/index.js ` is the same thing.)

`init` creates four generic rules (`00-overview.md`, `coding-style.md`, `testing.md`, `security.md`) that already pass `check --strict`; replace them with your own. Or create a rule by hand in `.ai/rules/typescript.md`:

---
id: typescript
title: TypeScript conventions
targets: [claude, cursor, copilot, windsurf]
priority: 40
globs:
  - "**/*.ts"
  - "**/*.tsx"
tags: [typescript]
---

# TypeScript conventions

- Keep `strict: tr