lyndondefunct151/superman-splunk
GitHub: lyndondefunct151/superman-splunk
为 AI 编程助手提供结构化的 Splunk 深度知识库,涵盖架构、SPL 开发、运维管理和 Enterprise Security 等核心领域,显著提升 Splunk 相关问题的回答质量与效率。
Stars: 0 | Forks: 0
# 🦸 Superman Splunk 技能
[](https://opensource.org/licenses/MIT)
[](https://github.com/ishayvilroel/superman-splunk)
[](https://github.com/ishayvilroel/superman-splunk)
[](https://github.com/ishayvilroel/superman-splunk)
## 这是什么?
**Superman Splunk** 是一个 [AI skill](https://github.com/superpowers-ai/superpowers) — 一个结构化的知识文件,当你在 AI 编码助手(Claude Code, GitHub Copilot CLI, Gemini CLI 或任何兼容 Superpowers 的 agent)中需要 Splunk 专业知识时,它就会被激活。
当该 skill 激活时,AI 将具备以下能力:
- 关于 **3 层 Splunk 架构**(forwarders → indexers → search heads)的深入知识
- 涵盖所有主要命令和最佳实践的专家级 **SPL** (Search Processing Language)
- 完整的 **app 和 add-on 开发**指南,包括自定义命令、模块化输入、REST API 和 Python SDK
- 生产级 **管理**知识:所有关键 conf 文件、配置优先级、Deployment Server、License 管理
- **Enterprise Security (ES)**、SOAR、ITSI、RBAC、TLS 加固和基于风险的告警
该 skill 是通过对 Google NotebookLM 中 300 多个网络资源运行深度自动化研究构建的,综合了这些发现并将它们打包成结构化的参考格式。
## 📊 基准测试结果
在 5 个真实的 Splunk 场景中评估了 AI **带有**与**不带有**该 skill 的表现对比:
| 指标 | 带有 Skill | 不带 Skill | 差值 |
|--------|:----------:|:-------------:|:-----:|
| **通过率** | **96%** | **73%** | **+23pp** |
| 平均响应时间 | 273s | 497s | 快 224s |
主要区别:
- ✅ **Transparent Huge Pages (THP)** 调优 — 该 skill 展示了基础模型遗漏的这个关键 Linux OS 设置
- ✅ **Risk-Based Alerting 实施步骤** — 该 skill 提供了具体的从零开始的工作流,而不仅仅是理论上的基线
- ✅ **TA 目录结构 + 安全凭证处理** — 完整的模式,而非部分示例
- ⚠️ V2 自定义命令协议 — 发现了改进机会(参见 [路线图](#-roadmap))
## 🗂️ 知识覆盖范围
| 参考文件 | 涵盖主题 | 行数 |
|----------------|---------------|-------|
| [`references/architecture.md`](references/architecture.md) | 3 层架构、forwarder 类型、索引 pipeline、bucket 生命周期、SmartStore、indexer 集群 (RF/SF)、SHC、Deployment Server、性能调优 | 241 |
| [`references/spl-guide.md`](references/spl-guide.md) | 完整的 SPL 命令参考、eval 函数、rex、stats vs transaction、lookups、KV Store、宏、事件类型、标签、工作流操作、tstats、仪表板类型 | 334 |
| [`references/development.md`](references/development.md) | App/TA 结构、自定义命令(V2 协议)、模块化输入、告警操作、REST API(160+ 端点,端口 8089)、Python SDK、CIM 规范化、数据模型加速 | 393 |
| [`references/administration.md`](references/administration.md) | 配置文件优先级、inputs.conf、props.conf、transforms.conf、indexes.conf、server.conf、Deployment Server、License 管理、Monitoring Console | 392 |
| [`references/security-es.md`](references/security-es.md) | RBAC、authorize.conf、TLS/SSL、Enterprise Security、关联搜索、重要事件、RBA、威胁情报、SOAR、ITSI、SmartStore、Splunk Cloud vs Enterprise、加固清单 | 342 |
## 🚀 安装说明
### 选项 1 — 直接克隆到您的 skills 目录
```
# Claude Code / Copilot CLI / Gemini CLI (超能力)
git clone https://github.com/ishayvilroel/superman-splunk \
~/.agents/skills/superman-splunk
```
这样就完成了。该 skill 会从 skills 目录自动发现。
### 选项 2 — 手动复制
下载或克隆此代码库,然后将文件夹复制到您 AI 平台的 skills 目录:
| 平台 | Skills 目录 |
|----------|-----------------|
| Claude Code (Superpowers) | `~/.claude/skills/superman-splunk/` |
| Copilot CLI (Superpowers) | `~/.agents/skills/superman-splunk/` |
| Gemini CLI (Superpowers) | `~/.gemini/skills/superman-splunk/` |
### 选项 3 — 打包的 `.skill` 文件
从 Releases 页面下载 [`superman-splunk.skill`](releases) 并通过您的 skill 管理器导入。
## ⚡ 用法
一旦安装,当您的对话中提到 Splunk 时,该 skill 就会**自动**激活。无需显式调用。
### 示例提示词
```
"How do I set up indexer clustering with RF=3 and SF=2?"
"Write me an SPL query to detect credential stuffing attacks from firewall logs"
"Build me a modular input TA that polls a REST API every 5 minutes and handles credential storage securely"
"My indexing pipeline is saturating typingQueue — walk me through diagnosing and fixing it"
"Design an RBA (Risk-Based Alerting) workflow in Enterprise Security from scratch"
```
AI 会在回复之前自动读取相关的参考文件(architecture, SPL, development 等)— 从而为您提供基于深厚 Splunk 知识的专家级解答。
## 📁 仓库结构
```
superman-splunk/
├── README.md # This file
├── SKILL.md # Skill entry point — the AI reads this first
├── CHANGELOG.md # Version history
├── LICENSE # MIT License
│
├── references/ # Deep knowledge files (AI reads on demand)
│ ├── architecture.md # 3-tier arch, buckets, clustering, SmartStore
│ ├── spl-guide.md # Full SPL reference & knowledge objects
│ ├── development.md # App dev, custom commands, REST API, SDK
│ ├── administration.md # All conf files, deployment, licensing
│ └── security-es.md # ES, SOAR, RBAC, TLS, RBA, ITSI
│
├── evals/
│ └── evals.json # Benchmark eval prompts and assertions
│
└── docs/
├── how-it-works.md # Architecture of the skill itself
├── splunk-quick-reference.md # Ports, conf files, commands cheatsheet
└── benchmark.md # Full benchmark methodology and results
```
## 🧠 工作原理
该 skill 使用了**延迟加载参考模式**:
1. `SKILL.md` — 入口点 — 会首先加载,并为 AI 提供一个领域路由表。
2. AI 仅读取当前问题所需的参考文件(例如,一个 SPL 问题 → 读取 `spl-guide.md`,而不是全部 5 个文件)。
3. 对于宽泛的问题,AI 会在组织答案之前读取多个参考文件。
这使得 token 使用保持高效,同时让 AI 能够按需访问完整的知识库。
```
User asks about Splunk
│
▼
SKILL.md loads
(domain routing table)
│
┌────┴────────────────────────────┐
│ │
SPL question? Architecture question?
│ │
reads spl-guide.md reads architecture.md
│ │
└────────────────┬────────────────┘
│
Expert response
```
## 🗺️ 路线图
- [ ] **V2 自定义命令协议** — 更突出的覆盖范围;当前 skill 版本已将其包含在 `development.md` 中,但 agent 并不能可靠地展示它
- [ ] Splunk Cloud 与 Enterprise 的决策矩阵及迁移指南
- [ ] ITSI 深入探讨模块(Episode 页面、Glass Tables、KPI 基线)
- [ ] Splunk Observability (OTel, APM, RUM, Synthetics) 扩展
- [ ] SPL2 / Federated Search 覆盖范围
## 🤝 贡献
欢迎贡献。如果您:
- 发现错误或过时的 Splunk 事实 — 提交 issue 或 PR
- 有新的评估场景要添加 — 请将其添加到 `evals/evals.json`
- 想要扩展参考文件 — 向 `references/` 提交 PR 是正确的地方
请保持参考文件**基于事实、准确且具有可操作性** — 目标是专家级的准确性,而不是高层次的总结。
## 📄 许可证
MIT © [ishayvilroel](https://github.com/ishayvilroel)
*“没有太高级或太基础的问题 — 从‘我该如何搜索日志’到‘设计一个带有 SmartStore 的多站点 indexer 集群’。”*
标签:AI助手, AI技能, AMSI绕过, Awesome, Claude Code, DLL 劫持, Enterprise Security, Gemini CLI, GitHub Copilot CLI, Google NotebookLM, ITSI, LLM赋能, Python SDK, RBAC, REST API, Risk-Based Alerting, Ruby, Search Processing Language, SOAR, SPL开发, TLS加固, 三层架构, 代码示例, 企业安全, 大语言模型, 威胁检测, 安全运营, 应用开发, 扫描框架, 数据分析, 架构设计, 知识库, 系统管理, 网络安全, 网络资产管理, 自动化研究, 防御加固, 隐私保护, 风险告警