Communitygithub.com

SamuelChien/mega-skills-collection

自主 DevSecOps 和 FinOps 防護欄。協調 Gemini 3 Flash 來稽核 Linux 核心修補程式、Terraform 成本漂移以及 K8s 合規性。

mega-skills-collection 是什麼?

AegisOps-AI 是一個專業級的「自主治理協調器」,將先進的 AI 推理直接整合到軟體開發生命週期中,作為系統安全、雲端基礎設施成本和 Kubernetes 合規性的智慧型閘道器。它主要執行三大核心模組:一是「核心修補程式審查器」使用 Gemini AI 對 Linux 核心的 Git diff 進行深度語意分析,在幾秒內偵測出釋放後使用 (UAF) 和過時狀態等嚴重的記憶體損毀漏洞;二是「FinOps 與雲端稽核員」分析 Terraform plan 輸出,識別因意外升級資源導致鉅額帳單暴增的「沉默災難」型態成本異常;三是「K8s 政策強化器」將自然語言的安全意圖轉譯為符合「最小權限」原則的 YAML 清單。此技能支援 GitHub Actions 等 CI/CD 管線整合,可阻擋不合規的合併請求,並強調 AI 發現僅作為高可信度訊號,最終仍須人類在關鍵決策中做決策。

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

在你喜歡的 AI 中提問

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

說明文件

/aegisops-ai — 自主治理協調器

AegisOps-AI 是一個專業級的「活管線」 將先進的 AI 推理直接整合到軟體開發生命週期中。 它作為系統安全、雲端基礎設施成本 和 Kubernetes 合規性的智慧型閘道器。

目標

透過以下方式自動化高風險的安全與財務稽核:

  1. 識別 Linux 核心修補程式中基於邏輯的漏洞(UAF、過時狀態)。
  2. 偵測 Terraform 計畫中大規模的「沉默災難」型成本漂移。
  3. 將自然語言的安全意圖轉譯為強化的 K8s 清單。

使用時機

  • 核心修補程式審查: 稽核原始 C 語言 Git diff 的記憶體安全性。
  • 套用前的 IaC 稽核: 分析 terraform plan 輸出以避免帳單暴增。
  • 叢集強化: 為部署產生「最小權限」的 securityContext。
  • CI/CD 品質閘道: 透過 GitHub Actions 阻擋不合規的合併請求。

不應使用之情況

  • Web 應用程式邏輯: 請勿用於標準 Web 漏洞(XSS、SQLi);請使用專用的 SAST 掃描器。
  • 非 C 語言的記憶體分析: 修補程式分析器專為 C 邏輯最佳化;避免用於 Python 或 JS 等高階語言。
  • 直接資源變更: 這是一個稽核員,而非部署工具。它不會執行 terraform apply 或 kubectl apply。
  • 事後分析: 若需分析為何先前的 AI 工作階段失敗,請使用 /analyze-project。

🤖 生成式 AI 整合

AegisOps-AI 利用 Google GenAI SDK 實作「推理路徑」以進行自主安全與財務稽核:

  • 神經網路修補程式分析: 對 Linux 核心修補程式進行語意化程式碼審查,超越簡單的模式比對,深入理解複雜的記憶體狀態邏輯。
  • 智慧型成本綜合: 透過財務推理模型處理原始 Terraform plan diff,以偵測高風險的資源升級與「沉默」的財務漂移。
  • 自然語言政策映射: 將人類的安全意圖轉譯為語法正確且強化的 Kubernetes securityContext 設定。

🧭 核心模組

1. 🐧 核心修補程式審查器 (patch_analyzer.py)

  • 問題: 手動審查 Linux 核心記憶體安全性耗時且容易出現人為錯誤。
  • 解決方案: Gemini 3 對原始 Git diff 執行「深度推理」稽核,在數秒內偵測關鍵的記憶體損毀漏洞(UAF、過時狀態)。
  • 關鍵輸出: analysis_results.json

2. 💰 FinOps 與雲端稽核員 (cost_auditor.py)

  • 問題: 基礎設施即程式碼 (IaC) 的變更可能導致意外的「沉默災難」和巨額雲端帳單暴增。
  • 解決方案: 分析 terraform plan 輸出以識別成本異常,例如從 t3.micro 意外升級到高效能 GPU 實例。
  • 關鍵輸出: infrastructure_audit_report.json

3. ☸️ K8s 政策強化器 (k8s_policy_generator.py)

  • 問題: 在 Kubernetes 中實作「最小權限」安全上下文既複雜且常被忽略。
  • 解決方案: 將自然語言的安全需求轉譯為可供正式環境使用的強化 YAML 清單(唯讀 root 檔案系統、非 root 強制執行等)。
  • 關鍵輸出: hardened_deployment.yaml

🛠️ 設定與環境

1. 複製儲存庫

git clone https://github.com/Champbreed/AegisOps-AI.git
cd AegisOps-AI

2. 設定

python3 -m venv venv
source venv/bin/activate
pip install google-genai python-dotenv

3. API 設定

在根目錄建立一個 .env 檔案,以安全地 儲存您的憑證:

echo "GEMINI_API_KEY='your_api_key_here'" > .env

🏁 操作儀表板

若要依序執行完整的代理程式套件並產生所有安全報告:

python3 main.py

模式:權限過高的容器

  • 指標: allowPrivilegeEscalation: true 或使用 root 使用者執行。
  • 調查: 將安全意圖(例如「僅限非 root」)傳遞給 K8s 強化器模組。

💡 最佳實務

  • 情境為王: 提供至少 5 行與 Git diff 關聯的上下文,以獲得更準確的神經網路推理。
  • 持續閘道控管: 在每次基礎設施變更「前」執行 FinOps 稽核員,而非變更後。
  • 手動簽核: 將 AI 發現視為高可信度訊號,但核心層級的合併仍需保留人機協作。

🔒 安全與防護注意事項

  • 金鑰管理: 在正式環境中使用 CI/CD 密碼來存放 GEMINI_API_KEY。
  • 最小權限: 先在測試環境中測試「強化的」清單,以確保沒有功能回歸。

連結

限制

  • 僅在任務明確符合上述範圍時使用此技能。
  • 請勿將輸出視為環境特定驗證、測試或專家審查的替代方案。
  • 若缺少必要的輸入、權限、安全邊界或成功標準,請停止並要求釐清。

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".

相關技能