Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

abstraction-quality抽象质量

Agent Skill

abstraction-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

225

周安装

9

GitHub Stars

4

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:abstraction-quality(抽象质量)
来源仓库:https://github.com/codybrom/clairvoyance
仓库路径:skills/abstraction-quality
安装命令:
npx skills add https://github.com/codybrom/clairvoyance --skill abstraction-quality
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/codybrom/clairvoyance --skill abstraction-quality

简介

用于评估代码抽象质量,识别真实与虚假抽象。

  • 适用于类层次结构、装饰器模式或架构分层场景。
  • 调用时指定文件路径,按核心原则判断抽象是否有效。
  • 需确认目标代码上下文,避免误判设计意图。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • abstraction-quality 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Abstraction Quality Review Lens

When invoked with $ARGUMENTS, focus the analysis on the specified file or module. Read the target code first, then apply the checks below.

Evaluate whether abstractions are genuine (hiding complexity) or false (adding layers without reducing what callers must know).

When to Apply

  • Reviewing class hierarchies or layered architectures
  • When an abstraction feels like it adds complexity rather than reducing it
  • When decorator or wrapper patterns are used
  • When two layers seem to operate at the same level of abstraction

Core Principles

Genuine vs. False Abstraction Test

Can callers forget what's underneath? If yes, it's genuine. If callers must peek through to use it correctly, it's false.

Two Ways Abstractions Fail

  • Including unimportant details: The interface leaks implementation concerns. Shows up as wide interfaces, excessive parameters. More common, at least visible.
  • Omitting important details: The interface hides something callers need. More dangerous because it signals nothing. The abstraction appears clean, inviting trust it doesn't deserve.

A file system can safely hide which disk blocks store data. It cannot hide flush rules for durable storage. Databases depend on that guarantee.

Different Layer, Different Abstraction

Each layer should provide a fundamentally different way of thinking about the problem. If two adjacent layers have similar methods, similar parameters, similar concepts, the layering adds cost without value.

Check: compare the interface of each layer. Are they at different conceptual levels? Or is one just a thin rephrasing of the other?

Decorator Pattern Trap

Decorators are structurally committed to shallowness. A decorator that adds one behavior to a class with twenty methods has nineteen pass-throughs and one meaningful method.

Four alternatives before creating a decorator:

  1. Add the functionality directly to the underlying class
  2. Merge with the use case
  3. Merge with an existing decorator
  4. Implement as a standalone class

Ask whether the new functionality really needs to wrap the existing functionality. If not, implement it independently.

Resolving False Abstractions

When a false abstraction is detected:

  1. Redistribute: Move functionality between layers so each has a distinct, coherent responsibility
  2. Merge: Combine adjacent layers into one deeper layer
  3. Expose: Remove the abstraction. Let callers use the underlying layer directly

Review Process

  1. Map layers: Identify the abstraction layers under review
  2. Compare adjacent layers: Do they provide different mental models?
  3. Test each abstraction: Can callers forget what's underneath?
  4. Audit decorators/wrappers: Adding depth or just adding a layer?
  5. Check pass-throughs: Any methods or variables that just forward without contributing? (See deep-modules for pass-through audits, interface-vs-implementation checks, and when signature duplication is legitimate.)
  6. Resolve: Redistribute, merge, or expose

Relationship to Other Lenses

This skill asks "is the abstraction genuine?": does each layer provide a different way of thinking? deep-modules asks the follow-up: "is the module deep enough?": does the interface justify what's behind it? A layer can provide a genuinely different abstraction and still be shallow. Use this skill first to evaluate layer structure, then deep-modules to evaluate depth within each layer.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.1%
按下载量换算25

Claude

31.82%
按下载量换算23

Cursor

21.32%
按下载量换算16

Gemini CLI

9.44%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills