Token导航 LogoToken导航

Agent Skill · 研究检索

bookforge-seam-type-selector(Bookforge 接缝类型选择器)

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

bookforge-seam-type-selector 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为调用外部服务;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 39,939。

总安装 1,346周安装 55GitHub Stars 公开资料未说明下载 431核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:bookforge-seam-type-selector(Bookforge 接缝类型选择器)
来源仓库:https://github.com/quochungto/bookforge-seam-type-selector
安装命令:
openclaw skills install bookforge-seam-type-selector
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install bookforge-seam-type-selector

这个 Skill 是做什么的

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

用于查找、检索和筛选相关信息,适合在 OpenClaw 中快速定位候选结果。适用于选择正确的接缝类型(预处理器/链接/对象)以打破遗留代码依赖。可结合来源仓库和原始 README 核验具体用法,辅助代码解耦与维护。安装前需确认权限范围、维护状态,注意是否会触发联网、命令执行或文件读写。

建议在使用前评估技能的实际输出边界,避免依赖其直接决策。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install bookforge-seam-type-selector;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

bookforge-seam-type-selector 怎么安装?

在终端执行 openclaw skills install bookforge-seam-type-selector。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

bookforge-seam-type-selector 支持哪些 AI 工具?

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

bookforge-seam-type-selector 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

bookforge-seam-type-selector 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

bookforge-seam-type-selector 用的人多吗?

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

bookforge-seam-type-selector 安全吗?

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

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

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
bookforge-seam-type-selector

Bookforge 接缝类型选择器 · 本页

1,346—调用外部服务MIT-0通过

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

SKILL.md 原文

name
seam-type-selector
description
Select the right seam type (Preprocessor / Link / Object) for breaking a dependency in legacy code. Use whenever a developer needs to substitute behavior for testing without editing in place, is choosing between dependency-injection strategies in an existing codebase, or asks 'how do I intercept this call in a test' / 'how do I fake this library' / 'how do I test around this hard-coded dependency'. Activates for 'seam', 'test seam', 'substitution point', 'dependency injection for legacy code', 'mock this without DI framework', 'C++ testing', 'linker-level fake', 'preprocessor substitution', 'polymorphic substitution', 'enabling point'.
version
1.0.0
homepage
https://github.com/bookforge-ai/bookforge-skills/tree/main/books/working-effectively-with-legacy-code/skills/seam-type-selector
metadata
{"openclaw":{"emoji":"📚","homepage":"https://github.com/bookforge-ai/bookforge-skills"}}
status
draft
source-books
title
Working Effectively with Legacy Code
authors
["Michael C. Feathers"]
chapters
[4]
domain
software-engineering
tags
[legacy-code, refactoring, testing, software-engineering, dependency-injection]
depends-on
[]
execution
tier
1
mode
hybrid
inputs
description
Source file containing the dependency to break + language + description of what needs to be substituted
tools-required
[Read, Grep]
tools-optional
[Edit]
mcps-required
[]
environment
A codebase in any language. Seam availability depends on language capabilities.
discovery
goal
Recommend the right seam type for a specific testing or substitution scenario.
tasks
audience
roles
[software-engineer, backend-developer, senior-developer]
experience
intermediate
when_to_use
triggers
prerequisites
[]
not_for
environment
codebase_required
true
codebase_helpful
true
works_offline
true
quality
scores
{with_skill: null, baseline: null, delta: null}
tested_at
null
eval_count
null
assertion_count
10
iterations_needed
null

Seam Type Selector

When to Use

Use this skill when a developer needs to substitute or intercept behavior in legacy code for testing, but cannot freely edit the code under test. Specifically:

  • The code has a hard-coded dependency (global function, library call, concrete class instantiation) that prevents running it in a test harness.
  • The developer asks: "How do I fake this?", "How do I test around this global?", "How do I intercept this call without a DI framework?", or "What's the right way to introduce a test double here?"
  • The developer is choosing between approaches (subclass override vs. classpath swap vs. macro replacement) and needs a principled recommendation.

Do not use for greenfield code where a dependency injection framework is already in place — the framework already manages enabling points.


Context and Input Gathering

Before recommending a seam type, gather:

  1. Language — Is this C or C++ (preprocessor available)? A compiled OO language like Java or C# (link and object seams)? A dynamic OO language like Python or Ruby (object seams, plus text redefinition)?
  2. Dependency type — What exactly needs to be substituted? Options: global function, static method, constructor call, third-party library, concrete class member.
  3. Pervasiveness — Is this dependency called in one or two places, or scattered across dozens of files and hundreds of call sites?
  4. Risk tolerance — Is modifying production class structure (adding a virtual method, adding a constructor parameter) acceptable? Some teams forbid structural changes to classes under test without prior test coverage.

Process

Step 1: Confirm a seam exists

A seam (Feathers' formal definition) is "a place where you can alter behavior in your program without editing in that place." Verify the target call site qualifies:

  • You want to substitute the behavior that runs at call site X.
  • You can make the substitution without modifying the source text at X itself.
  • There is an enabling point — a separate place where you decide which behavior to use.

If no enabling point can be identified, there is no seam. You will need to introduce one first (see dependency-breaking-technique-executor).

Step 2: Classify the dependency

ClassificationCharacteristicExamples
Localized1–5 call sites, within one class or moduleOne new DatabaseConnection() in a constructor
PervasiveMany call sites, spread across files50+ calls to getenv() throughout a C codebase; all files import a logging singleton

Pervasiveness is the primary override condition. If a dependency is pervasive, the cost of introducing object seams at every site may exceed the cost of a single link- or preprocessor-level substitution.

Step 3: Assess language capabilities

LanguagePreprocessor SeamLink SeamObject Seam
CYes (#define, #ifdef)Yes (object file swap)No (procedural)
C++YesYesYes
Java, KotlinNoYes (classpath)Yes
C#NoYes (assembly)Yes
Python, RubyNoLimitedYes (duck typing)
GoNoLimitedYes (interfaces)
TypeScript/JSNoLimited (module mock)Yes

Step 4: Apply the selection rule

Feathers states: "In general, object seams are the best choice in object-oriented languages. Preprocessing seams and link seams can be useful at times but they are not as explicit as object seams. Tests that depend on them can be hard to maintain. Reserve preprocessing seams and link seams for cases where dependencies are pervasive and there are no better alternatives."

Decision hierarchy:

1. Is the language OO and the dependency localized?
   → Use Object Seam

2. Is the language OO but the dependency is pervasive (many call sites)?
   → Prefer Link Seam (keeps source changes minimal)
   → Fall back to Preprocessor Seam only in C/C++

3. Is the language procedural C/C++ and the dependency is pervasive?
   → Link Seam first; Preprocessor Seam if link is not feasible

4. Is the language procedural C/C++ and the dependency is localized?
   → Preprocessor Seam (only option available)

Step 5: Identify the enabling point

Every seam has an enabling point — name it explicitly. Future readers (and the developer implementing the seam) must know where to flip the switch.

Seam TypeWhere the Enabling Point Lives
Object SeamWhere the object is constructed or injected — a constructor, factory method, parameter, or setter
Link SeamThe build configuration — classpath entry, Makefile rule, linker flag, or IDE project setting
Preprocessor SeamA preprocessor define — #define TESTING, a -DTESTING compiler flag, or an #include of a test-override header

Step 6: Produce the recommendation artifact

Output a seam-recommendation.md (template in Outputs section) with: seam type, enabling point location, rationale, language note, and a list of compatible Part III techniques the developer can apply next.


Inputs

InputRequiredDescription
Source file(s)RequiredThe file(s) containing the dependency to break
LanguageRequiredProgramming language of the codebase
Dependency descriptionRequiredWhat call/class/library needs to be substituted
Pervasiveness assessmentRecommendedNumber of call sites; single file vs. codebase-wide
Risk constraintsOptionalWhether structural changes to production classes are allowed

Outputs

seam-recommendation.md

## Seam Recommendation: [dependency name]

**Chosen Seam Type:** [Object / Link / Preprocessor]

**Enabling Point:**
[Exact location — e.g., "The constructor of OrderProcessor (line 42 of OrderProcessor.java)"
or "The classpath entry resolving com.example.PaymentGateway"
or "The TESTING preprocessor define passed via -DTESTING in the Makefile"]

**Rationale:**
[1–3 sentences: why this seam type for this language, dependency type, and pervasiveness level]

**Language Applicability:**
[Confirm the seam is available in the target language; note if a fallback was chosen]

**Compatible Part III Techniques:**
- [Technique name] — [one-line explanation of how it exploits this seam]
- [Technique name] — ...

**Next step:** See `dependency-breaking-technique-executor` to apply the selected technique.

Key Principles

  1. Prefer object seams for maintainability. Object seams are explicit — the substitution is visible in the source code at the enabling point. Link and preprocessor seams substitute behavior invisibly; future readers see nothing unusual at the call site.
  1. Every seam has an enabling point — name it explicitly. A seam without a named enabling point is incomplete. The enabling point is where the developer acts; without naming it, the recommendation cannot be implemented.
  1. Pervasive dependencies may justify link or preprocessor seams. When a global function is called in 80 places across 20 files, introducing a virtual dispatch at each site is high-risk surgery. A single build-level substitution is safer than 80 structural edits.
  1. Seams make the substitution point visible to future readers. The goal is not just to make tests pass today — it is to leave the codebase in a state where the next engineer can understand which behavior is being substituted and why.

Examples

Example A: Java class with a hard-coded dependency (Object Seam)

Situation: A UserService class has a constructor that directly instantiates UserRepository, which opens a database connection. No DI framework. Need to test UserService.findActiveUsers() without a real database.

Classification: Localized (one constructor site). Language: Java (OO).

Recommendation: Object Seam.

Enabling point: The UserService constructor. Introduce a second constructor that accepts a UserRepository parameter (Parameterize Constructor technique). Tests pass in a fake implementation; production code calls the original constructor.

Compatible techniques: Parameterize Constructor, Extract Interface (extract IUserRepository), Subclass and Override Method.


Example B: C++ with pervasive global calls (Link Seam)

Situation: A legacy C++ codebase has 60+ calls to log_event() (a global that writes to a syslog daemon) scattered across 15 files. Running tests triggers syslog writes and slows everything down.

Classification: Pervasive. Language: C++ (compiled, OO).

Recommendation: Link Seam.

Enabling point: The Makefile's link step. Create a test_log_event.o object file with a stub log_event() that records calls in memory. Swap it in via the Makefile for test builds. Source files are untouched.

Compatible techniques: Link-level substitution (Ch 19 procedural pattern), Encapsulate Global References (if later migration to OO is planned).


Example C: Legacy C with pervasive global calls (Preprocessor Seam)

Situation: A C codebase calls db_update(account_no, record) in 40 places across 8 files. There is no OO structure and no link-time substitution capability in the build environment.

Classification: Pervasive. Language: C (procedural — no object seam available).

Recommendation: Preprocessor Seam.

Enabling point: A #define TESTING flag passed to the C compiler (e.g., gcc -DTESTING). A localdefs.h header, included in each source file, defines a macro replacement for db_update under #ifdef TESTING that captures arguments without hitting the database.

Compatible techniques: Text Redefinition (C/C++ specific), C macro preprocessor pattern (Ch 19).


References

See references/seam-type-comparison.md for a full comparison matrix of all three seam types across language families, enabling point locations, and compatible Chapter 25 techniques.


License

CC-BY-SA-4.0 — derived from *Working Effectively with Legacy Code* by Michael C. Feathers (2004).


Related BookForge Skills

  • dependency-breaking-technique-executor — Takes a seam recommendation and applies a specific Chapter 25 technique step-by-step. This skill feeds directly into it.
  • legacy-code-change-algorithm — The outer 6-step procedure. Seam identification is Step 3 of that algorithm; use this skill to complete it.
  • library-seam-wrapper — Applies the link seam pattern specifically to third-party library dependencies, wrapping them in an interface.

平台分布

OpenClaw

92%
按下载量换算397

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

继续浏览同类 Skills