fleet-guarding-paths

Audit and fix path duplication across Socket repositories to enforce canonical path references.

125|42|Updated May 19, 2025
One-click install
npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-guarding-paths
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fleet-guarding-paths
Source: https://github.com/SocketDev/socket-mcp/tree/main/.agents/skills/fleet-guarding-paths
Command: npx skills add https://github.com/SocketDev/socket-mcp --skill fleet-guarding-paths

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audits and fixes path duplication in a Socket repo. Applies the strict "1 path, 1 reference" rule: every build/test/runtime/config path is constructed exactly once; everywhere else references the constructed value.

Core Features & Use Cases

  • Enforces a single canonical path construction across packages to prevent drift and inconsistent references during builds, tests, and runtime configurations.
  • Provides three operational modes: default audit-and-fix, check (read-only) for violations, and install to drop in the gate, hook, and rule into a fresh repository.
  • Supports use when path drift surfaces from pnpm check, when bootstrapping a new Socket repo, or when aligning a sibling package with standardized path conventions.

Quick Start

Run the guarding-paths command in your repository to perform a full audit and apply fixes.

Frequently Asked Questions about fleet-guarding-paths

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix path duplication issues in a monorepo build system?

You can check for path violations using a read-only check mode that scans the repository without applying fixes. This identifies where path drift and inconsistent references have occurred during multi-package builds and runtime configurations.

What is the best way to enforce a single canonical path construction across packages?

The best way to enforce a single canonical path construction is by installing dedicated gates and hooks into your repository. This applies a strict "1 path, 1 reference" rule, preventing future drift and ensuring consistent references across all packages.

Can I use path guarding rules when bootstrapping a new Socket repository?

Yes, you can use an install mode to drop the gate, hook, and rule into a fresh repository. This aligns sibling packages with standardized path conventions immediately during repository setup.

Why does pnpm check surface path drift in a multi-package repository?

pnpm check surfaces path drift because multiple packages construct the same paths independently, creating inconsistent references. Applying a strict canonical path model fixes this by ensuring every path is constructed exactly once and referenced everywhere else.

Does enforcing 1 path 1 reference integrate with existing CLAUDE.md rules?

Yes, enforcing the 1 path, 1 reference model integrates directly with CLAUDE.md rules. It applies hooks and gates to prevent path drift and ensure consistent path references across builds, tests, and runtime configurations.