Communitygithub.com

Varnan-Tech/opendirectory

コードベースをスキャンしてプロジェクトのCLAUDE.mdまたはAGENTSコンテキストファイルを生成・更新します。Claude Codeが必要とする非自明なビルドコマンド、規約、注意点のみを100行以内に収めたファイルを作成します。

opendirectory とは?

このスキルは、プロジェクトのコードベースを自動スキャンし、AIエージェント(Claude Codeなど)が効率的に作業するために必要な最小限のコンテキスト情報を含むCLAUDE.mdファイルを生成または更新します。主な機能として、新規作成(create)、既存ファイルの改善(update)、品質監査(audit)の3つのモードを備えています。Gemini APIを利用して100行未満の簡潔なドラフトを生成し、コード例の代わりにファイル参照を使用することでトークンを節約します。Node.js、Python、Go、Rustなど多様なプロジェクトに対応し、ビルドコマンド、コードスタイル、テスト設定、注意点(gotchas)を自動抽出。最終的なファイル書き込み前にユーザーの承認を求める安全な設計で、複数CLAUDE.mdファイルの一括管理も可能です。

対応✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/Varnan-Tech/opendirectory/tree/main/skills/claude-md-generator

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

CLAUDE.md ジェネレーター

コードベースを読み込み、Claudeが必要とする情報だけを過不足なく記述したCLAUDE.mdを生成します。


重要なルール: 優れたCLAUDE.mdは100行未満です。Claudeがコードを読むだけで導出できない情報のみを含めてください。ファイルを自動生成せず、常にドラフトを表示し、ユーザーの承認を待ってから書き込んでください。

コードスニペットのルール: CLAUDE.mdにはインラインのコード例を含めないでください。代わりに file.ts:42 のようなファイル参照を使用してください。CLAUDE.mdにコードを書くとトークンを浪費し、すぐに古くなります。


ステップ1: モードの判定

以下の3つのモードのいずれかを実行します:

create: CLAUDE.mdが存在しない場合。ゼロから作成します。 update: CLAUDE.mdが存在する場合。カスタムコンテンツを破棄せずに改善します。 audit: プロジェクト内のすべてのCLAUDE.mdファイルをA〜Fで評価し、品質レポートを出力します。ユーザーが「audit」「check」「review」「grade」と言った場合は監査モードを実行します。

# すべてのCLAUDE.mdの場所を検出
find . -name "CLAUDE.md" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
ls ~/.claude/CLAUDE.md 2>/dev/null && echo "グローバルCLAUDE.mdが見つかりました"
ls .claude.local.md 2>/dev/null && echo ".claude.local.mdが見つかりました"

複数のCLAUDE.mdが見つかった場合:それらをリストアップし、「CLAUDE.mdが [場所] に見つかりました。すべて更新しますか、それとも [ルート] のみ更新しますか?」と尋ねます。


ステップ2: 監査モード(create/updateの場合はステップ3にスキップ)

見つかった各CLAUDE.mdを、以下のルーブリックを使用してA〜Fで評価します:

基準確認事項
コマンドビルド/テスト/リントコマンドが存在し、実行可能か?
アーキテクチャ非自明な構造が説明されているか?
非自明なパターン落とし穴、生成ファイル、環境変数の順序が文書化されているか?
簡潔さ100行未満か?明白な冗長部分がないか?
最新性コマンドが現在のpackage.json/Makefileと一致しているか?
実践性新しいコントリビューターが質問せずに従える内容か?

スコア: 90〜100 = A, 70〜89 = B, 50〜69 = C, 30〜49 = D, 0〜29 = F

テーブル形式で表示します:

## CLAUDE.md 監査レポート

| ファイル | スコア | 評価 | 主な問題 |
|---------|--------|------|----------|
| ./CLAUDE.md | 72 | B | 落とし穴セクションが欠落、テストコマンドが古い |
| ./packages/api/CLAUDE.md | 45 | D | コマンドなし、340行(長すぎ)、アーキテクチャメモが古い |

**全体: B (72/100)**

見つかった問題:
- ./packages/api/CLAUDE.md: 340行:100行目標を大幅に超過
- ./packages/api/CLAUDE.md: テストコマンドが `jest` を参照しているが、package.jsonは `vitest` を使用
- ./CLAUDE.md: 「落とし穴」セクションがない:最も価値のあるセクションが欠落

レポート後、「どれを修正しますか?(すべて / ルートのみ / 指定)」と尋ねます。

ユーザーが「はい」と答えた場合、修正する各ファイルについてステップ3に進みます。


ステップ3: プロジェクト構造のスキャン

# プロジェクトタイプとパッケージマネージャー
ls package.json yarn.lock pnpm-lock.yaml bun.lockb requirements.txt pyproject.toml Cargo.toml go.mod 2>/dev/null

# トップレベルのディレクトリ構造
find . -maxdepth 2 -type d \
  | grep -v node_modules | grep -v .git | grep -v __pycache__ \
  | grep -v ".next" | grep -v dist | grep -v build | sort

ステップ4: ビルドコマンドとテストコマンドの抽出

# npm/yarn/pnpm/bun スクリプト
cat package.json 2>/dev/null \
  | python3 -c "
import sys, json
d = json.load(sys.stdin)
for name, cmd in d.get('scripts', {}).items():
    print(f'{name}: {cmd}')
"

# Python、Go、Rust の Makefile
cat Makefile 2>/dev/null | grep -E "^[a-z].*:" | head -20

# Go
cat go.mod 2>/dev/null | head -5

# Rust
cat Cargo.toml 2>/dev/null | grep -E "^\[" | head -10

ビルド、テスト(全)、テスト(単一ファイル/名前)、開発サーバー、リント/型チェックの正確なコマンドを特定します。それらの実行に必要な環境変数をメモします。


ステップ5: コードスタイルと落とし穴の発見

# インポートエイリアス(最も見落とされがち)
python3 -c "
import json, sys
try:
    d = json.load(open('tsconfig.json'))
    paths = d.get('compilerOptions', {}).get('paths', {})
    if paths: print('Import aliases:', json.dumps(paths, indent=2))
except: pass
" 2>/dev/null

# 必要な環境変数
cat .env.example 2>/dev/null | grep -v "^#" | grep -v "^$" | head -20

# 自動生成ファイル(編集禁止)
find . -path "*/node_modules" -prune -o -name "*.ts" -print \
  | xargs grep -l "DO NOT EDIT\|@generated\|Generated by" 2>/dev/null | head -5

# テストセットアップ要件
cat jest.config.js jest.config.ts vitest.config.ts 2>/dev/null | head -30

# データベース/マイグレーションセットアップ
ls migrations/ prisma/ drizzle/ db/ 2>/dev/null

「落とし穴」と見なすもの(これらを含め、それ以外はスキップ):

  • 自動生成ファイル(編集禁止)
  • テスト実行前に必要な環境変数
  • デフォルト以外のインポートエイリアス設定
  • 実行中のサービスを必要とするテストコマンド
  • 既知の意図的な変則(ワークアラウンド、バグではない)

ステップ6: Gemini で CLAUDE.md ドラフトを生成

すべての調査結果をまとめてドラフトを生成します:

cat > /tmp/claude-md-request.json << 'ENDJSON'
{
  "system_instruction": {
    "parts": [{
      "text": "ソフトウェアプロジェクトのCLAUDE.mdファイルを作成してください。ルール:(1) 合計100行未満。(2) Claudeがコードを読むだけでは導出できない情報のみを含める。(3) インラインコード例は使わず、代わりにfile.ts:42のようなファイル参照を使用する。(4) セクション: コマンド, コードスタイル(デフォルト以外のみ), テスト(セットアップが必要な場合のみ), 落とし穴(必須:人を躓かせるもの)。非自明なことを何も言うことがないセクションは省略する。(5) すべてのコマンドはコードブロック内に記述。(6) 推奨順序: 簡潔なプロジェクト概要(1〜2文、非自明な場合のみ), コマンド, アーキテクチャ(非自明な構造のみ), コードスタイル, テスト, 落とし穴。(7) ダッシュ(—)は使用しない。(8) CLAUDE.mdの内容のみを出力し、コメントは付けない。"
    }]
  },
  "contents": [{
    "parts": [{
      "text": "PROJECT_ANALYSIS_HERE"
    }]
  }],
  "generationConfig": {
    "temperature": 0.3,
    "maxOutputTokens": 2048
  }
}
ENDJSON

curl -s -X POST \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d @/tmp/claude-md-request.json \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['candidates'][0]['content']['parts'][0]['text'])"

PROJECT_ANALYSIS_HERE をステップ3〜5の調査結果に置き換えます。

大規模プロジェクト(ファイル数50以上)の場合: インラインの詳細の代わりに、CLAUDE.mdの末尾に @path ポインタを追加します:

## 拡張リファレンス
完全なモジュールマップについては @docs/ai-context/architecture.md を参照。
統合テストセットアップの詳細については @docs/ai-context/testing.md を参照。

参照ファイルは docs/ai-context/ に、100行に収まらなかった詳細とともに書き込みます。


ステップ7: 自己QA

ドラフトを提示する前に、以下を確認します:

  • 100行未満(カウント: echo "$CONTENT" | wc -l)
  • インラインコード例がない(file.ts:42 参照またはシェルコマンドのみ)
  • すべてのコマンドがコードブロック内にあり、そのまま実行可能
  • 「落とし穴」セクションがあり、少なくとも1つの実際の項目が含まれている
  • ファイルから自明なことしか書かれていないセクションがない
  • ダッシュ(—)が使われていない
  • マーケティング用語や冗長なフレーズがない(「このプロジェクトはReactを…」など)
  • インポートエイリアスがあれば文書化されている
  • 自動生成ファイルがあれば「編集禁止」とマークされている

いずれかのチェックに失敗した場合、提示前に修正します。


ステップ8: ドラフトの提示と承認待ち

ユーザーの承認なしにファイルを書き込まないでください。

ドラフトをコードブロックで提示します:

## CLAUDE.md ドラフト([N] 行)

[ドラフト全文]

---
この内容をCLAUDE.mdに書き込みますか?(yes / edit first / cancel)

ユーザーが yes と答えた場合:ファイルを書き込み、「CLAUDE.mdを書き込みました([N] 行)。セクション:[## ヘッダーのリスト]。」と確認します。

ユーザーが edit first と答えた場合:編集を適用し、ドラフトを再表示します。

ユーザーが cancel と答えた場合:停止します。


含めないもの

  • 言語/フレームワークのバージョン(「これはTypeScriptプロジェクトです」)
  • フレームワークの動作方法(ClaudeはReact、FastAPIなどをすでに知っています)
  • すべての依存関係のリスト
  • リンターですでに強制されているスタイルルール(インデントサイズ、引用符スタイル)
  • README.mdと重複する内容
  • インラインコード例や複数行スニペット
  • 同じスタックを使用するすべてのプロジェクトで同一になる内容

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Varnan-Tech/opendirectory

Use when the user asks to generate a blog cover image, thumbnail, or article header. Automatically uses modern typography, brand logos, and Google Search grounding to create beautiful 16:9 images with Gemini 3.1 Flash Image Preview.

Varnan-Tech/opendirectory

World-class brand strategist and naming expert. Uses an interrogation-led discovery phase to extract your brand's DNA, then applies scientific naming frameworks (Phonosemantics) and automated multi-TLD domain checking.

Varnan-Tech/opendirectory

Use when the user wants to verify cold emails, enrich a lead list, or autonomously guess email addresses from a CSV using ValidEmail.co or the open-source Reacher engine.

Varnan-Tech/opendirectory

Competitive intelligence orchestrator tracking companies across 8+ platforms (GitHub, Twitter, Reddit, HN, PH, YC Jobs) with heat scores and AI briefings.

Varnan-Tech/opendirectory

Give it your product URL or description. It finds your top 5 competitors, runs three-track PR research across all of them (editorial, podcasts, communities), identifies which channels appear most frequently, looks up the journalist or host for each, and returns a tiered outreach list with story angles and ready-to-send cold pitch drafts tailored to your product. Use when asked to find PR opportunities, discover where competitors got featured, build a media outreach list, find which journalists cover my space, or get pitch templates for press coverage.

Varnan-Tech/opendirectory

Generate high-converting, deep-dive growth case studies in MDX format. Use this skill when asked to write a case study or blog post about a company's growth, tech stack, or product-led strategy. It handles the full pipeline (researching the company via Tavily, generating a 16:9 cover image, quality checking the draft, uploading assets to cloud storage, and pushing directly to the target repository).

Varnan-Tech/opendirectory

Scans your project for outdated npm, pip, Cargo, Go, or Ruby packages. Runs a CVE security audit. Fetches changelogs, summarizes breaking changes with Gemini, and opens one PR per risk group (patch, minor, major). Includes Diagnosis Mode for install conflicts. Use when asked to update dependencies, check for outdated packages, open dependency PRs, scan for package updates, audit for CVEs, or flag breaking changes in upgrades. Trigger when a user says "check for outdated packages", "update my dependencies", "open PRs for dependency updates", "scan for CVEs", or "which packages need upgrading".

Varnan-Tech/opendirectory

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

Varnan-Tech/opendirectory

Evaluates expired domain candidates against a target niche, scores them by topical relevance, historical activity level, and history cleanliness, then outputs a ranked shortlist with explainable reasoning and risk flags.

Varnan-Tech/opendirectory

Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked by impact × effort, and sketches an ideal README. Trigger when user says "roast my repo", "audit my README", "dx audit", "developer experience review", "score my GitHub project", "before launch checklist", or "make my repo shareable".

Varnan-Tech/opendirectory

Drafts and designs a complete HTML email newsletter from a topic or content brief. Outputs paste-ready HTML for Loops, Mailchimp, Beehiiv, Resend, or any standard email platform. Includes subject line options and plain-text fallback. Trigger when a user says "write a newsletter", "draft an email newsletter", "create an HTML email", "design an email for my subscribers", or "write a newsletter about [topic]".

Varnan-Tech/opendirectory

Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.

Varnan-Tech/opendirectory

Audit how often LLMs recommend your brand vs competitors and generate a GEO action plan.

Varnan-Tech/opendirectory

Takes a competitor's public GitHub repo URL, fetches their open issues via the GitHub REST API, filters noise locally, clusters issues into 6 demand categories, computes a demand score per issue and per cluster, and outputs a ranked demand gap report with a GTM messaging brief. Use when asked to scan a competitor's GitHub issues, find what their users are begging for, turn GitHub complaints into product positioning, identify competitor feature gaps, or generate messaging from real user demand. Trigger when a user says "scan competitor issues", "what are users asking for on X repo", "find demand gaps in Y", "turn GitHub issues into messaging", or "what should I build based on competitor complaints".

Varnan-Tech/opendirectory

Find recurring confusion in your repo's GitHub Discussions, rank it by urgency, and draft the actual docs fixes and content angles — with verbatim community quotes and source links as evidence.

Varnan-Tech/opendirectory

SEO keyword research workflow for blog generation using Google Trends data. Use when writing blog posts, planning content calendars, or optimizing articles for search engines. Finds breakout keywords, builds content structure, and generates SEO-optimized blog outlines targeting tech and developer audiences.

Varnan-Tech/opendirectory

Generates a professionally designed case study PDF for B2B SaaS sales and marketing. Supports 7 page layouts, 9 style presets, 1-4 page output. Trigger when user says "create a case study", "write a customer story", "make a case study PDF", "design a success story", "turn this customer win into a PDF".

Varnan-Tech/opendirectory

Generates data visualization charts (bar, line, area, pie, doughnut, scatter, radar, treemap) as PNG using Apache ECharts v6. 1080×1080px default, 5 style presets, highlight annotations. Trigger when user says "create a chart", "visualize data", "make a bar chart", "line graph", "pie chart", "data visualization", "chart this data", "plot", "graph", or "visualize these numbers".

Varnan-Tech/opendirectory

Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF. 3–10 pages, 9 style presets, 11 page layout types. Trigger when user says "create an ebook", "design a lead magnet", "make a PDF guide", "build a gated content piece", "write a B2B ebook", "design a white paper", "create a nurture asset", or "make a PDF report".

Varnan-Tech/opendirectory

Fetches low-star App Store and Google Play reviews, clusters them into broken-promise patterns, and generates a ranked copy brief with positioning opportunities.

関連スキル