YYC3-i18n-Core: Skill for Claude Code

.trae/skills/diagnostic-driven-closure/SKILL.md

diagnostic-driven-closure is a skill for Claude Code, Codex from YYC-Cube/YYC3-i18n-Core. It costs 67 tokens per session (1,587 once invoked), scanned A, original, MIT.

An evidence-based workflow for fixing TypeScript, React, lint, audit, build, and CI errors. CI is the automated process that checks code after changes are made.

In plain words
What is it for?
Use it to resolve IDE diagnostics, dependency and lockfile failures, lint errors, type errors, test failures, or failed GitHub Actions runs.
Why use it?
It keeps the task limited to the reported diagnostics, fixes blocking errors first, and requires the original checks to pass again instead of relying on assumptions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is YYC-Cube/YYC3-i18n-Core's own configuration. It tells Claude Code and Codex how to work on YYC3-i18n-Core itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything YYC3-i18n-Core configures →

Reuse

Borrowing it

Nothing to install: this file belongs to YYC-Cube/YYC3-i18n-Core. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/YYC-Cube/YYC3-i18n-Core/main/.trae/skills/diagnostic-driven-closure/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/YYC-Cube/YYC3-i18n-Core

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnostic-driven-closure

README.md
[![agentmods](https://agentmods.dev/badge/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure/github.svg)](https://agentmods.dev/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure)
Your own site
<a href="https://agentmods.dev/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure"><img src="https://agentmods.dev/badge/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnostic-driven-closure

Your own site · 80×15
<a href="https://agentmods.dev/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure"><img src="https://agentmods.dev/badge/skills/yyc-cube/yyc3-i18n-core/diagnostic-driven-closure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,587 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01587
Opus 5.5 $0.00027 $0.00635
Sonnet 5 $0.00013 $0.00317
Haiku 4.5 $0.00007 $0.00159

Measured today against content hash 0948956b422d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-27, from the pricing page.

Security

Grade A, and why

diagnostic-driven-closure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.trae/skills/diagnostic-driven-closure/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

诊断驱动的最小补丁闭环 (Diagnostic-Driven Closure)

言启千行代码,语枢万物智能 —— 补丁任务只做"收敛",不做"扩散"。

何时触发

  • 用户给出 #problems:文件、IDE 诊断、ESLint/tsc 报错、pnpm audit、Dependabot、GitHub Actions 失败日志
  • 用户要求"修复报错/扫描问题/修复 CI 失败/闭环修复"
  • frozen-lockfile、模块解析、类型声明缺失等工程契约类阻断

核心铁律

  1. 原始诊断清单是唯一任务边界:先用 GetDiagnostics(逐文件)或 CI/audit 原文输出建表(文件:行:类型:文本),逐条闭环,禁止顺手重构、禁止"本地能跑"替代用户证据。
  2. 阻断项优先:模块解析失败 → tsconfig/依赖可见性闭包 → 类型不匹配 → 未使用变量。阻断项会制造连锁报错,先清警告是假进展。
  3. 最小差异:只读报错指向文件的 import/export 与符号定义,定点改片段;保持入口与导出名稳定;不新增依赖、不切换依赖策略,除非证据直指版本问题。
  4. 修后必复查归零:对每个原始文件重新 GetDiagnostics 确认 0,而不是凭推断宣称修复。
  5. 按 CI 实际命令本地复跑:pnpm install --frozen-lockfile → audit → tsc → eslint --max-warnings 0 → test:coverage → -r build;文档站进其目录独立 frozen + build。
  6. 推送不是终点:gh run list/view 观察 Actions 实证全绿;失败则取 --log-failed 原文进入下一轮,直到线上绿。
  7. 全程留痕:CHANGELOG [Unreleased] 按 🔒安全/🔧修复/🏗️构建与CI 分类记录根因与方案;提交信息含根因+验证矩阵。

标准流程

采集证据(诊断/CI日志) → 建清单 → 根因聚合(同源错误合并)
→ 阻断项排序 → 定点最小修复 → 诊断复查归零
→ CI 命令本地复跑 → CHANGELOG → 提交推送 → Actions 实证

根因聚合示例:多个"TSConfig does not include this file"解析错误 = 同一个 ESLint parserOptions.project 闭包问题,一次改 ignores,而非逐文件加注释。

本仓库已验证的陷阱速查(pnpm 11 + Node 22 + VitePress + GitHub Pages)

现象 根因 修法
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH (overrides) pnpm 9 不读 pnpm-workspace.yaml 的 overrides;锁文件由 pnpm 11 生成 工具链单一事实源:package.json packageManager: [email protected],全部工作流统一版本
No such builtin module: node:sqlite pnpm ≥10.6 要求 Node ≥22.13 工作流 NODE_VERSION 22 LTS(publish/oidc 用 24)
子目录 frozen 安装串到根 workspace pnpm 向上探测父级 pnpm-workspace.yaml 独立工程(examples/docs)放自带 pnpm-workspace.yaml + 自带 pnpm-lock.yaml
ERR_PNPM_IGNORED_BUILDS (esbuild) pnpm 10+ 默认拦截构建脚本 workspace.yaml allowBuilds: { esbuild: true }
ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION 供应链 24h 冷却:锁文件含当天发布的包 查依赖链,override 钉到 24h 前的满足版本,注释写明冷却期满移除
require is not defined in ES module 根包 "type": "module" 下 .js 被当 ESM CJS 脚本改 .cjs(Node 报错原文即建议)
ESM file cannot be loaded by require (VitePress) docs 缺 "type": "module" docs/package.json 补字段
vite 打包 externalize timers/promises/crypto 浏览器端误用含 Node 内建的根入口 导入 @yyc3/i18n-core/browser 子路径
TSConfig does not include this file (ESLint) 根 project 仅含 src/,独立子工程被全局 lint eslint ignores 补 examples/**、scripts/**
VitePress dead links 阻断构建 规划中页面缺失(非本次补丁范围) ignoreDeadLinks: true + TODO 注释列出待补页面,内容补齐后移除
自定义域名 404 CNAME 文件与 Pages Settings 不一致 以平台 Settings(已验证域名/证书)为权威,CNAME 文件对齐

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 60 lines · 67 tokens per session scan A 0948956b422d

Subscribe to this mod's changes

diagnostic-driven-closure is a skill published in the GitHub repository YYC-Cube/YYC3-i18n-Core (0 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 1,587 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

Other skills, from other repositories