关于 configure-status
用于只读检查项目基础设施标准合规状态的技能,面向需要快速健康检查或 CI/CD 状态验证的团队。它扫描配置文件并为各组件标记状态,也可通过详细模式显示检查信息。
主要功能
- 01检测项目类型与标准版本
- 02扫描多类基础设施配置
- 03按组件判定合规状态
- 04生成合规状态报告
- 05支持详细只读检查
适用场景
- 01快速查看项目标准合规情况
- 02在 CI/CD 中验证配置状态
- 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 步:检测项目类型
- 如果
.project-standards.yaml存在,则读取该文件(显示跟踪的版本和上次配置日期) - 根据文件结构自动检测项目类型
- 如果检测到的类型与跟踪的类型不同,则报告差异
第 2 步:扫描配置文件
检查每项配置是否存在且有效:
| 组件 | 检查的文件 |
|---|---|
| Pre-commit | .pre-commit-config.yaml |
| Release-please | release-please-config.json、.release-please-manifest.json、.github/workflows/release-please.yml |
| Dockerfile | Dockerfile、Dockerfile.* |
| Skaffold | skaffold.yaml |
| CI 工作流 | .github/workflows/*.yml |
| Helm | helm/*/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 |
| Lint | biome.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