Adonis0123/adonis-skills / skills/code-plugin-architecture
code-plugin-architecture
VerifiedDesign, review, refactor, or explain recurring extension mechanisms when adding or removing one variant requires scattered coordinated edits. Use for plugin architecture, registries, extension points, and cross-stack contract/host mappings. Assess whether a typed map, existing framework mechanism, or lifecycle-owning core is justified. Skip one plugin's internal styling or bugs, user signup, DI containers, and package registries.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.8 KB |
| evals/evals.json | config | 14.9 KB |
| evals/trigger-eval.json | config | 7.2 KB |
| references/anti-patterns.md | markdown | 4.0 KB |
| references/case-studies.md | markdown | 18.2 KB |
| references/cross-stack.md | markdown | 5.0 KB |
| references/first-principles.md | markdown | 4.1 KB |
| references/governance.md | markdown | 1.7 KB |
| references/stateful-runtime.md | markdown | 4.3 KB |
references/governance.md
View on GitHub# 插件治理
跨团队发布、第三方插件或已存在版本兼容要求时读本页。内部同步函数表不因“插件”这个名字增加版本协议、远程开关和权限系统。
## 契约演进
保留已发布 key、能力、失败和副作用语义。可选字段只有在明确默认值保持兼容时才有帮助;不把不兼容语义变化藏在旧字段名里。按实际版本共存需求选择能力探测、adapter 或明确版本契约,避免为尚不存在的未来版本预付兼容层。
## 权限与隔离
插件只能获得当前工作所需的能力,host 决定是否授予。类型契约和依赖注入不构成不可信代码沙箱;同进程原生代码、动态加载或外部工具调用须有真实的信任与隔离设计。沿用宿主已有权限,不把安装或发现插件当作执行其所有动作的授权。
## 失败策略
确认加载、初始化、调用、禁用与卸载失败的结果。按已定产品契约选择报错、跳过或降级;不能默默切换到另一个有不同业务语义的插件。初始化半失败也要释放已取得资源。远程杀开关只在已有运维需求下采用;不为所有本地机制默认建设。
## 验证层次
- 单插件测试覆盖它自己的业务条件和输出,按实际风险选择。
- 参数化契约测试覆盖已承诺的公共能力、错误语义与兼容性;不要求每项都有 UI、lazy loader 或统一目录。
- 机制测试使用假插件覆盖真正共享的调度、失败、资源清理与上下文隔离,避免跟具体业务插件名单绑定。
复用已有验证。测试通过不证明未执行的第三方安装、运行时权限或真实 UI 路径;缺少这些证据时明确范围和 `UNVERIFIED`。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |