mcpField
C
configure-status

configure-status

github.com/laurigates云与 DevOps5953 次安装1 天前更新
代码仓库

关于 configure-status

用于只读检查项目基础设施标准合规状态的技能,面向需要快速健康检查或 CI/CD 状态验证的团队。它扫描配置文件并为各组件标记状态,也可通过详细模式显示检查信息。

主要功能

  1. 01检测项目类型与标准版本
  2. 02扫描多类基础设施配置
  3. 03按组件判定合规状态
  4. 04生成合规状态报告
  5. 05支持详细只读检查

适用场景

  1. 01快速查看项目标准合规情况
  2. 02在 CI/CD 中验证配置状态
  3. 03在修复前预览待处理问题

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/laurigates/claude-plugins --skill configure-status

安装后在 Claude Code 中输入/configure-status确认已加载。

详细介绍

/configure:status

显示基础设施标准的合规状态,不做任何更改。

何时使用此技能

使用此技能的场景……使用其他方法的场景……
检查总体合规状态运行完整合规检查并修复问题(使用 /configure:all --fix)
生成合规报告需要修复发现的问题(使用 /configure:all)
快速检查项目状况检查特定组件(使用 /configure:X --check-only)
验证 CI/CD 状态运行交互式选择(使用 /configure:select)
查看当前配置状态需要对组件进行详细分析

上下文

  • 项目标准:!find . -maxdepth 1 -name \'.project-standards.yaml\'
  • 项目类型:!find . -maxdepth 1 -name '.project-standards.yaml' -exec grep -m1 "^project_type:" {} +
  • 标准版本:!find . -maxdepth 1 -name '.project-standards.yaml' -exec grep -m1 "^standards_version:" {} +
  • 上次配置时间:!find . -maxdepth 1 -name '.project-standards.yaml' -exec grep -m1 "^last_configured:" {} +
  • Pre-commit 配置:!find . -maxdepth 1 -name \'.pre-commit-config.yaml\'
  • 工作流:!find . -path '*/.github/workflows/*' -maxdepth 3 -name '*.yml'
  • 是否有 Dockerfile:!find . -maxdepth 1 -name 'Dockerfile*' -print -quit
  • 是否有 skaffold:!find . -maxdepth 1 -name \'skaffold.yaml\'
  • 是否有 helm:!find . -maxdepth 2 -type d -name 'helm' -print -quit
  • 测试配置:!find . -maxdepth 1 \( -name 'vitest.config.*' -o -name 'jest.config.*' -o -name 'pytest.ini' \)
  • Lint 配置:!find . -maxdepth 1 \( -name 'biome.json' -o -name '.eslintrc*' \)
  • 编辑器配置:!find . -maxdepth 1 -name \'.editorconfig\'
  • Gitleaks 配置:!find . -maxdepth 1 -name \'.gitleaks.toml\'
  • 包文件:!find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' \)

参数

从 $ARGUMENTS 解析:

  • --verbose:显示每个组件的详细合规信息

执行

执行此只读合规状态检查:

第 1 步:检测项目类型
  1. 如果 .project-standards.yaml 存在,则读取该文件(显示跟踪的版本和上次配置日期)
  2. 根据文件结构自动检测项目类型
  3. 如果检测到的类型与跟踪的类型不同,则报告差异
第 2 步:扫描配置文件

检查每项配置是否存在且有效:

组件检查的文件
Pre-commit.pre-commit-config.yaml
Release-pleaserelease-please-config.json、.release-please-manifest.json、.github/workflows/release-please.yml
DockerfileDockerfile、Dockerfile.*
Skaffoldskaffold.yaml
CI 工作流.github/workflows/*.yml
Helmhelm/*/Chart.yaml
文档tsdoc.json、typedoc.json、mkdocs.yml、docs/conf.py、pyproject.toml [tool.ruff.lint.pydocstyle]
GitHub Pages.github/workflows/docs.yml、.github/workflows/*pages*.yml
缓存失效next.config.*、vite.config.*、vercel.json、_headers
测试vitest.config.*、jest.config.*、pytest.ini、pyproject.toml [tool.pytest]、.cargo/config.toml
覆盖率vitest.config.* [coverage]、pyproject.toml [tool.coverage]、.coveragerc
Lintbiome.json、pyproject.toml [tool.ruff]、clippy.toml
格式化.prettierrc*、biome.json、pyproject.toml [tool.ruff.format]、rustfmt.toml
死代码knip.json、knip.ts、pyproject.toml [tool.vulture]
编辑器.editorconfig、.vscode/settings.json、.vscode/extensions.json
安全.github/workflows/*security*、.gitleaks.toml、pyproject.toml [tool.bandit]
第 3 步:确定合规状态

为每个组件分配一个状态:

状态含义
PASS完全符合项目标准
WARN已配置,但已过时或不完整
FAIL缺少必需的配置
SKIP不适用于此项目类型
第 4 步:打印合规报告
Infrastructure Standards Status
====================================
Repository: [name]
Project Type: [type] ([detected])
Standards Version: [version] (tracked: [tracked])
Last Configured: [date]

Component Status:
  Pre-commit      PASS   v5.0.0 hooks, conventional commits
  Release-please  PASS   Node workspace plugin
  Dockerfile      WARN   Missing healthcheck
  Skaffold        PASS   3 profiles configured
  CI Workflows    WARN   Missing test workflow
  Helm            SKIP   No helm/ directory
  Tests           PASS   Vitest configured
  Coverage        WARN   72% (below 80% threshold)
  Linting         PASS   Biome configured
  Formatting      PASS   Biome configured
  Dead Code       WARN   Knip found 3 unused exports
  Editor          PASS   .editorconfig present
  Security        PASS   gitleaks + npm audit

Summary: [N] warnings, [N] failures
Run /configure:all to fix issues
第 5 步:显示详细信息(如有请求)

如果设置了 --verbose 标志:

  • 显示每个钩子/工具的具体版本号
  • 列出执行的各项合规检查
  • 显示与 .project-standards.yaml 的偏差
  • 显示文件修改时间戳
  • 显示缓存破坏配置详情(框架、CDN、哈希模式)

面向 Agent 的优化

场景命令
快速状态检查/configure:status
详细状态/configure:status --verbose
检查标准版本grep "^standards_version:" .project-standards.yaml 2>/dev/null | sed 's/.*:[[:space:]]*//'
检查上次配置日期grep "^last_configured:" .project-standards.yaml 2>/dev/null | sed 's/.*:[[:space:]]*//'
列出所有工作流文件find .github/workflows -maxdepth 1 -name '*.yml' -exec basename {} \;

标志

标志说明
--verbose显示详细的合规信息

说明

  • 此命令为只读,不会修改任何文件
  • 用于 CI/CD 合规检查(退出代码反映检查状态)
  • 在运行 /configure:all 之前执行,以预览将要修复的内容

另请参阅

  • /configure:all - 运行所有合规检查
  • /configure:select - 交互式选择要配置的组件
  • /configure:pre-commit - 执行特定于提交前的检查
  • /configure:release-please - 执行特定于 Release-please 的检查

评论

支持 Markdown