acreadiness-policy
它能做什么
这个工具可以帮你创建并应用自定义规则,用来评估代码质量。你可以设定哪些检查项很重要、哪些要忽略,以及最低可接受的分数。
适用场景
- ✓想忽略某些质量检查项时。
- ✓想设定一个最低分数来批准代码时。
- ✓想在整个组织中统一质量规则时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/acreadiness-policy/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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:
- What to disable — irrelevant pillars or extras for their stack (e.g. disable
observabilityfor a static site). - What to raise — override
impacttohighorcriticalfor must-haves (e.g.readme,codeowners). - Pass-rate threshold — typical org baselines:
0.7(lenient),0.85(standard),1.0(strict). - 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
impactover 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
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
ad-campaign-analyzer
40k帮你的智能体分析广告投放数据。它能找出应该删减、加大投入或需要测试的内容,从而优化广告支出。