Merkuryo/prompt-engineering-devops

GitHub: Merkuryo/prompt-engineering-devops

Merkuryo/prompt-engineering-devops:DevOps 和 SRE 提示库,助力安全与运维。

Stars: 0 | Forks: 0

# prompt-engineering-devops ![Prompts](https://img.shields.io/badge/prompts-60%2B-%E8%93%9D%E7%8E%84%E8%89%B2) ![Categories](https://img.shields.io/badge/categories-6-%E8%93%9D%E8%89%B2) ![License](https://img.shields.io/badge/license-MIT-%E7%BB%BF%E8%89%B2) ![CI](https://img.shields.io/github/actions/workflow/status/yourusername/prompt-engineering-devops/ci.yml?label=CI) 一个经过生产测试的 DevOps、SRE 和平台工程任务的提示库——附带一个验证框架以保持高质量。 ## 分类 | 分类 | 提示 | 用例 | |---|---|---| | [Kubernetes](prompts/kubernetes.md) | 12 | 调试、清单、RBAC、HPA、成本分析 | | [Terraform](prompts/terraform.md) | 12 | 安全审查、模块生成、漂移分析 | | [Docker](prompts/docker.md) | 12 | Dockerfile 审查、Compose 审计、优化 | | [Monitoring](prompts/monitoring.md) | 12 | 告警分类、仪表板、运行手册、SLOs | | [Incident Response](prompts/incident-response.md) | 12 | 分类、根本原因分析、事后分析、通讯 | | [Security](prompts/security.md) | 12 | CVE 分析、RBAC 审查、威胁建模 | ## 如何使用这些提示 1. **在分类文件中**找到相关的提示 2. **复制**提示模板 3. **将** `{PLACEHOLDERS}` **替换为**您的特定上下文 4. **粘贴**到您首选的 LLM(Claude、GPT-4、本地模型) ### 示例:Kubernetes 调试 ``` A pod named api-server-7d9b in namespace production is stuck in CrashLoopBackOff. Walk me through the exact commands to diagnose and resolve this, in order. Include: log retrieval, event inspection, resource limit checks, and image pull verification. ``` ### 示例:安全审查 ``` Review this Terraform module for security issues: [paste your code] Check for: - Overly permissive IAM policies (iam:*) - Public S3 buckets or open security groups - Unencrypted storage (EBS, RDS, S3) - Hardcoded credentials or secrets Output: severity (critical/high/medium/low), affected resource, and fix. ``` ## 提示质量标准 本库中的每个提示都必须具备: - 清晰的占位符变量 `{LIKE_THIS}` - 指定的输出格式 - 填充的上下文字段 - 至少经过一个真实 LLM 的测试 ## 验证提示 ``` # 安装依赖 pip install click # 验证所有提示文件 python test_prompts.py # 显示提示计数的高级输出 python test_prompts.py --verbose # 验证自定义目录 python test_prompts.py --prompts-dir ./my-prompts --verbose ``` ## 项目结构 ``` prompt-engineering-devops/ ├── prompts/ │ ├── kubernetes.md # K8s troubleshooting & manifests │ ├── terraform.md # IaC review & generation │ ├── docker.md # Container optimization & security │ ├── monitoring.md # Alerting, dashboards, SLOs │ ├── incident-response.md # On-call workflows │ └── security.md # CVE, policy, threat modeling ├── test_prompts.py # Prompt validation script ├── CONTRIBUTING.md └── .github/workflows/ci.yml ``` ## 贡献 查看 [CONTRIBUTING.md](CONTRIBUTING.md) 了解如何添加新的提示或分类。 关键规则: - 遵循元数据格式(`title`、`tags`、`example_input`、`example_output`) - 每个文件至少包含 10 个 `##` 提示部分 - 在提交 PR 之前运行 `python test_prompts.py --verbose` ## 许可证 MIT
标签:Alert Management, Claude, Code Review, Cost Analysis, CVE Analysis, CVE检测, Dashboard, Docker, Drift Analysis, ECS, GPT-4, Hardcoded Credentials, IAM Policy, Incident Response, LLM Integration, Local Models, Monitoring, Optimization, Prompt Library, Public Bucket, RBAC, Runbook, Security, Security Review, SLO, SRE, Terraform, Threat Modeling, Unencrypted Storage, 偏差过滤, 凭据导出, 安全防御评估, 请求拦截, 逆向工具, 隐蔽技术