跳到正文
Skillpedia
智能体40k · #7037

acreadiness-policy

它能做什么

这个工具可以帮你创建并应用自定义规则,用来评估代码质量。你可以设定哪些检查项很重要、哪些要忽略,以及最低可接受的分数。

适用场景

  • ✓想忽略某些质量检查项时。
  • ✓想设定一个最低分数来批准代码时。
  • ✓想在整个组织中统一质量规则时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/acreadiness-policy/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/acreadiness-policy/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何创建一条规则,忽略“documentation”检查项,并将“readme”的重要性设为高?”

每周 5 个新技能,1 分钟读完。

工作原理

你需要创建一个 JSON 格式的配置文件,指定要忽略哪些部分,以及要加重哪些部分的权重。然后应用这条规则来评估你的代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

/acreadiness-policy — AgentRC policies

Use this skill when the user asks about policies, strict mode, custom scoring, disabling checks, org standards, or CI gating of readiness.

A policy is a small JSON file with three optional sections — criteria, extras, thresholds — that customise how AgentRC scores readiness.

Built-in examples

AgentRC ships with three example policies in examples/policies/:

Policy What it does
strict.json 100% pass rate, raises impact on key criteria
ai-only.json Disables all repo-health checks, focuses on AI tooling
repo-health-only.json Disables AI checks, focuses on traditional quality

Recommend these as starting points before writing a custom policy.

Policy schema

{
  "name": "my-policy",
  "criteria": {
    "disable":  ["env-example", "observability", "dependabot"],
    "override": {
      "readme":      { "impact": "high", "level": 2 },
      "lint-config": { "title": "Linter required" }
    }
  },
  "extras": {
    "disable": ["pre-commit"]
  },
  "thresholds": {
    "passRate": 0.9
  }
}

Impact weights

Impact Weight
critical 5
high 4
medium 3
low 2
info 0

Score = 1 − (deductions / max possible weight). Grades: A ≥ 0.9, B ≥ 0.8, C ≥ 0.7, D ≥ 0.6, F < 0.6.

Sub-commands

show

List policies currently in effect (from agentrc.config.json policies array, or none).

new <name>

Scaffold policies/<name>.json with sensible defaults. Walk the user through:

  1. What to disable — irrelevant pillars or extras for their stack (e.g. disable observability for a static site).
  2. What to raise — override impact to high or critical for must-haves (e.g. readme, codeowners).
  3. Pass-rate threshold — typical org baselines: 0.7 (lenient), 0.85 (standard), 1.0 (strict).
  4. Reference the policy from agentrc.config.json:
    { "policies": ["./policies/<name>.json"] }
    

apply <path-or-pkg>

Run agentrc readiness --json --policy <source> and re-render the report by handing off to the assess skill / ai-readiness-reporter agent. Supports chaining:

npx -y github:microsoft/agentrc readiness --json --policy ./org-baseline.json,./team-frontend.json

CI gating

Combine policies with --fail-level to enforce a minimum maturity level in CI:

- run: npx -y github:microsoft/agentrc readiness --policy ./policies/strict.json --fail-level 3

Advanced

JSON policies can disable, override, and set thresholds — but cannot add new criteria. For new detection logic, point users at AgentRC's TypeScript plugin system (docs/dev/plugins.md).

Operating rules

  • Never silently disable a pillar. If the user wants to disable observability, confirm and explain the trade-off.
  • Prefer overriding impact over disabling. Disabling hides the gap entirely; overriding lets it still appear in the report.
  • Recommend extras stay enabled. They cost nothing — they don't affect the score.
  • Suggest layering — most orgs want a baseline policy + per-team overrides chained with --policy a.json,b.json.
常见问题

什么是“策略”(policy)?

它是一个配置文件,用来自定义代码质量的衡量方式,你可以忽略某些检查,或调整它们的重要程度。

我可以创建自己的规则吗?

可以。你可以创建自定义的策略文件,以满足你特定的评估需求。

“禁用”和“覆盖影响权重”有什么区别?

禁用会把某个检查项完全移出评估。覆盖影响权重则会让该检查项在最终分数中占更大比重,但它仍会显示在报告中。

详情

作者的原始描述

Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7037
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能