agentleFS
benjaminwesternbenjaminwestern/google-engineer-skills/skills/skill-registry-sync/SKILL.md

skill-registry-sync

Skill5 starsChanged 8 months agoMITView on GitHub

Synchronise README.md references with installed skills from .skill-lock.json. Use when updating external skill registry references in documentation, ensuring all skill sources are properly documented, or maintaining accurate reference lists.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After installing new skills from external repositories, update README references:

    line 58
  2. Distinctive:

    Always sync after installing skills from new repositories to keep documentation accurate:

    line 160
  3. Distinctive:

    If you have multiple environments or configurations:

    line 178
  4. Distinctive:

    If no external skills are installed, the section will remain unchanged.

    line 203

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Skill Registry Sync

Synchronise external skill repository references in README.md based on installed skills from .skill-lock.json.

Quick Start

# Sync references using default lock file path
npx opencode -s skill-registry-sync sync

# Sync with custom lock file path
npx opencode -s skill-registry-sync sync --lock-file /path/to/.skill-lock.json

# Sync with custom README path
npx opencode -s skill-registry-sync sync --readme /path/to/README.md

How It Works

This skill:

  1. Reads the .skill-lock.json file (or path you specify)
  2. Extracts all unique sourceUrl values from installed skills
  3. Updates the "Other Skill Registries" section in README.md
  4. Adds any missing repository URLs as npx skills add commands

Commands

sync

Synchronise README.md with installed skills from lock file.

# Default usage - uses ~/.agents/.skill-lock.json and ./README.md
skill-registry-sync sync

# Custom lock file path
skill-registry-sync sync --lock-file /custom/path/.skill-lock.json

# Custom README path
skill-registry-sync sync --readme /custom/path/README.md

# Both custom paths
skill-registry-sync sync --lock-file /custom/lock.json --readme /docs/README.md

Examples

Example 1: Basic Sync

After installing new skills from external repositories, update README references:

# Install skills from various repositories
npx skills add https://github.com/googleworkspace/cli
npx skills add https://github.com/google-gemini/gemini-skills

# Sync references to README
skill-registry-sync sync

Example 2: Manual Lock File Analysis

Extract unique source URLs manually using jq:

# Extract all unique source URLs
cat ~/.agents/.skill-lock.json | jq -r '.skills[].sourceUrl' | sort -u

# Count skills per source
cat ~/.agents/.skill-lock.json | jq -r '.skills[].source' | sort | uniq -c

# Get skills from specific source
cat ~/.agents/.skill-lock.json | jq -r '.skills | to_entries[] | select(.value.source == "googleworkspace/cli") | .key'

Implementation

Using jq to Parse Lock File

The skill uses the jq-tooling skill to parse .skill-lock.json:

# Extract unique source URLs
cat ~/.agents/.skill-lock.json | jq -r '.skills[].sourceUrl' | sort -u

# Output format:
# https://github.com/googleworkspace/cli.git
# https://github.com/google-gemini/gemini-skills.git
# https://github.com/google-gemini/gemini-cli.git
# https://github.com/google-labs-code/stitch-skills.git
# https://github.com/vercel-labs/skills.git

README.md Section Format

The skill updates the "Other Skill Registries" section:

### Other Skill Registries

Expand your agent's toolkit with these supplementary skill collections:
- 📦 `npx skills add https://github.com/google-gemini/gemini-skills`
- ⚛️ `npx skills add https://github.com/google-labs-code/stitch-skills --skill react:components`
- 🛠️ `npx skills add https://github.com/google-gemini/gemini-cli`
- 🏢 `npx skills add https://github.com/googleworkspace/cli`
- 📦 `npx skills add https://github.com/vercel-labs/skills`

Common Workflows

Workflow 1: After Installing New Skills

# 1. Install new skills from external repo
npx skills add https://github.com/example/new-skills-repo

# 2. Sync references to README
skill-registry-sync sync

# 3. Review changes
git diff README.md

# 4. Commit updates
git add README.md && git commit -m "docs: add new skill registry reference"

Workflow 2: Audit External Dependencies

# List all external skill sources
cat ~/.agents/.skill-lock.json | jq -r '.skills[].sourceUrl' | sort -u

# Identify which skills come from external repos (not local)
cat ~/.agents/.skill-lock.json | jq -r '.skills | to_entries[] | select(.value.source != "benjaminwestern/google-engineer-skills") | [.key, .value.source] | @tsv'

Workflow 3: Generate Custom Reference Documentation

# Create a custom markdown file with all skill sources
cat ~/.agents/.skill-lock.json | jq -r '
  [.skills[].sourceUrl] | unique | 
  "## External Skill Registries\n\n" + 
  (map("- `npx skills add " + . | rtrimstr(".git") + "`") | join("\n"))
' > SKILL_SOURCES.md

Tips and Best Practices

Run After Skill Installation

Always sync after installing skills from new repositories to keep documentation accurate:

npx skills add https://github.com/org/new-skills
skill-registry-sync sync

Verify Before Committing

Review changes before committing:

skill-registry-sync sync
git diff README.md

Handle Multiple Lock Files

If you have multiple environments or configurations:

# Production environment
skill-registry-sync sync --lock-file ~/.agents/prod/.skill-lock.json --readme README.prod.md

# Development environment  
skill-registry-sync sync --lock-file ~/.agents/dev/.skill-lock.json --readme README.dev.md

Ignore Local Skills

The skill automatically filters out local skills (from the current repository) and only includes external registries in the references section.

Troubleshooting

Lock file not found

# Specify correct path
skill-registry-sync sync --lock-file /correct/path/.skill-lock.json

No changes detected

If no external skills are installed, the section will remain unchanged. Install some external skills first:

npx skills add https://github.com/googleworkspace/cli
skill-registry-sync sync

Duplicate entries

The skill automatically deduplicates URLs. If you see duplicates, ensure you're using the latest version.

Related Skills

SkillPurpose
jq-toolingParse and query JSON data including .skill-lock.json
playwright-cliCrawl documentation for creating new skills
skill-crawlerConvert crawled docs into opencode skills

Resources

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.