Delegate independent tasks to specialized agents working concurrently with isolated context.
絶対パスチェッカー
absolute-path-checker
実装のテスト、リファクタリング、ポータビリティ、ディレクトリ階層について議論する際に、絶対パスが実装コードに存在しないことを確認する
SKILL.md
Full skill instructions
絶対パスチェッカー
目的
実装コード内に絶対パス(特にHOMEディレクトリを含むパス)が存在しないことを担保し、ポータビリティを確保する。
トリガー条件
以下のトピックについて議論・作業する際に自動的に実行:
- テストの実装・修正
- リファクタリング
- ポータビリティの改善
- ディレクトリ構造・階層の変更
実施手順
1. 絶対パスの検索
実装ファイル(.ts, .js)内で以下のパターンを検索:
# 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. 相対パスへの変換
優先順位
-
既存の変数を使用: プロジェクトで定義済みの変数があれば使う
- 例:
baseDir,projectRoot,Deno.cwd()など
- 例:
-
import.meta を使用 (Deno/ESM の場合):
const __dirname = new URL(".", import.meta.url).pathname; const configPath = join(__dirname, "../config.json"); -
相対パスリテラル:
// Before const path = "/Users/dev/project/data/file.txt"; // After const path = "./data/file.txt";
4. テストの実行
修正後は必ずテストを実行して動作確認:
deno task test
注意事項
$HOMEや~を含むパスも絶対パスと同様に扱う- 環境変数から取得したパス(
Deno.env.get("HOME")など)は許容 - パスの結合には
join()やresolve()を使用し、文字列連結は避ける
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
