agentleFS
backspace-shmackspacebackspace-shmackspace/claude-devkit/skills/sync/SKILL.md

sync

Skill15 starsChanged 3 months agoMITView on GitHub

Synchronize CLAUDE.md and README with recent code changes.

  • Reads credentials

50 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use develop, scope and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bamechoSkill

    develop

    开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移

    Also in 6 projects that use this

  • vltingSkill

    scope

    Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.

    Also in 6 projects that use this

  • kt057Skill

    check

    lint, typecheck, test を一括実行して結果をサマリーする

    Also in 7 projects that use this

  • nicolasestremSkill

    document

    Create focused documentation for specific components or features

    Also in 5 projects that use this

  • Microsoft AzureSkill

    test

    Also in 9 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 7 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 12 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 45 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is empty: scope = "recent"

    line 52
  2. Very specific:

    Commit messages (from --oneline)

    line 66
  3. Distinctive:

    Search for environment variable references in:

    line 74
  4. Distinctive:

    Read CLAUDE.md and check which environment variables are already documented.

    line 83
  5. Distinctive:

    Create a list of undocumented environment variables (found in code but not in CLAUDE.md).

    line 85
  6. Distinctive:

    Read the current CLAUDE.md and README.md files

    line 100
  7. Very specific:

    Write $PLANS_DIR/sync-[timestamp].review.md with this structure:

    line 104
  8. Very specific:

    Read $PLANS_DIR/sync-[timestamp].review.md and check verdict.

    line 136
  9. Very specific:

    Read the review at $PLANS_DIR/sync-[timestamp].review.md.

    line 151
  10. Distinctive:

    Use the Edit tool to make precise changes.

    line 154
  11. Distinctive:

    Follow markdown best practices:

    line 156
  12. Distinctive:

    Use proper heading hierarchy

    line 157
  13. Distinctive:

    Keep lines under 100 characters

    line 158
  14. Distinctive:

    Use code blocks with language specifiers

    line 159
  15. Distinctive:

    Use relative links for local files

    line 160
  16. Distinctive:

    Do NOT add suggested updates unless they're critical.

    line 163
  17. Distinctive:

    Do NOT change formatting or structure unnecessarily."

    line 164

“Common” is measured: kept by at least 6 in 10 of the 45 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/sync Workflow

Inputs

  • Scope: $ARGUMENTS (optional: "recent", "full")
    • recent: Last 5 commits (default)
    • full: Full codebase scan

Output Rules

  • Always print full absolute paths for all artifact references (plan files, review files, audit logs). This makes paths clickable in terminals like Warp. Use the resolved $PLANS_DIR value, never relative paths.

Role

You are the documentation coordinator. You detect changes, delegate review to the librarian, and present diffs for user approval. You do NOT make documentation changes yourself — you coordinate the process.

Step 1 — Detect changes

Resolve devkit paths (MUST be first action in Step 1):

Tool: Bash

# --- Devkit Path Resolution ---
DEVKIT_SCRIPTS="${CLAUDE_DEVKIT:-$HOME/.claude-devkit}/scripts"

# Source path resolution helper
if [ -f "$DEVKIT_SCRIPTS/resolve-project-dir.sh" ]; then
  . "$DEVKIT_SCRIPTS/resolve-project-dir.sh"
  DEVKIT_PROJECT_DIR_RESOLVED=$(resolve_devkit_project_dir) || {
    echo "Failed to resolve project directory" >&2; exit 1
  }
elif [ -n "${DEVKIT_PROJECT_DIR:-}" ]; then
  DEVKIT_PROJECT_DIR_RESOLVED="$DEVKIT_PROJECT_DIR"
else
  echo "WARNING: devkit is not installed. Using deprecated .devkit/ fallback." >&2
  DEVKIT_PROJECT_DIR_RESOLVED=".devkit"
fi

PLANS_DIR="$DEVKIT_PROJECT_DIR_RESOLVED/plans"
mkdir -p "$PLANS_DIR"
echo "Plans directory: $PLANS_DIR"

Tool: Bash (direct — coordinator does this)

Determine scope:

  • If $ARGUMENTS is empty: scope = "recent"
  • Else: scope = $ARGUMENTS

Validate scope is one of: recent, full. If not, stop with: "Invalid scope. Use: /sync [recent|full]"

If scope is "recent": Run: git log -5 --oneline --name-status

If scope is "full": Run: git log -20 --oneline --name-status

Extract:

  • Changed files (from --name-status)
  • Commit messages (from --oneline)

Derive timestamp: [timestamp] = current ISO datetime (e.g., 2026-02-07T12-30-00)

Step 2 — Detect new environment variables

Tool: Grep, pattern=process\.env|os\.getenv|ENV\[|getenv\(|std::env, output_mode=content

Search for environment variable references in:

  • Source code files (not test files)
  • Configuration files
  • Documentation files

Generate list of environment variables found.

Tool: Read (direct — coordinator does this)

Read CLAUDE.md and check which environment variables are already documented.

Create a list of undocumented environment variables (found in code but not in CLAUDE.md).

Step 3 — Librarian review

Tool: Task, subagent_type=general-purpose, model=claude-sonnet-4-6

Prompt: "You are reviewing documentation for currency and accuracy.

Recent changes: [Paste commit list and changed files from Step 1]

Undocumented environment variables: [List from Step 2]

Task:

  1. Read the current CLAUDE.md and README.md files
  2. Compare them against the recent code changes
  3. Identify documentation that is now stale, missing, or incorrect

Write $PLANS_DIR/sync-[timestamp].review.md with this structure:

Verdict

[CURRENT / UPDATES_NEEDED]

Required Updates

(Changes that must be made for accuracy)

CLAUDE.md

  • Update tech stack version (e.g., 'React 17' → 'React 18')
  • Add missing environment variable: VAR_NAME
  • Remove deprecated pattern: [pattern name]
  • Update build command: [old] → [new]

README.md

  • Update installation steps
  • Add new dependency: [name]
  • Update example usage
  • Fix broken link: [url]

Suggested Updates

(Optional improvements)

  • Add example for new feature
  • Clarify ambiguous section: [section name]
  • Add troubleshooting for common issue

Rationale

(Why these changes are needed - reference specific commits or code changes)"

Step 4 — Update documentation (conditional)

Read $PLANS_DIR/sync-[timestamp].review.md and check verdict.

If verdict is CURRENT: Output: "✅ Documentation is current. No updates needed.

Review: $PLANS_DIR/sync-[timestamp].review.md"

Stop the workflow.

If verdict is UPDATES_NEEDED:

Tool: Task, subagent_type=general-purpose, model=claude-sonnet-4-6

Prompt: "You are updating project documentation based on a librarian review.

Read the review at $PLANS_DIR/sync-[timestamp].review.md.

Apply all Required Updates to CLAUDE.md and README.md. Use the Edit tool to make precise changes.

Follow markdown best practices:

  • Use proper heading hierarchy
  • Keep lines under 100 characters
  • Use code blocks with language specifiers
  • Use relative links for local files
  • Keep tables aligned

Do NOT add suggested updates unless they're critical. Do NOT change formatting or structure unnecessarily."

Step 5 — Verification

Tool: Bash (direct — coordinator does this)

Run: git diff CLAUDE.md README.md

Present the diff output to the user with this message:

"📝 Documentation changes ready for review:

[Show git diff output]


Review the changes above.

To accept these changes:

git add CLAUDE.md README.md
git commit -m \"docs: sync with codebase

Updates documentation to reflect recent code changes.

Review: $PLANS_DIR/sync-[timestamp].review.md

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>\"

To reject:

git restore CLAUDE.md README.md

Review: $PLANS_DIR/sync-[timestamp].review.md"

Step 6 — Archive review

Tool: Bash (direct — coordinator does this)

Run: mkdir -p $PLANS_DIR/archive/sync && mv $PLANS_DIR/sync-[timestamp].review.md $PLANS_DIR/archive/sync/

Output: "Review archived to $PLANS_DIR/archive/sync/sync-[timestamp].review.md"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.