跳到正文
cccskills
免费在 GitHub 公开中文介绍

principle-encode-lessons-in-structure

将反复出现的纠正和提醒转化为代码静态检查、运行时检查或自动化脚本等防错机制,并将经验落实为具体修改或待办任务,防止同类错误再次发生。

原文查看原文说明

Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.

AI 评分90分/ 100查看安装方法

适用场景

  • 防止同类实现错误反复出现
  • 将重复指示转为自动检查
  • 把纠正内容整理为笔记或规则
  • 明确需要判断的指示

中文介绍

功能

将反复出现的纠正和提醒,从文字指示转化为防止错误的机制。可选方式包括静态检查代码问题的 lint 规则、元数据标记、运行时检查和自动化脚本。如果有多种可行方法,会选择当前情境下最能防止错误的方法。

适用场景

适合在第二次写下同一条提醒,或反复收到他人相同指正时使用。它会判断修正和测试失败是偶发事件还是重复问题,再按影响范围整理为笔记、技能或 lint 规则,以及涉及整体的原则。记录之后,还会立即落实修改,或留下明确的待办任务。

使用示例

  • “针对这个反复指出的错误,想一个能自动检查并防止再犯的方法。”
  • “回顾这次修改,整理出可以形成通用规则的内容。”
  • “给无法自动化的提醒补上失败示例,让要求更清楚。”

注意事项

需要判断的内容未必能转化为防错机制。遇到这种情况,会让指示更醒目,并补充失败示例。如果可以通过机制解决,则只保留该机制,删除重复的文字指示。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好以第二次写下相同指示为触发场景,明确要求改用检查或脚本。
步骤具体性步骤、输入输出和示例是否具体
B部分不足提供判断和分类步骤,但没有检查机制的实现示例或输出格式。
安全性发送数据、删除文件、执行命令等是否有说明
A良好删除对象限于已由机制替代的指示,未要求外部发送或读取凭据。
安装难易度所需工具和 API 密钥是否少且有说明
A良好未将特定工具安装、API 密钥或服务订阅列为前提。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月21日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(2)

  • SKILL.md2.2 KB
  • LICENSE1.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Encode Lessons in Structure

Encode recurring fixes in mechanisms (tools, code, metadata, automation) instead of textual instructions. Every error, human correction, and unexpected outcome is a learning signal. Capture it, route it, and close the loop.

Why: Textual instructions are easy to miss. They require the reader to notice, remember, and comply. Structural mechanisms (lint rules, metadata flags, runtime checks, automation scripts) enforce the rule without cooperation.

Pattern: When you catch yourself writing the same instruction a second time:

  1. Ask: can this be a lint rule, a metadata flag, a runtime check, or a script?
  2. If yes, encode it. Delete the instruction
  3. If no (requires judgment), make the instruction more prominent and add an example of the failure mode

Pick the strongest mechanism. When more than one mechanism would work, choose the strongest the situation allows (an unrepresentable state that cannot compile, then a lint or banned API that fails CI, then a canonical helper, then a runtime check), because agents copy whatever the surrounding code already does and a weaker guard becomes the next template.

Corollary: If the fix is structural, only use the structural fix. The instruction is the symptom.

Feedback loop:

  • Capture every correction. When the human intervenes or tests fail, decide if it's a one-off or a pattern.
  • Route to the right layer. One-off -> brain note. Recurring fix -> skill or lint rule. Systemic issue -> principle.
  • Close the loop. Don't just record. Apply now or create a concrete todo.

Anti-patterns:

  • Acknowledging without recording ("I'll keep that in mind" does not persist)
  • Recording without routing (a brain note about a lint rule that should exist is wasted unless the lint rule gets implemented)
  • Fixing without generalizing (fixing one instance while leaving the recurring pattern intact)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

canary

免费有简介AI 评分 80分

查找Storybook指定分支的试验版软件包,必要时执行发布流程,跟踪发布状态,并提供用于新建项目或更新现有项目的命令。

  • 查找指定分支的试验版
  • 发布来自派生仓库的拉取请求试验版
  • 确认发布状态与安装命令
storybookjs/storybook9.1万2026年10月21日 更新

component-docs

免费有简介AI 评分 90分

通过Storybook查询项目现有界面组件、配置参数和使用示例,用于回答组件用法问题,并在重复实现前判断能否复用现有组件。

  • 查找现有界面组件
  • 查看组件配置参数和使用示例
  • 询问组件用法
storybookjs/storybook9.1万2026年10月21日 更新

docs-review

免费有简介AI 评分 90分

根据读者和页面目的,审核、改进或新写Storybook的/docs文档。既可调整结构和示例、统一格式,也可讨论页面定位与文档规划。

  • 改进说明页面的结构和示例
  • 起草新功能文档
  • 讨论页面类型和目录
storybookjs/storybook9.1万2026年10月21日 更新

fix-linting-types-on-pr

免费有简介AI 评分 80分

检出GitHub的PR,修复lint代码规范问题和TypeScript类型错误,完成提交与推送。支持来自分支仓库的PR,并通过重复类型检查验证修复。

  • 修复PR中的lint错误
  • 修复PR中的TypeScript错误
  • 修复来自分支仓库的PR
storybookjs/storybook9.1万2026年10月21日 更新

github-qa-labels

免费有简介AI 评分 80分

为QA测试发现的GitHub Issue和PR添加发布版本追踪标签,并按影响程度与变通方案为漏洞分类。支持批量添加标签,严重程度标签仅用于程序缺陷。

  • 按发布版本整理QA发现的问题
  • 划分程序缺陷的严重程度
  • 批量为Issue和PR添加标签
storybookjs/storybook9.1万2026年10月21日 更新

handle-pr-comments

免费有简介AI 评分 90分

逐条整理 GitHub 拉取请求中尚未解决的审查意见,说明问题并提出修改方案,再按用户选择修改代码、回复或跳过,处理提交及将讨论标为已解决。

  • 处理 PR 中未解决的审查意见
  • 选择修改、回复或跳过
  • 合并处理重复审查意见
storybookjs/storybook9.1万2026年10月21日 更新

查看 storybookjs 的全部技能

报告此技能的问题