Agent Skillsb-editor/beutl › beutl-coverage

beutl-coverage

GitHub

生成 Beutl 代码覆盖率 HTML 报告,用于评估模块测试完备性。支持全解决方案或单项目范围,自动收集并合并覆盖率数据,确保本地与 CI 结果一致。

.claude/skills/beutl-coverage/SKILL.md b-editor/beutl

Trigger Scenarios

用户询问测试覆盖率情况 请求生成覆盖率报告 想知道某模块是否经过充分测试

Install

npx skills add b-editor/beutl --skill beutl-coverage -g -y
More Options

Non-standard path

npx skills add https://github.com/b-editor/beutl/tree/main/.claude/skills/beutl-coverage -g -y

Use without installing

npx skills use b-editor/beutl@beutl-coverage

指定 Agent (Claude Code)

npx skills add b-editor/beutl --skill beutl-coverage -a claude-code -g -y

安装 repo 全部 skill

npx skills add b-editor/beutl --all -g -y

预览 repo 内 skill

npx skills add b-editor/beutl --list

SKILL.md

Frontmatter
{
    "name": "beutl-coverage",
    "description": "Generate a code-coverage HTML report for Beutl, matching the CI workflow. Use when the user\nasks about test coverage, wants a coverage report, or wonders if a module is well-tested.\nTriggers on \"カバレッジ\", \"coverage report\", \"how much of X is covered?\". Always confirm\nthe measurement scope before running (full vs project).\n",
    "allowed-tools": "Bash(dotnet test:*) Bash(dotnet tool:*) Bash(reportgenerator:*) Bash(find:*)",
    "argument-hint": "[project-path]"
}

Generate Beutl coverage report

Coverage collection runs the whole test suite, which is slow (minutes). Always confirm scope with the user unless $ARGUMENTS is provided. Use AskUserQuestion with these defaults:

  • Scope: full solution (Beutl.slnx, matches CI) / a single test project (faster, narrower)
  • Output: HTML report at coveragereport/index.html (default)

Once scope is decided, run:

dotnet tool install -g dotnet-reportgenerator-globaltool 2>/dev/null || true

# Full solution (matches CI)
dotnet test Beutl.slnx --no-build --verbosity normal -f net10.0 \
  --collect:"XPlat Code Coverage" --settings coverlet.runsettings

# Or single project
# dotnet test <path/to/Tests.csproj> --no-build --verbosity normal -f net10.0 \
#   --collect:"XPlat Code Coverage" --settings coverlet.runsettings

# Every test project under tests/*/TestResults/<guid>/ writes its own coverage XML.
# Pass all of them to reportgenerator as a semicolon-joined list so the merged
# report covers the full solution (matching CI).
COBERTURA=$(find tests -type f -path '*/TestResults/*/coverage.cobertura.xml' 2>/dev/null | paste -sd ';' -)
if [ -z "$COBERTURA" ]; then
  echo "No coverage XML found. Run a build first."
  exit 1
fi

reportgenerator -reports:"$COBERTURA" -targetdir:coveragereport -reporttypes:Html
echo "Open coveragereport/index.html"

Notes

  • Mirrors .github/workflows/dotnet.yml so local and CI dashboards agree.
  • Coverage threshold lives in .github/workflows/dotnet.yml — do not lower it locally without changing CI.
  • Project layout: tests sit in tests/, source under src/.

After running

If coverage dropped versus the previous PR or branch, point to the specific module under src/ that lost coverage. Do NOT propose adding tests autonomously — surface the gap and ask the user how to proceed.

Version History

  • db01de7 Current 2026-08-20 13:43

Same Skill Collection

.claude/skills/beutl-agent-asset-sourcing/SKILL.md
.claude/skills/beutl-agent-brief-expansion/SKILL.md
.claude/skills/beutl-agent-look-effect-chain/SKILL.md
.claude/skills/beutl-agent-source-grounding/SKILL.md
.claude/skills/beutl-agent-timeline-from-shotlist/SKILL.md
.claude/skills/beutl-agent-visual-review/SKILL.md
.claude/skills/beutl-ai-self-review/SKILL.md
.claude/skills/beutl-board-task/SKILL.md
.claude/skills/beutl-build/SKILL.md
.claude/skills/beutl-drawable/SKILL.md
.claude/skills/beutl-filter-effect/SKILL.md
.claude/skills/beutl-format/SKILL.md
.claude/skills/beutl-pre-pr/SKILL.md
.claude/skills/beutl-test-project/SKILL.md
.claude/skills/beutl-test/SKILL.md
.claude/skills/beutl-tooltab-extension/SKILL.md
.claude/skills/speckit-analyze/SKILL.md
.claude/skills/speckit-checklist/SKILL.md
.claude/skills/speckit-clarify/SKILL.md
.claude/skills/speckit-constitution/SKILL.md
.claude/skills/speckit-git-branch/SKILL.md
.claude/skills/speckit-implement/SKILL.md
.claude/skills/speckit-plan/SKILL.md
.claude/skills/speckit-specify/SKILL.md
.claude/skills/speckit-tasks/SKILL.md
.claude/skills/speckit-taskstoissues/SKILL.md
.claude/skills/beutl-gpu-crash-repro/SKILL.md
.claude/skills/beutl-loop/SKILL.md
.claude/skills/beutl-resolve-reviews/SKILL.md
.claude/skills/speckit-git-commit/SKILL.md

Metadata

Files
0
Version
76df85a
Hash
5bf39db2
Indexed
2026-08-20 13:43

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 01:41
浙ICP备14020137号-1 $Гость$