session-sync

Detect configuration drift between local repositories and remote origin.

11|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill session-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-sync
Source: https://github.com/mindcockpit-ai/cognitive-core/tree/main/core/skills/session-sync
Command: npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill session-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures development machines share a consistent project state by detecting configuration drift between the local repository and the remote origin, preventing accidental work on stale or diverging setups.

Core Features & Use Cases

  • Branch and Sync Status: Reports current branch, ahead/behind counts, and working tree cleanliness.
  • Configuration Drift Report: Compares local vs remote for tracked config files such as .claude/, .mcp.json, and CLAUDE.md and highlights local or remote changes.
  • Inventory and Health Checks: Lists local agents and skills, flags missing or untracked items, and verifies essential files exist.
  • Action Summary: Recommends exact git commands to resolve drift and can optionally perform a git pull when requested via a flag.
  • Use Case: Before starting work on a shared Claude Code project, run this to confirm agents, skills, and MCP settings match the remote and to avoid merge conflicts.

Quick Start

Run the session-sync skill to verify branch status, detect configuration drift for .claude/, .mcp.json, and CLAUDE.md, list agents and skills, and receive recommended git actions or perform an optional pull.

Frequently Asked Questions about session-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect configuration drift between my local git repository and the remote origin?

Detect configuration drift by scanning branch status, tracked config files, and uncommitted changes between your local repository and the remote origin. This checks ahead/behind counts and diffs specific files like .claude/, .mcp.json, and CLAUDE.md to highlight any local or remote changes.

What is the best way to keep Claude Code agents and MCP settings in sync across development machines?

Keeping Claude Code agents and MCP settings in sync involves verifying branch status and diffing tracked configuration files like .mcp.json and CLAUDE.md against the remote. This ensures shared project state consistency and prevents accidental work on stale setups.

How do I verify untracked files and agent inventory before starting a session?

Verify untracked files and agent inventory by running a health check that enumerates local agents and skills. This process flags missing items and confirms essential files exist before you begin a development session.

Can I automatically execute git pull to resolve configuration drift during session start?

You can automatically execute git pull to resolve configuration drift by providing the --pull flag. This performs the pull action directly during session start or pre-pull verification to update your local repository.

Does this configuration drift detection work for pre-commit checks and machine switches?

Yes, drift detection applies to Claude Code projects during session start, machine switches, pre-commit checks, and pre-pull verification. It ensures development machines share a consistent project state across these different workflow stages.