Communitygithub.com

SamuelChien/mega-skills-collection

執行主動式自動載入:自動偵測並載入 agents.md 檔案。在偵測到相關上下文時使用。根據技能用途觸發相關提示詞。

mega-skills-collection 是什麼?

此技能專為 AI 編碼代理程式設計,可自動發現並載入專案目錄階層中的 `AGENTS.md` 檔案,以提供完整的操作上下文。它會掃描目前工作區及其父目錄,找到所有相關的代理程式指令檔案,並將它們的內容合併為統一的指令集。這對多模組或 monorepo 專案特別有用,因為不同目錄的指令可以互相補充或覆蓋。支援 Claude Code 等代理程式平台,並可處理衝突指令、編碼錯誤和權限問題。輸出包含發現的檔案列表、合併後的指令、衝突報告及快取狀態。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

代理程式上下文載入器

概覽

自動發現並載入專案目錄階層中的 AGENTS.md 檔案,供 AI 編碼代理程式使用。此技能會掃描目前工作區及其父目錄,以定位代理程式指令檔案,然後將其內容載入,使活躍的代理程式工作階段擁有完整的操作上下文。

先決條件

  • 包含一個或多個 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:每個套件皆有代理程式指令的 Monorepo

  • 結構:根目錄 AGENTS.md 設定全域慣例;packages/api/AGENTS.md 新增 API 特定的工具規則。
  • 結果:兩個檔案按順序載入。API 特定規則補充全域上下文,沒有衝突。

範例 2:提交政策衝突的巢狀工作區

  • 結構:根目錄 AGENTS.md 規定「一律簽署提交」;services/legacy/AGENTS.md 規定「跳過提交簽署」。
  • 結果:偵測到衝突並回報。較深層(legacy)的指示被套用,同時附上一個說明此覆蓋的警告。

範例 3:沒有代理程式檔案的全新設定

  • 結構:一個全新複製的儲存庫,沒有任何 AGENTS.md 檔案。
  • 結果:掃描完成,找到零個檔案。輸出包含一個建議,提示在儲存庫根目錄建立內含最小範本的 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".

相關技能