Coverage Reporting logo

Coverage Reporting

Community
zhaoxuya520
coverage-reporting

测试覆盖率收集和报告时使用。适用于覆盖率目标设定、CI 集成、PR 评论、趋势跟踪。

Overview

Publisherzhaoxuya520
RepositoryAI-Fullstack-Delivery-Workflow
Skill namecoverage-reporting
Stars
56
Forks
18
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by zhaoxuya520 on GitHub. Read the source before you install it.

Installation

Install the Coverage Reporting AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow/tree/master/workflows/automation-qa/skills/coverage-reporting
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow.git /tmp/AI-Fullstack-Delivery-Workflow
mkdir -p .claude/skills
cp -r /tmp/AI-Fullstack-Delivery-Workflow/workflows/automation-qa/skills/coverage-reporting .claude/skills/coverage-reporting
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Coverage Reporting in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Coverage Reporting on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Coverage Reporting is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

覆盖率报告(Coverage Reporting)

适用场景

  • 覆盖率目标设定
  • CI 覆盖率收集
  • PR 覆盖率评论
  • 覆盖率趋势跟踪
  • 覆盖率门禁

核心原则

text
1. 覆盖率是基线不是目标
   80% 覆盖率 ≠ 80% 质量

2. 关注增量覆盖率
   新代码 ≥ 80%,比总覆盖率更有意义

3. 不追求 100%
   getter / setter / 配置不需要测

4. 分层看
   业务逻辑 ≥ 90%
   Controller ≥ 60%
   工具函数 ≥ 80%

5. 趋势比绝对值重要
   覆盖率不能下降

工具

工具语言用途
Codecov多语言SaaS 报告 + PR 评论
Coveralls多语言SaaS 报告
SonarQube多语言自建 + 质量门禁
Istanbul / c8JS/TS收集器
JaCoCoJava收集器
coverage.pyPython收集器
go test -coverGo内置

覆盖率目标

层目标说明
Domain / Service≥ 90%核心业务
Controller≥ 60%集成测试覆盖
Utils≥ 80%工具函数
总体≥ 70%基线
增量(新代码)≥ 80%PR 门禁

CI 集成

yaml
# Vitest 覆盖率
- run: pnpm test:coverage
- uses: codecov/codecov-action@v4
  with:
    files: coverage/lcov.info
    fail_ci_if_error: true

# 门禁:覆盖率不能下降
- name: Coverage check
  run: |
    COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
    if (( $(echo "$COVERAGE < 70" | bc -l) )); then
      echo "Coverage below threshold: $COVERAGE%"
      exit 1
    fi

配套模板

  • templates/coverage-config-template.md — 覆盖率配置 + 目标 + CI

质量自检

text
□ 覆盖率目标设定
□ CI 自动收集
□ PR 评论(增量)
□ 门禁(不能下降)
□ 趋势跟踪
□ 分层目标
□ 不追求 100%

常见坑

  1. 追求 100%——测 getter 浪费时间
  2. 只看总覆盖率——新代码 0% 也能过
  3. 不设门禁——覆盖率持续下降
  4. 覆盖率 = 质量——覆盖了不等于测对了
  5. 不看趋势——单点数据无意义

与其他 skill 的协作

text
上游:
  unit/integration/e2e → 测试代码产生覆盖率

下游:
  ci-test-integration → CI 收集
  qa-engineer quality-gate → 门禁条件

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Coverage Reporting AI skill do?

测试覆盖率收集和报告时使用。适用于覆盖率目标设定、CI 集成、PR 评论、趋势跟踪。

Why use Coverage Reporting on TypingMind?

Because you install it once and use it with any model. Coverage Reporting is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Coverage Reporting in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zhaoxuya520/AI-Fullstack-Delivery-Workflow/tree/master/workflows/automation-qa/skills/coverage-reporting. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Coverage Reporting?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Coverage Reporting?

As many as you like. As long as a model supports skills, you can use Coverage Reporting with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Coverage Reporting AI skill free?

It is published on GitHub by zhaoxuya520. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇