360 Secure SkillHub
360 安全技能中心

principle-encode-lessons-in-structure

该 Skill 是一条工程实践原则:当同一指令被重复书写或同类纠正反复出现时,应优先把规则固化为结构化约束,如 lint、元数据标记、运行时检查或脚本;仅当规则依赖判断、无法结构化时,才强化文字说明并补充失败示例。

cursor
热度 0.00
最近更新 2026-10-18 16:52:28
分类:开发依赖:纯提示词应用场景:工作流 / 代码审查

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cursor/plugins/principle-encode-lessons-in-structure
Metadata
name
principle-encode-lessons-in-structure
description
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.
disable-model-invocation
true

Encode Lessons in Structure

If the lesson needs judgment and cannot be encoded, make the instruction more prominent and add an example of the failure mode.

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