absolute-path-checker

実装のテスト、リファクタリング、ポータビリティ、ディレクトリ階層について議論する際に、絶対パスが実装コードに存在しないことを確認する

181 stars

Best use case

absolute-path-checker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

実装のテスト、リファクタリング、ポータビリティ、ディレクトリ階層について議論する際に、絶対パスが実装コードに存在しないことを確認する

Teams using absolute-path-checker should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/absolute-path-checker/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/absolute-path-checker/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/absolute-path-checker/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How absolute-path-checker Compares

Feature / Agentabsolute-path-checkerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

実装のテスト、リファクタリング、ポータビリティ、ディレクトリ階層について議論する際に、絶対パスが実装コードに存在しないことを確認する

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 絶対パスチェッカー

## 目的

実装コード内に絶対パス(特にHOMEディレクトリを含むパス)が存在しないことを担保し、ポータビリティを確保する。

## トリガー条件

以下のトピックについて議論・作業する際に自動的に実行:

- テストの実装・修正
- リファクタリング
- ポータビリティの改善
- ディレクトリ構造・階層の変更

## 実施手順

### 1. 絶対パスの検索

実装ファイル(.ts, .js)内で以下のパターンを検索:

```bash
# HOME ディレクトリベースの絶対パス
grep -r "/Users/" --include="*.ts" --include="*.js" .
grep -r "/home/" --include="*.ts" --include="*.js" .

# ルートからの絶対パス(設定ファイル以外)
grep -r '"/[a-z]' --include="*.ts" --include="*.js" .
```

### 2. 検出結果の判断

検出されたパスが以下のどれに該当するか判断:

| 種類 | 対応 |
|------|------|
| **実装コード内のリテラル** | 相対化が必要 |
| **テスト結果・ログ出力** | 許容(ただし、テストの期待値には含めない) |
| **設定ファイルのデフォルト値** | 環境変数や相対パスに置換 |
| **ドキュメント・コメント内の例** | 許容 |

### 3. 相対パスへの変換

#### 優先順位

1. **既存の変数を使用**: プロジェクトで定義済みの変数があれば使う
   - 例: `baseDir`, `projectRoot`, `Deno.cwd()` など

2. **import.meta を使用** (Deno/ESM の場合):
   ```typescript
   const __dirname = new URL(".", import.meta.url).pathname;
   const configPath = join(__dirname, "../config.json");
   ```

3. **相対パスリテラル**:
   ```typescript
   // Before
   const path = "/Users/dev/project/data/file.txt";

   // After
   const path = "./data/file.txt";
   ```

### 4. テストの実行

修正後は必ずテストを実行して動作確認:

```bash
deno task test
```

## 注意事項

- `$HOME` や `~` を含むパスも絶対パスと同様に扱う
- 環境変数から取得したパス(`Deno.env.get("HOME")` など)は許容
- パスの結合には `join()` や `resolve()` を使用し、文字列連結は避ける

Related Skills

accessibility-design-checker

181
from majiayu000/claude-skill-registry

Ensures designs meet accessibility requirements including WCAG compliance, color contrast, keyboard navigation, screen reader support, and focus management. Reviews designs for accessibility issues and provides recommendations.

accessibility-checker

181
from majiayu000/claude-skill-registry

Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.

a11y-checker

181
from majiayu000/claude-skill-registry

Accessibility audit for CSS covering focus styles, color contrast, text sizing, screen reader support, and WCAG compliance. Provides actionable fixes. Use when auditing accessibility or fixing a11y issues.

a11y-checker-ci

181
from majiayu000/claude-skill-registry

Adds comprehensive accessibility testing to CI/CD pipelines using axe-core Playwright integration or pa11y-ci. Automatically generates markdown reports for pull requests showing WCAG violations with severity levels, affected elements, and remediation guidance. This skill should be used when implementing accessibility CI checks, adding a11y tests to pipelines, generating accessibility reports, enforcing WCAG compliance, automating accessibility scans, or setting up PR accessibility gates. Trigger terms include a11y ci, accessibility pipeline, wcag ci, axe-core ci, pa11y ci, accessibility reports, a11y automation, accessibility gate, compliance check.

PheroPath

181
from majiayu000/claude-skill-registry

A filesystem-based stigmergy communication protocol. Use this to leave invisible "pheromones" (signals) on files to communicate context, risks, or status to other agents or your future self without modifying file content.

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude

astro

159
from majiayu000/claude-skill-registry

This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.

Coding & Development

grail-miner

159
from majiayu000/claude-skill-registry

This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.

DevOps & Infrastructure

ontopo

159
from majiayu000/claude-skill-registry

An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.

General Utilities

modal-deployment

159
from majiayu000/claude-skill-registry

Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.

DevOps & Infrastructure

lets-go-rss

159
from majiayu000/claude-skill-registry

A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.

Content & Documentation