Token导航 LogoToken导航

Agent Skill · 研究检索

minimal-abstractions(最小抽象)

minimal-abstractions 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

minimal-abstractions 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 68,884。

总安装 222周安装 9GitHub Stars 1下载 70核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill minimal-abstractions

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

minimal-abstractions 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。适用于抽象概念梳理、技术方案调研或知识体系构建等研究类任务。

通过安装命令添加后,可结合来源仓库和 README 文档进一步了解具体用法。安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/minimal-abstractions

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dawiddutoit/custom-claude --skill minimal-abst…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

minimal-abstractions 怎么安装?

在终端执行 npx skills add https://github.com/dawiddutoit/custom-claude --skill minimal-abstractions。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

minimal-abstractions 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

minimal-abstractions 需要什么权限?

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

minimal-abstractions 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

minimal-abstractions 用的人多吗?

公开数据是累计安装 222 次,近一周安装 9 次,下载 70 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

minimal-abstractions 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
minimal-abstractions

最小抽象 · 本页

2221只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Minimal Abstractions

Quick Start

Before adding a new abstraction (interface, abstract class, wrapper, layer), ask:

  1. Does a similar abstraction already exist in this project?
  2. Are there 2+ concrete use cases requiring this abstraction RIGHT NOW?
  3. Is the complexity cost justified by actual flexibility needs?

If any answer is "no" or "maybe" → Don't add it. Use the simplest solution that works.

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Core Philosophy
  4. Abstraction Evaluation Checklist
  5. Detection Patterns (Red Flags)
  6. Examples: Good vs Over-Engineered
  7. Integration with Architecture Validation
  8. Expected Outcomes
  9. Red Flags to Avoid

When to Use This Skill

Explicit Triggers (User asks):

  • "Is this abstraction necessary?"
  • "Are we over-engineering this?"
  • "Too many layers in this code"
  • "Simplify this architecture"
  • "Reduce complexity"
  • "Do we need this interface/wrapper/layer?"
  • "Should we use [design pattern]?"

Implicit Triggers (Autonomous invocation):

  • Reviewing pull requests with new interfaces/abstract classes
  • Architecture proposals introducing new layers
  • Code reviews where new patterns are introduced
  • Refactoring tasks aimed at simplification
  • When a new abstraction is proposed and only one implementation exists

Debugging/Problem Triggers:

  • Maintenance burden is high due to abstraction complexity
  • Team members confused by excessive indirection
  • Tests are difficult to write due to layering
  • Simple changes require touching multiple abstraction layers

What This Skill Does

This skill provides a systematic framework for:

  • Evaluating whether new abstractions are warranted
  • Detecting over-engineering and unnecessary complexity
  • Guiding developers to use existing project abstractions
  • Preventing abstraction proliferation
  • Simplifying code by removing unneeded layers

Instructions

When evaluating an abstraction:

  1. Search for existing abstractions - Use Grep/Read to find similar patterns in codebase
  2. Apply the evaluation checklist - Run through all 5 questions in section 4
  3. Check for red flags - Scan code for patterns in section 5
  4. Recommend simpler alternative - Provide concrete code example
  5. Document decision - Explain why abstraction is/isn't needed

Core Philosophy

The Abstraction Principle

Abstractions are not free - every interface, wrapper, layer, or pattern adds:

  • Cognitive load (developers must understand the abstraction)
  • Maintenance burden (more code to test, debug, refactor)
  • Indirection cost (harder to trace execution flow)
  • Rigidity (abstractions create assumptions that resist change)

When abstractions ARE valuable:

  • Multiple concrete implementations exist or are planned imminently
  • Decoupling is critical (e.g., domain from infrastructure in Clean Architecture)
  • Testability requires dependency injection
  • Third-party integrations need isolation

When abstractions are NOT valuable:

  • "We might need it someday" (YAGNI - You Aren't Gonna Need It)
  • "It's a best practice" (without understanding why)
  • Only one implementation exists and no others are planned
  • Wrapping for wrapping's sake

Prefer Existing Abstractions

Before creating a new abstraction:

  1. Search the codebase for similar patterns
  2. Extend or adapt existing abstractions
  3. Reuse project-standard patterns (e.g., Repository, Service, Handler)
  4. Only create new abstractions when existing ones truly don't fit

Abstraction Evaluation Checklist

Use this checklist before adding ANY new abstraction (interface, abstract class, wrapper, layer):

Question 1: Does this abstraction already exist?

  • Searched codebase for similar interfaces/abstractions
  • Checked project architecture docs for standard patterns
  • Reviewed existing layers (domain, application, infrastructure)
  • Considered extending existing abstractions instead

Action: If similar abstraction exists → Use it. Don't create a new one.

Question 2: Do we have 2+ concrete implementations RIGHT NOW?

  • Count current implementations (not hypothetical future ones)
  • Verify implementations are actually different (not just copy-paste)
  • Check if "multiple implementations" are really needed

Action: If <2 implementations → Skip the abstraction. Use concrete implementation directly.

Question 3: Is there a concrete business/technical requirement?

  • Can you name the specific requirement driving this abstraction?
  • Is the requirement current (not speculative)?
  • Would removing this abstraction make the code harder to maintain?

Action: If requirement is speculative → Don't build it yet. Wait for actual need.

Question 4: What is the complexity cost?

  • Count files touched to add this abstraction
  • Estimate lines of code added (interface + implementations + tests)
  • Consider cognitive load for new team members
  • Evaluate impact on debugging and tracing

Action: If cost > benefit → Simplify. Use direct solution.

Question 5: Can we solve this with simpler patterns?

  • Would a simple function work instead of an interface?
  • Could dependency injection handle this without abstraction?
  • Is this trying to solve a problem we don't have?

Action: If simpler solution exists → Use it.

Detection Patterns (Red Flags)

Red Flag 1: Lonely Interface

# ❌ Over-engineered: Interface with only one implementation
class DataProcessor(Protocol):
    def process(self, data: dict) -> dict: ...

class JsonDataProcessor:  # Only implementation
    def process(self, data: dict) -> dict:
        return transform_json(data)

Why it's a red flag: No actual polymorphism. The interface adds indirection without benefit.

Better approach:

# ✅ Simple: Direct implementation
def process_json_data(data: dict) -> dict:
    return transform_json(data)

Red Flag 2: Wrapper with No Value

# ❌ Over-engineered: Wrapper that just forwards calls
class DatabaseWrapper:
    def __init__(self, db: Database):
        self._db = db

    def query(self, sql: str) -> list:
        return self._db.query(sql)  # Just forwarding

Why it's a red flag: No transformation, validation, or added behavior. Pure indirection.

Better approach: Use the database directly or add actual value (caching, retry, validation).

Red Flag 3: Layer for Layer's Sake

# ❌ Over-engineered: Unnecessary service layer
class UserRepository:  # Already exists
    def get_user(self, id: int) -> User: ...

class UserService:  # Adds nothing
    def __init__(self, repo: UserRepository):
        self.repo = repo

    def get_user(self, id: int) -> User:
        return self.repo.get_user(id)  # Just forwarding

Why it's a red flag: Service layer adds no business logic, validation, or orchestration.

Better approach: Use repository directly until business logic is needed.

Red Flag 4: Pattern for Pattern's Sake

# ❌ Over-engineered: Factory for single type
class UserFactory:
    @staticmethod
    def create_user(name: str, email: str) -> User:
        return User(name=name, email=email)

Why it's a red flag: Factory pattern used without variation or complexity justification.

Better approach:

# ✅ Simple: Direct construction
user = User(name="Alice", email="alice@example.com")

Red Flag 5: Premature Generalization

# ❌ Over-engineered: Generic solution for specific problem
class ConfigLoader(Generic[T]):
    def load(self, source: str, parser: Parser[T]) -> T: ...

class JsonParser(Parser[dict]): ...
class YamlParser(Parser[dict]): ...

Why it's a red flag: Generic abstraction built before knowing actual requirements.

Better approach: Start with simple JSON config loader. Generalize when second format is needed.

Examples: Good vs Over-Engineered

Example 1: Repository Pattern

Over-Engineered:

# Unnecessary: Abstract repository + generic base + implementation
class Repository(Protocol, Generic[T]):
    def get(self, id: int) -> T: ...
    def save(self, entity: T) -> None: ...

class BaseRepository(Generic[T]):  # Generic base
    def validate(self, entity: T) -> bool: ...

class UserRepository(BaseRepository[User]):  # Concrete
    def get(self, id: int) -> User: ...
    def save(self, user: User) -> None: ...

Right-Sized:

# Clean Architecture: Protocol in domain, implementation in infrastructure
# domain/repositories.py
class UserRepository(Protocol):  # Interface for dependency inversion
    def get_user(self, id: int) -> User: ...
    def save_user(self, user: User) -> None: ...

# infrastructure/repositories.py
class SqlUserRepository:  # Concrete implementation
    def get_user(self, id: int) -> User: ...
    def save_user(self, user: User) -> None: ...

Example 2: Service Layer

Over-Engineered:

# Unnecessary: Service that just forwards to repository
class UserService:
    def __init__(self, repo: UserRepository):
        self.repo = repo

    def get_user(self, id: int) -> User:
        return self.repo.get_user(id)  # No business logic!

Right-Sized:

# Use repository directly until business logic emerges
class AuthenticationHandler:
    def __init__(self, user_repo: UserRepository):
        self.user_repo = user_repo

    def authenticate(self, email: str, password: str) -> Result[User, AuthError]:
        user = self.user_repo.get_user_by_email(email)
        if not user:
            return Err(AuthError.USER_NOT_FOUND)
        if not verify_password(password, user.password_hash):
            return Err(AuthError.INVALID_PASSWORD)
        return Ok(user)

Example 3: Reusing Existing Abstractions

Over-Engineered:

# Project already has Repository pattern
# Adding NEW abstraction for similar purpose:
class DataAccessLayer(Protocol):  # Duplicates Repository!
    def fetch(self, id: int) -> Entity: ...
    def persist(self, entity: Entity) -> None: ...

Right-Sized:

# Use existing Repository pattern
class ProductRepository(Protocol):  # Follows project convention
    def get_product(self, id: int) -> Product: ...
    def save_product(self, product: Product) -> None: ...

Integration with Architecture Validation

This skill complements existing architecture validation skills:

Use with:

  • architecture-validate-architecture - Check layer boundaries while avoiding unnecessary layers
  • architecture-validate-layer-boundaries - Ensure layers are necessary and well-justified
  • quality-code-review - Evaluate abstractions during PR review

Integration pattern:

  1. Run architecture validation to check existing patterns
  2. Use minimal-abstractions to evaluate NEW abstractions
  3. Ensure new code follows project patterns (don't reinvent)

Expected Outcomes

Successful Simplification

Before:

src/
├── domain/
│   ├── interfaces/user_repository.py
│   ├── interfaces/user_service.py
│   ├── interfaces/user_validator.py
├── application/
│   ├── services/user_service.py (forwards to repo)
│   ├── validators/user_validator.py (just calls validate())
├── infrastructure/
│   ├── repositories/user_repository.py

After (applying minimal-abstractions):

src/
├── domain/
│   ├── repositories.py (UserRepository protocol)
│   ├── models.py (User with validation)
├── application/
│   ├── handlers.py (CreateUserHandler with actual business logic)
├── infrastructure/
│   ├── repositories.py (SqlUserRepository)

Metrics:

  • 40% fewer files
  • 60% less indirection
  • Same functionality
  • Clearer execution paths

Validation Output

Abstraction Evaluation: ProductService

✅ Checklist Results:
  ❌ Does abstraction already exist? YES - Repository pattern exists
  ❌ 2+ implementations? NO - Only one service planned
  ❌ Concrete requirement? NO - "We might need microservices later"
  ⚠️  Complexity cost: +3 files, +200 LOC, +2 layers indirection
  ✅ Simpler solution exists? YES - Use repository + handler directly

Recommendation: SKIP THIS ABSTRACTION
  - Use existing ProductRepository
  - Add business logic to ProductHandler
  - Wait for concrete multi-service requirement before abstracting

Red Flags to Avoid

Anti-Patterns

  • ❌ "We might need it later" (YAGNI violation)
  • ❌ Creating interfaces with only one implementation
  • ❌ Wrappers that just forward calls without adding value
  • ❌ Service layers that add no business logic
  • ❌ Generic solutions for specific problems
  • ❌ Design patterns used without understanding why
  • ❌ Creating new abstractions when project patterns exist

Good Practices

  • ✅ Use existing project abstractions first
  • ✅ Wait for 2+ concrete implementations before abstracting
  • ✅ Justify every layer with concrete requirements
  • ✅ Prefer simple, direct solutions
  • ✅ Question every new abstraction
  • ✅ Measure complexity cost vs benefit
  • ✅ Remove abstractions when they're no longer needed

Notes

Key Principle: Every abstraction must justify its existence with concrete, current requirements - not hypothetical future needs.

Balance: This skill advocates for minimal abstractions, but respects architectural patterns when they provide real value (e.g., Clean Architecture's dependency inversion).

When in doubt: Start simple. Add abstractions when pain points emerge, not before.

平台分布

Codex

37.27%
按下载量换算26

Claude

29.86%
按下载量换算21

Cursor

16.19%
按下载量换算11

Gemini CLI

9.86%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

继续浏览同类 Skills