rfxn/rdf/r-util-lib-sync

Claude Code and agent skill by rfxn/rdf

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Cross-project shared library drift detection. Compares canonical library

Install

npx vskill@latest install rfxn/rdf/r-util-lib-sync

SKILL.md

The same SKILL.md was published earlier as rfxn/rdf/r-util-lib-sync.

Cross-project shared library drift detection. Compares canonical library sources against all consumer copies. Report mode by default; optional sync mode copies and verifies.

Arguments

  • $ARGUMENTS — optional: --sync to execute copy operations (default: report only)

Setup

Read .rdf/governance/index.md to identify:

  • Shared libraries used by this project (from governance/architecture.md

or by scanning for library version variables)

  • Canonical source locations for each library
  • Consumer paths within the project

If governance does not specify library locations, fall back to scanning for files with _LIB_VERSION= patterns to identify shared libraries.

Step 1: Detect Context

  • If CWD is a project directory, check only that project's library copies
  • If CWD is a workspace root, check all projects under it

For each project, determine which libraries it consumes by checking for the presence of library files.

Step 2: Compare

For each canonical-to-consumer pair:

  1. Checksum: sha256sum both files, compare
  2. Version: Extract version variable from both and compare
  3. Status: SYNCED (identical checksum) or DRIFTED

Step 3: Drift Report

Display the report using structured formatting with inline code for versions and paths, and italic for status keywords:

### Shared Library Sync Report
| Library | Canonical | Consumer | Local | Status |
|---------|-----------|----------|-------|--------|
| `lib_a` | `1.0.4` | `proj_x` | `1.0.4` | *synced* |
| `lib_a` | `1.0.4` | `proj_y` | `1.0.3` | *drifted* |
| `lib_b` | `2.0.1` | `proj_x` | — | *n/a* |
#### Totals
| *drifted* | *synced* | *n/a* |
|-----------|----------|-------|
| {N} | {N} | {N} |

For drifted entries, show the diff --stat summary in a fenced code block.

If reverse drift is detected (consumer ahead of canonical), use a blockquote warning:

> **Reverse Drift** — `{project}/{library}` is ahead of canonical.
> Local modifications may need to be upstreamed first.

Step 4: Sync (only with --sync)

If $ARGUMENTS contains --sync:

For each DRIFTED library:

  1. command cp canonical to consumer path
  2. command chmod 750 consumer path
  3. Run bash -n on the copied file to verify syntax
  4. Run sha256sum to confirm match
  5. Report success/failure

After sync, display results as a task list:

#### Sync Results
- [x] `lib_a` -> `proj_y`: *synced* (`bash -n` pass, checksum verified)
- [ ] `lib_b` -> `proj_z`: *failed* (syntax error in canonical)

End with a blockquote:

> **{N} libraries synced.** Review with `git diff` before committing.

If --sync not specified, end with:

> Run `/rdf:r-util-lib-sync --sync` to copy drifted libraries.

Rules

  • NEVER edit a shared library inside a consuming project
  • NEVER sync if the canonical source has syntax errors (bash -n check first)
  • Always show the diff before syncing (in report mode)
  • Skip libraries whose canonical source doesn't exist
  • Warn if a consumer has local modifications not present in canonical

(reverse drift — consumer ahead of canonical)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
20
Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rfxn/rdf/r-util-lib-sync/badge)](https://verified-skill.com/skills/rfxn/rdf/r-util-lib-sync)

Something wrong with this skill or its page? Tell us.