Communitygithub.com

SamuelChien/mega-skills-collection

プロジェクト階層内の AGENTS.md ファイルを自動的に検出して読み込み、AI コーディングエージェントに実行コンテキストを提供します。

mega-skills-collection とは?

このスキルは、AI コーディングエージェント(Claude Code など)向けに、ワークスペース内の AGENTS.md ファイルを自動発見・統合する機能を提供します。現在のディレクトリとその親ディレクトリをスキャンし、ファイルの読み込み順序を決定して指示をマージし、統一されたコンテキストを生成します。これにより、エージェントはプロジェクト全体の設定やサブプロジェクト固有のルールを意識し、正確なタスク実行が可能になります。対応プラットフォームは Claude Code を想定しており、AGENTS.md 仕様に基づいて動作します。エラーハンドリングとして、ファイル未検出時の推奨テンプレート表示、パーミッションエラー時のスキャン範囲制限、循環シンボリックリンクのスキップ、指示の競合検出とデフォルト適用などが含まれています。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/agent-context-loader

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

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

ドキュメント

エージェントコンテキストローダー

概要

プロジェクト階層全体で AGENTS.md ファイルを自動的に検出して読み込む、AI コーディングエージェント向け機能。このスキルは現在のワークスペースとその親ディレクトリをスキャンしてエージェント指示ファイルを特定し、その内容を抽出してアクティブなエージェントセッションに完全な運用コンテキストを提供します。

前提条件

  • 任意のディレクトリ深度に1つ以上の AGENTS.md ファイルが含まれるプロジェクトワークスペース
  • ディレクトリツリーを走査するための読み取りおよび Glob パーミッション
  • 複数の候補ファイルが存在する場合にファイル内容を検索するための Grep アクセス

手順

  1. 現在の作業ディレクトリとすべての親ディレクトリ(ファイルシステムルートまたはリポジトリルートまで)をスキャンして、AGENTS.md または agents.md という名前のファイルを探します。
  2. 現在のワークスペースのサブディレクトリを検索し、サブプロジェクトやモジュールに適用される追加の AGENTS.md ファイルを探します。
  3. 読み込み順序を決定します。リポジトリルートに近いファイルが最初に読み込まれ(グローバルコンテキスト)、より深いディレクトリのファイルは後で読み込まれます(オーバーライドまたは補足)。
  4. 検出された各 AGENTS.md ファイルを読み込み、その指示ブロック、ワークフロー定義、制約宣言を抽出します。
  5. 指示を統合コンテキストにマージし、レベル間の競合(例:サブディレクトリのエージェントがルートレベルのルールをオーバーライドする)を記録します。
  6. 読み込まれたコンテキストを構造化されたサマリーとして表示します:ソースファイルパス、指示数、検出された競合。
  7. 検出結果を現在のセッションにキャッシュし、後続のアクティベーションでファイルシステムの冗長なスキャンを回避します。

出力

  • 検出された AGENTS.md ファイルパスの順序付きリスト(ディレクトリ深度付き)
  • 検出されたすべてのエージェントコンテキストを結合したマージ指示セット
  • レベル間の矛盾する指示を強調表示する競合レポート
  • 結果が新しいものか再利用されたものかを示すセッションキャッシュステータス

エラーハンドリング

エラー原因解決策
AGENTS.md が見つからないワークスペースにエージェント指示ファイルがない正しい作業ディレクトリを確認する;必要であればプロジェクトルートに AGENTS.md を作成する
ディレクトリ走査のパーミッション拒否ワークスペース上の制限された親ディレクトリスキャン深度をリポジトリルート(.git/ の存在で検出)に制限する
循環シンボリックリンク検出シンボリックリンクされたディレクトリが無限の走査ループを作成するスキャン中にシンボリックリンクされたディレクトリをスキップする;シンボリックリンクパスを含む警告をログに記録する
レベル間の指示の競合サブディレクトリの AGENTS.md がルートレベルのファイルと矛盾する出力で競合をフラグする;デフォルトでより具体的な(深い)指示を適用する
ファイルエンコーディングエラーAGENTS.md が UTF-8 以外のエンコーディングを使用しているLatin-1 フォールバックを試行する;ファイルパスとエンコーディングの問題を報告する

例

例1: パッケージごとのエージェント指示を持つモノレポ

  • 構造:ルート AGENTS.md がグローバル規約を設定;packages/api/AGENTS.md が API 固有のツールルールを追加。
  • 結果:両方のファイルが順序通りに読み込まれる。API 固有のルールは競合なくグローバルコンテキストを補足する。

例2: 競合するコミットポリシーを持つネストされたワークスペース

  • 構造:ルート AGENTS.md は「常にコミットに署名する」と指示;services/legacy/AGENTS.md は「コミット署名をスキップ」と指示。
  • 結果:競合が検出され報告される。デフォルトでより深い(レガシー)指示が適用され、オーバーライドに関する警告が表示される。

例3: エージェントファイルのない初回セットアップ

  • 構造:AGENTS.md がどこにもない新しくクローンされたリポジトリ。
  • 結果:スキャンが完了し、0 ファイルが見つかる。出力には、リポジトリルートに最小限のテンプレートで AGENTS.md を作成する提案が含まれる。

リソース

Individual skills in this repo

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

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

2D game development principles. Sprites, tilemaps, physics, camera.

SamuelChien/mega-skills-collection

3D game development principles. Rendering, shaders, physics, cameras.

SamuelChien/mega-skills-collection

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

SamuelChien/mega-skills-collection

Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

関連スキル