Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Sync Viewer Symlinks

ASecurity

Ensure site/viewer/lib has correct symlinks to src/viewer/assets/lib

273 stars
0 votes
0 copies
0 views
Added 9/12/2026
datajavascriptrustjavabashgitapibackend

Works with

claude codeapi

Security Analysis

A100/100

Scanned 9/12/2026

Install to Claude Code

$npx -y skills add iopsystems/rezolus --skill sync-viewer-symlinks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sync Viewer Symlinks?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Sync Viewer Symlinks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iopsystems-sync-viewer-symlinks/badge)](https://www.skillsdirectory.com/skills/iopsystems-sync-viewer-symlinks)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: sync-viewer-symlinks
description: Ensure site/viewer/lib has correct symlinks to src/viewer/assets/lib
---

Synchronize symlinks in `site/viewer/lib/` so that the site viewer picks up
all shared modules from `src/viewer/assets/lib/`.

## Context

The site viewer (`site/viewer/`) shares most of its JavaScript and CSS with
the agent viewer (`src/viewer/assets/`). Shared files are kept as **symlinks**
in `site/viewer/lib/` pointing into `src/viewer/assets/lib/`. A small set of
site-specific files are standalone (not symlinked).

When new files are added to `src/viewer/assets/lib/`, the corresponding
symlink in `site/viewer/lib/` must be created manually. This skill detects
and fixes any missing symlinks.

## Standalone files (never symlinked)

Only these two top-level files in `site/viewer/lib/` are site-specific real
files (site keeps its own copy):

- `script.js` — site-specific entry point
- `viewer_api.js` — site-specific API transport layer (calls the in-browser
  WASM registry instead of the HTTP backend)

Everything else — **including `data.js`** — is a same-name symlink into
`src/viewer/assets/lib/`. (There is no `data_base.js`; that was an older
architecture. `dashboards.js` no longer exists.)

## Coverage can be per-file OR a directory symlink

Most of `site/viewer/lib/` is per-file symlinks, but some subtrees are covered
by a **directory symlink** — e.g. `site/viewer/lib/embed ->
../../../src/viewer/assets/lib/embed` — which serves every file underneath it.
So the invariant is **resolution, not per-file-symlink presence**: every shared
module must *resolve* at the same relative path under `site/viewer/lib/`.

A tool that looks only for a per-file symlink (or a `find` that doesn't descend
through a directory symlink) will **false-flag** files under a directory
symlink. Test with `[ -e "$link" ]` (follows all symlinks), never `[ -L ]`.
CAUTION: because `site/viewer/lib/embed` is a directory symlink into `src/`,
writing to `site/viewer/lib/embed/X` writes *through* it into `src/…/embed/X` —
never `mkdir`/`ln` inside a directory-symlinked path.

## Enforced in CI

`scripts/check-viewer-symlinks.sh` implements this (resolution-based) check and
runs on every PR via `.github/workflows/viewer-symlinks.yml`. Run it locally
before pushing a viewer change: `bash scripts/check-viewer-symlinks.sh`.

## Steps

1. **Scan** `src/viewer/assets/lib/` recursively for all `.js` and `.css` files

2. **For each source file**, determine the expected path in `site/viewer/lib/`:
   - Skip the standalone top-level files `script.js`, `viewer_api.js`
   - Everything else → same relative path, which must **resolve** (`[ -e ]`)
     via either a per-file symlink or a covering directory symlink

3. **Check** whether the expected symlink exists and points to the correct
   target. Compute the relative path from the symlink location back to the
   source file (e.g., `../../../src/viewer/assets/lib/charts/chart.js` for a
   file in `site/viewer/lib/charts/`).

4. **Create** any missing symlinks. Create parent directories if needed.
   Report each symlink created.

5. **Detect** any stale symlinks in `site/viewer/lib/` that point to
   non-existent source files, and report them (but don't delete without
   asking).

6. **Stage** newly created symlinks with `git add`.

7. **Report** a summary: how many symlinks checked, how many created, any
   stale links found.

## Pre-commit hook

A Claude Code hook at `.claude/settings.json` runs
`.claude/scripts/pre-commit-check.sh` before every `git commit`. It blocks
the commit if:

- Any shared viewer module fails to resolve under `site/viewer/lib/`
- Dashboard JSON is out of date with Rust definitions (only when
  `src/viewer/dashboard/` or `src/viewer/plot.rs` files are staged)

The hook **wiring** (`.claude/settings.json`) is per-checkout Claude Code
config, so the hook only fires for local Claude Code users — that is exactly
why the symlink check is *also* enforced in CI (`viewer-symlinks.yml` →
`scripts/check-viewer-symlinks.sh`), which is the binding gate for every PR.
To set up the local hook on a fresh checkout, create `.claude/settings.json`:

```json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash(git commit*)",
        "hooks": [
          {
            "type": "command",
            "command": ".claude/scripts/pre-commit-check.sh",
            "timeout": 120
          }
        ]
      }
    ]
  }
}
```

And copy or recreate `.claude/scripts/pre-commit-check.sh` (see the
existing copy in this repo's working tree for reference).

Attribution

iopsystemsiopsystems
View sourceMore from iopsystems →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

661090 votes

Weather

Get current weather and forecasts (no API key required).

476190 votes
View all in data →