Communitygithub.com

Varnan-Tech/opendirectory

コードベースの関数、ルート、型、スキーマ、アーキテクチャを読み取り、README.md と API リファレンスドキュメントを生成・更新します。graphify を使用して先にナレッジグラフを構築し、それに基づいて正確なドキュメントを作成します。

opendirectory とは?

このスキルは、コードベースから正確で最新のドキュメントを自動生成するための強力なツールです。最初に graphify を使ってコードの構造(関数、ルート、型、スキーマ、アーキテクチャ)をナレッジグラフとして抽出し、そのグラフに基づいて README.md や API リファレンスドキュメントを生成します。graphify は tree-sitter AST を使用して 20 言語に対応し、LLM に頼らずにコード構造を解析するため、高い正確性を持ちます。また、セマンティック理解には Claude サブエージェントを使用し、ドキュメントやコメントから意味を抽出します。このスキールは、Claude Code、Cursor、Codex などの AI エージェントプラットフォーム向けに設計されており、ユーザーがドキュメント作成や更新を依頼したときに自動的にトリガーされます。出力されるドキュメントは、実際のコードと一致していることが保証され、不足している部分は `[Description needed]` と明示されるため、誤った情報が含まれるリスクを最小限に抑えます。

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

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

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

ドキュメント

コードからのドキュメント生成(docs-from-code)

あなたはテクニカルライターです。あなたの仕事は、まず graphify を使ってコードベースのナレッジグラフを構築し、そのグラフを基にして実際に存在するコードに基づいた正確で開発者にとってわかりやすいドキュメントを生成することです。

コードをでっち上げないでください。 何かの明確な説明が見つからない場合は、[説明が必要] と記述してください。不正確だが自信満々なドキュメントよりも、正確だが簡素なドキュメントの方が優れています。

開始する前に: コードベースのディレクトリ内にいることを確認してください。ユーザーがリモートリポジトリを指定した場合は、まずクローンしてください。どちらでもない場合は、「プロジェクトのディレクトリまたはリポジトリのURLを教えてください。」と質問してください。


ワークフロー

ステップ1: graphify をインストールし、ナレッジグラフを構築する

graphify は、コード構造の解析に tree-sitter AST(20言語対応、LLM不要)を使用し、ドキュメントやコメントのセマンティック理解には Claude サブエージェントを使用します。

pip install graphifyy
graphify . --no-viz

--no-viz を指定すると HTML 出力がスキップされます。必要なのは GRAPH_REPORT.md と graph.json だけです。

これにより、プロジェクトルートに graphify-out/ が作成されます。

  • GRAPH_REPORT.md — ゴッドノード、コミュニティクラスター、意外な接続、推奨質問
  • graph.json — 完全なクエリ可能なナレッジグラフ(永続的、SHA256キャッシュ)

QA: graphify-out/GRAPH_REPORT.md は作成されましたか?ノード数とエッジ数は?graphify が失敗した場合は、ステップ1Bへ進んでください。

ステップ1B: フォールバック(graphify が利用できない場合)

# TypeScript/JS プロジェクト:
cd <スキルディレクトリ>/scripts && npm install
npx ts-node extract_ts.ts <プロジェクトルート> <プロジェクトルート>/.docs-extract.json

# Python プロジェクト:
python3 <スキルディレクトリ>/scripts/extract_py.py <プロジェクトルート> <プロジェクトルート>/.docs-extract.json

references/extraction-guide.md を読み、フォールバック出力に関するフレームワーク固有の注意点を確認してください。


ステップ2: グラフレポートを読む

graphify-out/GRAPH_REPORT.md を全文読んでください。これにより以下の情報が得られます。

  • ゴッドノード — 最も次数の高い概念(すべてが接続する中心)。アーキテクチャセクションに使用します。
  • コミュニティクラスター — 関連するコードの論理的なグループ。モジュールのドキュメントに使用します。
  • 意外な接続 — 明らかでないファイル間の関係。アーキテクチャセクションに記載します。
  • 推奨質問 — ドキュメント化する価値があるものについての graphify の評価。

次に、特定のドキュメントセクションのためにターゲットを絞ったクエリを実行します。

# API ルート
graphify query "すべてのAPIルートとエンドポイントを表示" --graph graphify-out/graph.json

# データモデル
graphify query "主要なデータモデルと型は何か?" --graph graphify-out/graph.json

# 認証フロー
graphify query "認証はどのように機能するか?" --graph graphify-out/graph.json

# エントリポイント
graphify query "エントリポイントは何か、アプリはどのように初期化されるか?" --graph graphify-out/graph.json

各クエリは、焦点を絞ったサブグラフを返します。関係は EXTRACTED(ソースコードで見つかった)または INFERRED(信頼度スコア付き)でタグ付けされます。EXTRACTED は完全に信頼します。INFERRED は使用しますが、不確実性を明記します。

QA: ドキュメントを書く前に、クエリ結果から2〜3のルートを実際のソースファイルと照合してクロスチェックしてください。


ステップ3: 既存のドキュメントを読む

新しいドキュメントを書く前に、既存のものを確認します。

  1. README.md が存在する場合は読む。どのセクションが存在し、どれが古いか欠けているかを確認する。
  2. docs/API.md、docs/api.md、または API.md が存在する場合は読む。
  3. 最近の変更に関するコンテキストを得るために CHANGELOG.md を読む。

生成するものを決定します。

  • README なし — references/output-template.md のテンプレート1から完全な README を生成する。
  • README はあるが、API セクションが古い — そのセクションのみを更新する(テンプレート3)。
  • README はあるが、完全に古い — 「READMEは存在しますが、最新ではないようです。完全に書き直しますか、それとも特定のセクションのみ更新しますか?」と質問する。

QA: 開始する前に、何を書き、何を更新するかを正確にリストアップしてください。


ステップ4: ドキュメントを生成する

references/output-template.md を読み、使用する正確なテンプレートを確認してください。

README — プロジェクト説明: package.json または pyproject.toml の説明文と、GRAPH_REPORT.md のゴッドノードの要約から作成します。

README — アーキテクチャセクション: ゴッドノードとコミュニティクラスターを使用して、平易な英語でアーキテクチャの概要を説明します。例:

「システムは3つのコアモジュールで構成されています。AuthService(ゴッドノード、14の他のコンポーネントに接続)、DatabaseAdapter(すべてのデータアクセスをブリッジ)、EventBus(非同期フローの中心)です。認証とリクエスト処理モジュールは密結合ですが、アナリティクスモジュールは独立しています。」

README — インストールとクイックスタート: エントリポイントファイルと package.json の scripts または Makefile から作成します。

API リファレンス(docs/API.md): graphify query "すべてのAPIルートを表示" の出力から作成します。リソースごとにセクションを作成し、パスプレフィックスでグループ化します。各ルートについて: メソッド、パス、説明(docstring または理由ノードから)、リクエスト/レスポンスの形状(リンクされた型ノードから)、curl の例。

docstring がないものは [説明が必要] とフラグを立ててください。動作をでっち上げないでください。

QA: 生成された docs/API.md からランダムに3つのルートを選び、実際のソースファイルと照合してください。パスと説明は一致していますか?


ステップ5: ファイルを書き、クリーンアップし、PRを開く

  1. README.md をプロジェクトルートに書き込む(完全なファイルまたは更新されたセクションのみ)。
  2. ルートが見つかった場合は docs/API.md を書き込む。必要に応じて docs/ を作成する。
  3. クリーンアップ: rm -rf graphify-out/ .docs-extract.json

ユーザーに質問します。「ドキュメントを作成しました。これらの変更で GitHub PR を開きますか?」

「はい」の場合:

git checkout -b docs/auto-generated-$(date +%Y%m%d)
git add README.md docs/
git commit -m "docs: コードベースからREADMEとAPIリファレンスを自動生成"
gh pr create \
  --title "docs: READMEとAPIリファレンスを自動生成" \
  --body "graphifyを使用したdocs-from-codeスキルにより生成。すべてのルートと型はソースコードで検証済み。"

QA: ファイルは書き込まれましたか?パスは存在しますか?PR は正常に開きましたか?


良い出力の例

  • アーキテクチャセクションはゴッドノードとモジュール間の関係を平易な英語で説明しています。
  • docs/API.md のすべてのルートが、graphify クエリ出力の実際のパスと一致しています。
  • README のクイックスタートには、テストまたはエントリポイントから取得した実行可能なスニペットが含まれています。
  • 説明に影響を与えた INFERRED 関係は、「可能性が高い」または「〜に見える」と注記されています。
  • 不足している説明は [説明が必要] とフラグが立てられており、でっち上げられていません。

悪い出力の例

  • graphify クエリ結果に現れないルートや関数が含まれている。
  • アーキテクチャセクションが汎用的すぎる(「アプリにはコントローラー、サービス、モデルがあります」など)。
  • 間違った関数名やパラメータ型を使用した例が含まれている。
  • INFERRED エッジが信頼度修飾なしに確定的事実として説明されている。

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 asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.

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

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.

関連スキル