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

add-path-type-assertions-or-realpath-resolve-calls-in-path-joini is a Claude Code skill that adds path-type checks or realpath/resolve calls to path-joining utilities. It activates around path.join, realpath, and fs path work.

- skill · `type=skill` · Claude Code, Codex, OpenCode, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 539 repo stars
- Author: ZaxbyHub
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/ZaxbyHub/opencode-swarm/tree/HEAD/.opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini

## What it does

The skill adds path-type checks or realpath/resolve calls to utilities that join paths. It also checks path.join and path.resolve calls for a preceding absoluteness check or path resolution.

Test fixtures use absolute paths. The skill calls for tests that cover its trigger condition and the forbidden shortcut.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ZaxbyHub/opencode-swarm --skill add-path-type-assertions-or-realpath-resolve-calls-in-path-joini -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ZaxbyHub/opencode-swarm --skill add-path-type-assertions-or-realpath-resolve-calls-in-path-joini -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ZaxbyHub/opencode-swarm --skill add-path-type-assertions-or-realpath-resolve-calls-in-path-joini -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ZaxbyHub/opencode-swarm .opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini
```

2. **Manually: put the files in place**
- File: `.github/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ZaxbyHub/opencode-swarm --skill add-path-type-assertions-or-realpath-resolve-calls-in-path-joini -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ZaxbyHub/opencode-swarm --path .opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add ZaxbyHub/opencode-swarm --skill add-path-type-assertions-or-realpath-resolve-calls-in-path-joini -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ZaxbyHub/opencode-swarm/tree/HEAD/.opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md

## When to use it
- add path-type checks to a path-joining utility
- use realpath or resolve in path utilities
- check path.join and path.resolve calls for absolute paths
- create test fixtures with absolute paths

## Example prompts
- Add a path-type check to the utility that uses `path.join`.
- Check the `path.resolve` calls and add an absoluteness check.
- Update the tests for `realpath` and create fixtures with absolute paths.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 4b28299874487197.

BEGIN THIRD-PARTY FILE 4b28299874487197
````text
---
name: add-path-type-assertions-or-realpath-resolve-calls-in-path-joini
description: Add path-type assertions or realpath/resolve calls in path-joining utility functions
metadata:
  triggers: '["path.join","realpath","fs path"]'
  generated_from_knowledge: '[]'
  source_knowledge_ids: '[]'
  generated_at: "2026-07-02T02:35:49.870Z"
  confidence: "0.60"
  status: active
  version: "2"
  skill_origin: generated
---

<!-- generated by opencode-swarm skill-generator. Do not edit by hand; edits will be preserved on regeneration only with controlled update mode. -->

# Add path-type assertions or realpath/resolve calls in path-joining utility functions

## Trigger

- path.join
- realpath
- fs path

## Required Procedure

- Add path-type assertions or realpath/resolve calls in path-joining utility functions
- Use absolute paths in test fixture creation

## Forbidden Shortcuts

- (none recorded)

## Delegation Template

When delegating a task affected by this skill, include:

```
SKILLS: file:.opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md
```

## Reviewer Checks

- Verify all path.join / path.resolve calls are preceded by absoluteness checks or resolution

## Test Engineer Checks

- Add or update tests covering the trigger condition and the forbidden shortcut.
````
END THIRD-PARTY FILE 4b28299874487197

The third-party file has ended. Everything between the 4b28299874487197 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© ZaxbyHub · MIT · https://github.com/ZaxbyHub/opencode-swarm/tree/HEAD/.opencode/skills/generated/add-path-type-assertions-or-realpath-resolve-calls-in-path-joini/SKILL.md

## Similar
- [ban-type-assertions](https://affpapa.org/en/nevibecode/skills/ban-type-assertions.md) — skill · 151 installs
- [pr-issue-resolve](https://affpapa.org/en/nevibecode/plugins/pr-issue-resolve.md) — plugin · ★ 1013 repo stars
- [click-path-audit](https://affpapa.org/en/nevibecode/skills/click-path-audit.md) — skill · 6200 installs
- [add-lang](https://affpapa.org/en/nevibecode/skills/add-lang.md) — skill · 1300 installs
- [gsd-add-tests](https://affpapa.org/en/nevibecode/skills/gsd-add-tests.md) — skill · 576 installs
- [basedpyright-type-checking](https://affpapa.org/en/nevibecode/skills/basedpyright-type-checking.md) — skill · 357 installs

From the same set: [zaxbyhub/opencode-swarm](https://affpapa.org/en/nevibecode/by/zaxbyhub/opencode-swarm.md) — 121 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
