Claude
Skills
Sign in
Back

teamcraft-glgd:sync-claude-md

Included with Lifetime
$97 forever

Audit and update CLAUDE.md, .claude/rules/, and .teamcraft/project.md to reflect the current state of the project. Run anytime — mid-ticket, end of sprint, pure maintenance, or first-time setup for a project with none of these files. Developer drives what changes; skill provides the analysis.

Security

What this skill does


## Goal

Keep CLAUDE.md, `.claude/rules/`, and `.teamcraft/project.md` accurate and lean. Remove entries that are now discoverable from the codebase. Add new non-obvious things the team has learned. Incorporate lessons from recent work, newly established conventions, or developer input. Works for any project at any point — including projects with none of these files.

## Hard Constraints

- No presuppositions about project state. None of these files may exist. All of them may exist. Some may be hand-crafted with no prior teamcraft history. Work with what's there.
- Never write anything without showing proposed changes and getting developer confirmation.
- Additions to CLAUDE.md must pass the test: would Claude Code get this wrong, and can it not discover it from the environment? If the answer is no — it does not belong.
- Removals from CLAUDE.md are for entries that are now discoverable from the codebase — things visible in config files, code patterns, or README that Claude Code can now see for itself.
- `.teamcraft/project.md` stays minimal. If it doesn't exist, offer to create it. If Drive URLs have changed, update them.
- `CLAUDE.md` starts with `@.teamcraft/project.md` — verify this import is present.
- If a Drive file operation fails with a path error, read the error message to identify a valid accessible host path and retry with it.

## Resolve Drive Account

Call `mcp__google-drive__list_accounts` before any other Drive operation:
- **No accounts** — Drive is not configured for this user. Tell them and skip Drive operations.
- **One account** — Use it. Pass `account_email` explicitly on every Drive tool call this session.
- **Multiple accounts** — Present the list, ask which account to use for this session. Pass that `account_email` on every Drive tool call.

If any Drive call returns a permission error, surface it: the active account may not have access to that file or folder. Offer to try another account if one is available.

## Orient to Current State

Establish what the developer wants to accomplish. The common scenarios: capturing lessons learned from a recent ticket, recording newly established team conventions, a periodic audit to trim stale entries, or initial setup for a project that has none of these files.

Read what exists: `.teamcraft/project.md`, `CLAUDE.md`, `.claude/rules/*.md`. Read key project config files to understand what the codebase now reveals — dependencies, structure, patterns. This is the basis for identifying what in CLAUDE.md has become redundant.

If Drive artifacts are referenced in project.md, offer to load the tech decisions and conventions documents as context. The developer may also have input that doesn't come from any document — lessons learned during recent work, gotchas discovered, architectural changes made.

## Produce the Analysis

Assess CLAUDE.md and rules files against the current codebase and developer input:

**Candidates for removal:** entries that are now visible in the code, config files, or README — things Claude Code can discover for itself.

**Candidates for addition:** lessons learned from recent work, newly established conventions, non-obvious constraints discovered, architectural decisions that look wrong without context, anything the developer reports Claude Code keeps getting wrong.

**Candidates for update:** entries that are partially correct but need refinement as the project has evolved.

Present additions and removals separately. The developer confirms, amends, or overrides each. Nothing is written until confirmed.

If none of these files exist, offer to create them — this skill functions as a first-time setup in that case. To create `.teamcraft/project.md`, identify the GitLab project: check git remote context first, then if needed use `mcp__gitlab__list_projects` to surface available projects and ask the developer to confirm which one. Never assume. See `references/example-claude-md.md` for correct format and content.

## Done

Confirm what was written. Remind the developer this is a living system — run this skill whenever lessons are learned or the codebase evolves significantly enough that CLAUDE.md entries may have become stale or new ones are warranted.

Related in Security