add-path-type-assertions-or-realpath-resolve-calls-in-path-joini

Official

Prevent path errors in Node.js path-joining utilities

AuthorZaxbyHub
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses common runtime errors and security vulnerabilities in Node.js applications caused by unvalidated path inputs and missing symlink resolution when using path.join or similar path-utility functions, which can lead to unexpected file access, path traversal issues, or broken file operations.

Core Features & Use Cases

  • Path Validation Enforcement: Requires adding path-type assertions or realpath/resolve calls before all path-joining operations to ensure paths are valid, absolute, and free of symlink-related surprises.
  • Safe Test Fixture Practices: Mandates the use of absolute paths when creating test fixtures to catch path-related issues early in the development cycle.
  • Use Case: For example, when building a Node.js CLI tool that processes user-provided file paths, this Skill ensures all path joins are secure and resolve correctly even when dealing with relative paths or symlinked directories.

Quick Start

Use this skill to review your Node.js utility functions that use path.join and add the required path validation or resolution calls to eliminate path-related runtime and security errors.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-path-type-assertions-or-realpath-resolve-calls-in-path-joini
Download link: https://github.com/ZaxbyHub/opencode-swarm/archive/main.zip#add-path-type-assertions-or-realpath-resolve-calls-in-path-joini

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.