Skip to main content
skill CX Codex

pmstudio-sync — Claude Code skill for document sync

The pmstudio-sync skill turns changes in source files into proposed updates for linked PRDs, decks, and notes. It waits for approval before editing.

MIT ★ 328 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add coco-research/coco --skill pmstudio-sync -a claude-code
Open on GitHub

What pmstudio-sync does

When source notes or other files change, the skill uses .sync-watch.json to find related documents and draft specific edits. It can read .sync-report.md or check for changes on demand; pass a file path to /doc-sync to process one source file.

The skill presents a diff and asks for approval first. Once approved, it rereads each target and uses Edit to preserve the rest of its contents. It skips .docx, .xlsx, .pptx, and .pdf files, so their key content must be supplied as text. No target document changes without your approval.

What it helps with

  • carry new decisions from meeting notes into a PRD
  • update a presentation after its source files change
  • review pending changes in .sync-report.md
  • map source changes to the documents they affect

Example prompts for the agent

  • Run /doc-sync and propose updates to linked documents based on project changes.
  • Process docs/meeting-notes/new.md and show me the PRD diff.
  • Review .sync-report.md and wait for my approval before editing.

How to install pmstudio-sync

1Skills CLI (Vercel)

npx skills add coco-research/coco --skill pmstudio-sync -a claude-code

2Manually: put the files in place

~/.claude/skills/doc-sync/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/doc-sync/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pmstudio-sync

How do I install pmstudio-sync in Claude Code?

Run npx skills add coco-research/coco --skill doc-sync -a claude-code. The skill file is at ~/.claude/skills/doc-sync/SKILL.md.

What does pmstudio-sync do?

It extracts changes from source files and drafts updates to related documents. It applies approved edits without rewriting target files in full.

Which file types can the skill read?

It reads .md and .html files. It skips binary .docx, .xlsx, .pptx, and .pdf files and asks you to provide their key content as text.

Source text

SKILL.md · MIT
---
name: pmstudio-sync
description: "Use when linked docs drift, when a source file changes and downstream PRDs, decks, or notes must follow, or when a .sync-report.md exists. Diffs the proposed edits, applies them only after approval, and never overwrites a target file."
domain: pm
---

# Doc Sync — Cascading Document Updater

## What This Skill Does

Maintains consistency across a documentation ecosystem where one source change (e.g., a new meeting note) should cascade updates to multiple downstream documents (PRD, presentation, project memory).

**This is NOT a background watcher.** This skill is the Claude-side processor that:
1. Reads a sync report or detects changes directly
2. Extracts actionable content from new/modified source files
3. Proposes specific edits to each downstream target
4. Applies changes only after user approval

## Prerequisites

### Infrastructure (one-time setup)

The persistent detection layer runs outside Claude Code via `/pm:sync-init`:

| Component | Path | Purpose |
|-----------|------|---------|
| Orchestrator | `~/.claude/scripts/project-sync-orchestrator.sh` | Email search + file detection + report generation |
| launchd agent | `~/Library/LaunchAgents/com.claude.project-sync.<name>.plist` | Background scheduler (every 2 hours) |
| State dir | `~/.claude/state/<project-name>/` | Logs, timestamps, cached config (outside OneDrive) |

### Per-Project Config

Each project needs `.sync-watch.json` in its root:

```json
{
  "project_name": "My Project",
  "watch_dirs": ["docs/meeting-notes", "docs/research"],
  "target_docs": {
    "tier1": [
      {
        "path": "docs/PRD.html",
        "name": "Product Requirements",
        "update_from": ["meeting-notes", "research"],
        "what": "Requirements, user stories, decisions"
      }
    ],
    "tier2": [
      {
        "path": "docs/presentation.html",
        "name": "Stakeholder Deck",
        "update_from": ["meeting-notes"],
        "what": "Stakeholder updates, timeline changes"
      }
    ]
  },
  "ignore_patterns": [".*", "*.tmp", "~$*"],
  "file_types": [".md", ".html", ".docx", ".xlsx", ".pdf"]
}
```

## Invocation

### Automatic (via session hook)
When you start a Claude Code session in a watched project with pending changes:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 SYNC WATCHER ► 3 new/modified file(s) detected
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Say "process sync report" to review and apply updates.
```

### Manual
- `/doc-sync` — check for changes now and process
- `/doc-sync path/to/new-file.md` — process a specific source file
- `process sync report` — process a pending `.sync-report.md`

## Process

### Step 1: Detect Changes

**If `.sync-report.md` exists:** Read it — it lists all changed files with timestamps.

**If no report (manual invocation):**
```bash
!`bash ~/.claude/scripts/project-sync-orchestrator.sh "$(pwd)"`
```
Then read the generated `.sync-report.md` (written to project root or `~/.claude/state/<project-name>/sync-report.md`).

**If a specific file was passed as `$ARGUMENTS`:** Use that file as the sole source.

**If no changes detected:** Report "All documents are in sync." and stop.

### Step 2: Read Source Files

For each new/modified file detected:

1. **Skip binaries** (`.docx`, `.xlsx`, `.pptx`, `.pdf`) — note them but don't read. Tell user: "Binary file detected — paste key content or convert to text."
2. **Read text files** (`.md`, `.html`) in full
3. **Extract structured data** from each:

```
For each source file, extract:
- NEW STAKEHOLDERS: Name, Role, Email, Group
- NEW DECISIONS: What was decided, by whom, date, impact
- NEW REQUIREMENTS: Functional/non-functional, priority, acceptance criteria
- NEW ACTION ITEMS: Owner, deadline, status
- NEW ARCHITECTURE: Design changes, module updates, integration changes
- NEW RISKS: Description, impact, mitigation
- VERSION CHANGES: What changed from previous version
```

### Step 3: Read Config & Map Dependencies

Read `.sync-watch.json` to determine which target docs need which types of updates.

For each target doc in `tier1` and `tier2`:
- Check if any source file matches its `update_from` patterns
- If yes → read the target doc to understand current state
- Identify exactly WHERE in the target doc the new content should go

### Step 4: Propose Updates

Present a structured proposal — DO NOT edit anything yet:

```markdown
## Sync Proposal

### Source: Meeting-Notes-2026-03-17.md
**New content extracted:**
- 2 new stakeholders (Jane Doe, John Smith)
- 1 decision (moved go-live to Q4)
- 3 action items

### Updates Needed:

**1. PRD.html** (Tier 1)
- Section 05 Stakeholders: Add Jane Doe (Tax Director), John Smith (IT Lead)
- Section 12 Timeline: Update go-live from Q3 → Q4
- Change log: Add v1.1 entry
- [Show exact diff preview for each change]

**2. Presentation.html** (Tier 1)
- Slide 7 (Team): Add 2 stakeholder cards
- Slide 12 (Timeline): Update milestone date
- [Show exact diff preview]

**3. CLAUDE.local.md** (Tier 1)
- Recent Changes: Add dated entry
- [Show exact content to append]

**4. Stakeholder-Directory.xlsx** (Tier 2)
- SKIP — binary file, manual update needed
```

### Step 5: Get Approval

Ask user:
- "Apply all updates?" → proceed with all
- "Apply selectively?" → let user pick which targets
- "Skip for now?" → clean up report, do nothing
- User may also request modifications to the proposal

### Step 6: Apply Updates

For each approved target:
1. **Read the target file** (always re-read before editing — it may have changed)
2. **Apply edits** using the Edit tool (not Write — preserve unchanged content)
3. **Verify** the edit was applied correctly
4. **Log** what was changed

### Step 7: Clean Up & Update Memory

After all edits applied:
1. **Delete `.sync-report.md`** (consumed)
2. **Update `_temp/.last-sync-check`** timestamp
3. **Update `CLAUDE.local.md`** Recent Changes section with a dated entry summarizing what was synced
4. **Report** summary to user:

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 DOC SYNC ► COMPLETE ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Source files processed: 3
Documents updated: 4
  ✓ PRD.html — 3 edits (stakeholders, timeline, changelog)
  ✓ Presentation.html — 2 edits (team slide, timeline)
  ✓ CLAUDE.local.md — 1 edit (recent changes)
  ⚠ Stakeholder-Directory.xlsx — skipped (binary)

Manual follow-up needed:
  - Update Stakeholder-Directory.xlsx with 2 new contacts
```

## Critical Rules

1. **NEVER edit without approval.** Always show the proposal first. The user must explicitly approve.
2. **NEVER fabricate content.** Only extract what's actually written in source files. If a meeting note doesn't mention a stakeholder's email, don't guess it.
3. **NEVER overwrite — always append/insert.** Use Edit tool with precise `old_string` matching. Never rewrite entire files.
4. **ALWAYS read target docs before editing.** They may have been modified since the report was generated.
5. **ALWAYS preserve existing formatting.** Match the target doc's style (HTML structure, CSS classes, indentation patterns).
6. **Binary files are report-only.** Flag them for manual update, don't attempt to modify.
7. **Version bumps:** If the target doc has a version badge/number, increment it and add a changelog entry.

## Adding This to a New Project

1. Create `.sync-watch.json` in the project root (use template above)
2. Run `/pm:sync-init` to set up the launchd cron job
3. Done — the background orchestrator runs every 2 hours and generates `.sync-report.md` when changes are detected

## Dependency Graph Pattern

For complex projects, document the update cascade in `.sync-watch.json`:

```
Meeting Notes ──→ PRD ──→ PRD Presentation
       │                         │
       ├──→ Main Presentation ←──┘
       │
       └──→ CLAUDE.local.md ←── (all changes)
```

This ensures that when a meeting note creates a PRD change, and that PRD change should also update the presentation, the full cascade is handled in one sync pass.

© coco-research · MIT · coco-research/coco

Similar skills

SKILL.md skills catalog →
recipe-sync-contacts-to-sheet official googleworkspace recipe-sync-contacts-to-sheet — a skill for Claude Code, Codex, Cursor and other platforms that exports Google Contacts to a Google Sheets spreadsheet. Runs via agent command and requires the gws-people and gws-sheets skills loaded first. CX Codex +1 31,700installs asc-metadata-sync rorkai asc-metadata-sync — a skill for the asc CLI: pull App Store Connect metadata into local JSON, validate it, push it back. Useful when you are editing localizations, keywords or store assets. CX Codex +1 8,300installs asc-revenuecat-catalog-sync rorkai The asc-revenuecat-catalog-sync Claude Code skill compares App Store Connect subscriptions and in-app purchases with RevenueCat resources. It runs for catalog setup, syncing, or a pre-release drift check. CX Codex +1 6,400installs beat-sync-editing iart-ai beat-sync-editing is a Claude Code skill that plans music-synced cuts, transitions, and pacing. It activates for requests to retime a sequence, cut to a beat, or map an edit into frames. CX Codex +1 6,100installs decision-doc-sync purrfold decision-doc-sync keeps README, DESIGN, AGENTS and ADR files aligned with the code after architectural or UX changes. Useful when an edit breaks the docs. CX Codex +1 5,700installs sync jsmastery-pro sync — a skill that brings AGENTS.md, the scope and spec status lines back in line with what the repo shows after a change. Runs in Claude Code, Codex, Cursor, Copilot, Gemini CLI and OpenCode. CX Codex +1 5,000installs

From the same set82

The whole set →
develop develop runs a multi-agent build and bugfix pipeline that shards file edits across specialized agents and validates changes with regression evidence. CX Codex +1 ★ 328repo stars data-specialist data-specialist — a subagent for exploratory data analysis, machine learning workflows, and SQL query tuning across PostgreSQL, MySQL, SQL Server, and Oracle. CX Codex ★ 328repo stars media-use media-use is a skill for HyperFrames projects that finds music, sound effects, icons and logos, creates voiceover, and edits existing footage. CX Codex +1 ★ 328repo stars brain:init brain:init is a Claude Code skill that sets up project_brain.db in the project directory and extracts structured memory from CLAUDE.local.md, docs, and notes. CX Codex +1 ★ 328repo stars agent-lightning A reference skill for Microsoft's Agent Lightning: instrument an agent, collect traces, then run reinforcement learning or prompt tuning on top of them. CX Codex +1 ★ 328repo stars sync-init sync-init automates project background sync every 2 hours: monitors Outlook emails, checks watched folders for changes, and refreshes documents via Claude CLI. CX Codex +1 ★ 328repo stars test Runs the complete test cycle: coverage analysis, test generation, and regression validation. Call it to fill coverage gaps or verify the test suite runs end-to-end. CX Codex +1 ★ 328repo stars cognee:store cognee:store is a Claude Code skill that writes session entities, decisions and events to a Cognee knowledge graph through POST /api/v1/remember. Project agreements stay in the graph and come back on semantic search. CX Codex +1 ★ 328repo stars

Project sponsors

Companies that keep this analytics open