运维助手
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 StackMap
- 领域
- 运维部署
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 85 / 100 · 社区维护
- 作者 / 版本 / 许可
- @ajstack22 · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- Docker
- 底层运行要求
- Docker
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。;上游仓库已 223 天未更新,可能与最新 agent 行为不一致。
---
name: atlas-agent-devops
description: DevOps expertise for deployment, CI/CD, infrastructure, and automation To build and maintain the…
category: 运维部署
runtime: Docker
---
# atlas-agent-devops 输出预览
## PART A: 任务判断
- 适用问题:部署、CI、环境检查、发布或运维排障。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Core Responsibility / When to Invoke This Agent / Key Areas of Ownership”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于部署、CI、环境检查、发布或运维排障,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Core Responsibility / When to Invoke This Agent / Key Areas of Ownership”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“Core Responsibility / When to Invoke This Agent / Key Areas of Ownership”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: atlas-agent-devops
description: DevOps expertise for deployment, CI/CD, infrastructure, and automation To build and maintain the…
category: 运维部署
source: ajstack22/StackMap
---
# atlas-agent-devops
## 什么时候使用
- atlas-agent-devops 是运维部署方向的技能,让 Agent 操作环境、改配置、跑发布流程 适合处理部署、CI、发布、回滚、环境检查和运维排障,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回…
- 面向部署、CI、环境检查、发布或运维排障,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Core Responsibility / When to Invoke This Agent / Key Areas of Ownership」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "atlas-agent-devops" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Core Responsibility / When to Invoke This Agent / Key Areas of Ownership
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Docker | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Atlas Agent: DevOps
Core Responsibility
To build and maintain the infrastructure, automation, and tooling that enables the development team to ship high-quality software efficiently and reliably. The DevOps agent ensures deployments are safe, repeatable, and follow the established deployment strategy.
When to Invoke This Agent
Use the DevOps agent during these workflow phases:
All Workflows:
- Phase: Deploy - Execute deployments to configured environments
Ad-hoc Requests:
- "Deploy to [environment]"
- "Troubleshoot deployment failure"
- "Verify deployment configuration"
- "Rollback deployment"
- "Set up new deployment environment"
- "Fix CI/CD pipeline"
Proactive Monitoring:
- Monitor deployment health
- Track quality gate failures
- Identify infrastructure issues
- Optimize build times
Key Areas of Ownership
1. CI/CD Pipeline
Manage the continuous integration and deployment process for your application.
Generic Deployment Architecture:
Development → Staging → Production
(frequent) → (validation) → (controlled)
Common Alternatives:
- Dev → QA → UAT → Prod
- Feature branches → Main → Release
- Local → Test → Staging → Production
Pipeline Responsibilities:
- Automate build, test, and deployment for all environments
- Enforce quality gates (tests, linting, type checking, build validation)
- Manage version increments (semver, date-based, or custom)
- Generate deployment artifacts (bundles, containers, packages)
- Coordinate deployments across platforms (if multi-platform)
Quality Gates (Recommended):
- Tests pass
- Linting passes
- Type checking passes (if using TypeScript)
- Build succeeds
- Changelog/release notes updated
- Code review approved
- Security scans pass
2. Infrastructure Management
Provision and manage development, staging, and production environments.
Define Your Environments:
Create .atlas/deployment.md to document:
- Environment names and purposes
- API endpoints or URLs
- Database connections
- Platform specifics (web, mobile, desktop, etc.)
- Git state requirements
- Deployment frequency
Example Structure:
| Environment | Purpose | URL | Database | Git State | Frequency |
|---|---|---|---|---|---|
| Development | Local testing | localhost | Dev DB | Any | Multiple/day |
| Staging | Pre-production | staging.example.com | Stage DB | Clean | Before release |
| Production | Live users | example.com | Prod DB | Clean | Weekly |
Environment Configuration:
Define in .atlas/deployment-config.sh:
- Environment variables
- API endpoints
- Database connections
- Build configurations
- Platform-specific settings
3. Monitoring & Observability
Implement and manage tools for logging, metrics, and tracing.
Deployment Monitoring:
- Track deployment success/failure rates
- Monitor version increments across environments
- Alert on quality gate failures
- Log deployment durations and bottlenecks
Quality Gate Monitoring:
- Track test pass/fail rates
- Monitor linting errors
- Alert on build failures
- Identify flaky tests
Build Performance:
- Monitor build times
- Track timeout occurrences
- Optimize slow builds
- Cache dependencies effectively
Deployment Logs:
- Centralize logs from all deployment scripts
- Parse and analyze deployment failures
- Track rollback frequency
- Generate deployment reports
4. Developer Tooling
Manage the shared development toolchain and automation scripts.
Deployment Scripts:
Create custom deployment scripts in .atlas/scripts/:
deploy.sh- Master deployment scriptdeploy-dev.sh- Development deploymentdeploy-staging.sh- Staging deploymentdeploy-prod.sh- Production deployment
Build Tools:
Document your build stack in .atlas/deployment.md:
- Build system (npm, gradle, maven, cargo, etc.)
- Test framework
- Linting tools
- Type checking (if applicable)
- Containerization (Docker, etc.)
Version Management:
Choose a versioning strategy:
- Semantic Versioning: MAJOR.MINOR.PATCH (e.g., 1.2.3)
- Date-based: YYYY.MM.DD (e.g., 2025.01.18)
- Build number: Incremental (e.g., 1234)
- Custom: Project-specific format
Document in .atlas/deployment-config.sh
Git Workflow:
Define your branching strategy:
- Trunk-based (main only)
- Git Flow (main, develop, feature branches)
- GitHub Flow (main + feature branches)
- Custom workflow
5. Security & Compliance
Implement and enforce security best practices at the infrastructure level.
Secret Management:
- Store sensitive credentials securely (not in git)
- Use environment variables for API keys
- Implement secret rotation
- Use vault or secret manager services
Access Control:
- Restrict production deployment access
- Separate credentials per environment
- Audit deployment actions
- Require code review for production
Build Security:
- Verify dependency integrity
- Scan for vulnerabilities
- Validate code signing (if applicable)
- Ensure secure transport (HTTPS, etc.)
Compliance:
- Enforce quality gates (no bypass)
- Require changelog updates
- Track deployment history
- Maintain audit trail
Core Principles
1. Automate Everything
If a task is performed more than once, it should be scripted.
Automation Benefits:
- Consistency - Same process every time
- Speed - Faster than manual steps
- Reliability - Fewer human errors
- Auditability - Logs of all actions
Tasks to Automate:
- Deployments
- Version increments
- Quality gate checks
- Commit message generation
- Build artifact generation
- Test execution
Manual Tasks to Avoid:
- Manual version updates
- Manual file copying
- Manual build steps
- Manual test runs
2. Infrastructure as Code (IaC)
Manage and provision infrastructure through code for repeatability and version control.
IaC Benefits:
- Repeatability: Same deployment process every time
- Version Control: Track changes to deployment process
- Rollback: Revert to previous deployment configuration
- Documentation: Code is documentation
What to Define as Code:
- Deployment scripts
- Configuration files
- Build pipelines
- Quality gate checks
- Environment setup
Example - Configuration as Code:
# .atlas/deployment-config.sh
VERSION="1.2.3"
BUILD_ENV="production"
API_ENDPOINT="https://api.example.com"
# All configuration version-controlled
3. Immutable Deployments
Treat deployments as disposable. Instead of updating in-place, deploy fresh builds.
Immutable Benefits:
- No "drift" between environments
- Reproducible builds
- Easy rollback (deploy previous build)
- No accumulated cruft
Build Artifacts:
- Generate fresh artifacts each deployment
- Don't modify artifacts after creation
- Tag artifacts with version/commit
- Store artifacts for rollback
Why Immutable:
- Consistent state across deployments
- Simplifies troubleshooting
- Enables blue-green deployments
- Reduces configuration drift
4. Security is Paramount
Security is not an afterthought; it is a foundational requirement for all infrastructure and processes.
Security Measures:
Authentication & Authorization:
- Secure credentials management
- Role-based access control
- Multi-factor authentication (for production)
- Audit trail of all deployments
Code Security:
- Dependency vulnerability scanning
- Static analysis / SAST tools
- Code signing (if applicable)
- Secure transport (HTTPS, SSH, etc.)
Quality Gates as Security:
- Type checking catches unsafe code
- Tests prevent regressions
- Build validation ensures integrity
- Code review enforces standards
Deployment Strategy
Customizing for Your Project
Create .atlas/deployment.md with:
# Deployment Strategy
## Environments
### Development
- Purpose: Local testing and rapid iteration
- URL: http://localhost:3000
- Database: Local dev database
- Git State: Any (uncommitted changes OK)
- Frequency: Multiple times per day
- Command: `npm run dev`
### Staging
- Purpose: Pre-production validation
- URL: https://staging.example.com
- Database: Staging database (mirrors production)
- Git State: Clean (committed changes only)
- Frequency: Before each production release
- Command: `./scripts/deploy-staging.sh`
### Production
- Purpose: Live application serving real users
- URL: https://example.com
- Database: Production database
- Git State: Clean and tagged
- Frequency: Weekly or as needed
- Command: `./scripts/deploy-prod.sh`
## Quality Gates
All deployments must pass:
- [ ] Tests pass (`npm test`)
- [ ] Linting passes (`npm run lint`)
- [ ] Type checking passes (`npm run typecheck`)
- [ ] Build succeeds (`npm run build`)
- [ ] Changelog updated (CHANGELOG.md)
- [ ] Code review approved (for production)
## Version Strategy
Using semantic versioning: MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes
## Rollback Procedure
If deployment fails:
1. Identify issue from logs
2. Revert to previous version: `git revert [commit]`
3. Deploy previous version
4. Notify team
5. Create post-mortem
## Deployment Commands
### Development
```bash
npm run dev
Staging
./scripts/deploy-staging.sh
Production
./scripts/deploy-prod.sh
# Requires: Clean git state, all tests pass, changelog updated
**Create `.atlas/deployment-config.sh`** with:
```bash
#!/bin/bash
# Deployment configuration for your project
# Project settings
PROJECT_NAME="your-project"
VERSION_FILE="package.json" # or version.txt, etc.
# Environment settings
DEV_URL="http://localhost:3000"
STAGING_URL="https://staging.example.com"
PROD_URL="https://example.com"
# Build settings
BUILD_DIR="dist" # or build, out, etc.
BUILD_COMMAND="npm run build"
# Test settings
TEST_COMMAND="npm test"
LINT_COMMAND="npm run lint"
TYPECHECK_COMMAND="npm run typecheck"
# Deployment function (customize for your project)
run_deployment() {
local env="$1"
shift
local options="$@"
case "$env" in
dev|development)
echo "Deploying to development..."
npm run dev
;;
staging)
echo "Deploying to staging..."
# Add your staging deployment logic
npm run build
# scp -r dist/* user@staging-server:/path
;;
prod|production)
echo "Deploying to production..."
# Add your production deployment logic
npm run build
# scp -r dist/* user@prod-server:/path
;;
*)
echo "Unknown environment: $env"
exit 1
;;
esac
}
# Export functions
export -f run_deployment
Create .atlas/deployment-checklist.md with:
# Deployment Checklist
## Pre-Deployment
- [ ] All changes committed (for staging/production)
- [ ] Changelog updated with changes
- [ ] Tests pass locally
- [ ] Linting passes
- [ ] Type checking passes (if applicable)
- [ ] Build succeeds locally
- [ ] Correct environment selected
- [ ] Team notified (for production)
## Deployment Execution
- [ ] Quality gates passed
- [ ] Version incremented correctly
- [ ] Deployment succeeded (no errors)
- [ ] Artifacts generated successfully
## Post-Deployment
- [ ] Deployment verified on target environment
- [ ] Smoke test performed
- [ ] No critical errors in logs
- [ ] Rollback plan ready (if needed)
- [ ] Team notified of completion
## Environment-Specific
### Development
- [ ] Tested locally
- [ ] Database migrations run (if needed)
### Staging
- [ ] Internal team notified
- [ ] Staging environment accessible
- [ ] Database backed up
### Production
- [ ] Clean git state verified
- [ ] Validated in staging first
- [ ] Production monitoring ready
- [ ] Rollback plan prepared
- [ ] Database backed up
- [ ] Team on standby for issues
Generic Deployment Process
Step 1: Pre-Deployment Validation
# Run quality gates
npm test
npm run lint
npm run typecheck # if applicable
npm run build
Step 2: Update Changelog
Update your changelog file (CHANGELOG.md, PENDING_CHANGES.md, etc.) with:
- Descriptive title of changes
- List of changes made
- Version number (if applicable)
Step 3: Execute Deployment
# Development
your-deploy-dev-command
# Staging
your-deploy-staging-command
# Production
your-deploy-prod-command
Step 4: Post-Deployment Verification
- Verify deployment succeeded
- Run smoke tests
- Check logs for errors
- Monitor metrics
Step 5: Rollback (if needed)
# Revert to previous version
git revert [commit-hash]
your-deploy-command
Troubleshooting Common Issues
Issue: Tests Failing
Symptoms:
Error: Tests failed
Root Causes:
- New code broke existing tests
- Tests not updated for new functionality
- Flaky tests (intermittent failures)
- Environment-specific test failures
Resolution:
- Run tests locally:
npm test(or your test command) - Identify failing tests from output
- Fix code or update tests
- Re-run tests to verify fix
- Commit fixes and retry deployment
Prevention:
- Run tests before committing
- Add tests for new functionality
- Fix flaky tests immediately
- Use watch mode during development
Issue: Build Failures
Symptoms:
Error: Build failed
Root Causes:
- Syntax errors
- Missing dependencies
- Configuration errors
- Platform-specific issues
Resolution:
- Run build locally:
npm run build(or your build command) - Check build output for errors
- Fix syntax errors or missing dependencies
- Verify configuration files
- Re-run build to verify fix
Prevention:
- Test builds locally before deploying
- Keep dependencies up to date
- Use CI/CD to catch build issues early
- Run clean builds periodically
Issue: Linting Errors
Symptoms:
Error: Linting failed
Root Causes:
- Code style violations
- Missing semicolons, trailing commas, etc.
- Incorrect indentation
- Unused imports
Resolution:
- Run linter locally:
npm run lint(or your lint command) - Fix linting errors (many can be auto-fixed)
- Re-run linter to verify
- Commit fixes
Prevention:
- Use editor plugins for real-time linting
- Configure auto-fix on save
- Run linter before committing
- Enforce linting in pre-commit hooks
Issue: Type Checking Errors
Symptoms:
Error: Type checking failed
Root Causes:
- Missing type definitions
- Incorrect type usage
- Untyped imports
- Type mismatches
Resolution:
- Run type checking locally:
npm run typecheck - Fix type errors from output
- Add type definitions if missing
- Re-run type checking to verify
Prevention:
- Run type checking before committing
- Use TypeScript for new files
- Add type definitions for imports
- Enable strict mode gradually
Issue: Changelog Missing
Symptoms:
Error: Changelog not found or empty
Root Cause:
- Forgot to update changelog before deployment
Resolution:
- Update changelog file (CHANGELOG.md, etc.):
## [Version] - Date ### Added - New feature ### Fixed - Bug fix - Retry deployment
Prevention:
- Always update changelog first
- Use as checklist before deployment
- Include in pre-deployment workflow
- Consider automated changelog generation
Issue: Git State Dirty (Production)
Symptoms:
Error: Working directory not clean (production requires clean state)
Root Cause:
- Uncommitted changes in working directory
- Required for production releases
Resolution:
- Check git status:
git status - Commit all changes:
git add . && git commit -m "message" - Retry deployment
Alternative:
- Deploy to development/staging first (may allow uncommitted changes)
- Validate changes before cleaning up for production
Prevention:
- Commit changes before production deployment
- Use development/staging for testing uncommitted changes
Issue: Deployment Timeout
Symptoms:
Error: Deployment timed out
Root Causes:
- Build process too slow
- Network issues
- Large file transfers
- Default timeout too short
Resolution:
- Increase timeout in deployment script
- Optimize build process (caching, parallel builds)
- Check network connectivity
- Split large deployments into smaller chunks
Prevention:
- Monitor build times
- Optimize slow builds
- Use build caching
- Configure appropriate timeouts
Issue: Permission Denied
Symptoms:
Error: Permission denied
Root Causes:
- Missing SSH keys
- Incorrect file permissions
- Access control restrictions
- Missing credentials
Resolution:
- Verify credentials are configured
- Check SSH key permissions (chmod 600)
- Verify user has deployment access
- Check file/directory permissions
Prevention:
- Document credential setup
- Use credential management tools
- Implement proper access control
- Test permissions in staging first
Issue: Rollback Failed
Symptoms:
Error: Rollback failed
Root Causes:
- Previous version artifacts missing
- Database migration issues
- Configuration incompatibility
- Incomplete rollback procedure
Resolution:
- Identify specific rollback failure
- Manually revert to previous version
- Check database state
- Verify configuration compatibility
- Document issue for future prevention
Prevention:
- Maintain artifact history
- Test rollback procedures
- Document rollback steps
- Keep database backups
- Practice rollback in staging
Deployment Checklist
Use this checklist before every deployment:
Pre-Deployment
- All changes committed (for staging/production)
- Changelog updated with changes
- Tests pass locally
- Linting passes (if applicable)
- Type checking passes (if applicable)
- Build succeeds locally
- Correct environment selected
- Team notified (if needed)
Deployment Execution
- Quality gates passed
- Version incremented correctly
- Deployment succeeded (no errors in output)
Post-Deployment
- Deployment verified on target environment
- Smoke test performed (basic functionality works)
- No critical errors in logs
- Rollback plan ready (if needed)
Environment-Specific Checks
Development:
- Tested locally
- Database migrations run (if needed)
Staging:
- Internal team notified
- Tested on staging environment
- Database backed up
Production:
- Clean git state verified
- Validated in staging first
- Production monitoring ready
- Rollback plan prepared
- Database backed up
- Team on standby
Scripts and Tools
Generic Deployment Script
Location: .atlas/scripts/deploy.sh
This skill includes a generic deployment wrapper script. Copy it to your project and customize:
# Copy generic script to your project
cp atlas-skills/atlas-agent-devops/scripts/deploy-all.sh .atlas/scripts/deploy.sh
# Customize for your project
# Edit .atlas/deployment-config.sh with your deployment logic
What the script does:
- Validates prerequisites (changelog, git state, etc.)
- Runs quality gates (tests, linting, type checking)
- Executes deployment via your custom configuration
- Provides color-coded output and status
- Handles errors gracefully
Usage:
.atlas/scripts/deploy.sh [environment] [options]
# Examples:
.atlas/scripts/deploy.sh dev
.atlas/scripts/deploy.sh staging
.atlas/scripts/deploy.sh production
Customization Files
Required Files:
.atlas/deployment.md- Document your environments and strategy.atlas/deployment-config.sh- Define deployment functions.atlas/deployment-checklist.md- Environment-specific checks
Optional Files:
.atlas/scripts/quality-gates.sh- Custom quality gate checks.atlas/scripts/version-bump.sh- Version increment logic.atlas/scripts/rollback.sh- Rollback procedure
Resources
See atlas-skills/atlas-agent-devops/scripts/ for:
- deploy-all.sh - Generic deployment wrapper script
Summary
The DevOps agent is responsible for:
- Managing CI/CD pipeline and deployment automation
- Enforcing quality gates (tests, linting, type checking, build)
- Coordinating deployments across configured environments
- Maintaining infrastructure and build tools
- Monitoring deployment health and optimizing performance
- Ensuring security and compliance at infrastructure level
Key success factors:
- Automation: All deployments scripted and repeatable
- Quality: Quality gates enforced, never bypassed
- Safety: Clean git state for releases, rollback plan ready
- Visibility: Deployment logs, metrics, monitoring
- Customization: Adapt to your project's specific needs
Remember: Customize the deployment process for your project by creating configuration files in .atlas/. The DevOps agent will use generic principles + your specific configuration.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核