Token导航 LogoToken导航

Agent Skill · 研究检索

bookforge-change-effect-analysis(Bookforge 变化效果分析)

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

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

总安装 3,205周安装 128GitHub Stars 公开资料未说明下载 1,198核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:bookforge-change-effect-analysis(Bookforge 变化效果分析)
来源仓库:https://github.com/quochungto/bookforge-change-effect-analysis
安装命令:
openclaw skills install bookforge-change-effect-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install bookforge-change-effect-analysis

这个 Skill 是做什么的

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

用于跟踪遗留代码更改的影响范围。生成包含夹点的测试布局计划。bookforge-change-effect-analysis 属于研究检索类 Skill,可作为该场景下的辅助能力补充。帮助开发人员决定安全修改位置。使用时需提供变更内容和原始代码库结构。建议结合版本历史和调用链分析结果。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

bookforge-change-effect-analysis 怎么安装?

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

bookforge-change-effect-analysis 支持哪些 AI 工具?

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

bookforge-change-effect-analysis 需要什么权限?

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

bookforge-change-effect-analysis 是免费的吗?

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

bookforge-change-effect-analysis 用的人多吗?

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

bookforge-change-effect-analysis 安全吗?

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

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

值得选的地方

  • 专注 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-change-effect-analysis

Bookforge 变化效果分析 · 本页

3,205—调用外部服务MIT-0通过

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

SKILL.md 原文

name
change-effect-analysis
description
Trace the blast radius of a legacy code change and produce a test placement plan with pinch points. Use whenever a developer needs to decide WHERE to write tests for a pending change — 'what should I test?', 'where to test?', 'how far do the effects propagate?', 'what else could this break?', 'how to find test points', 'pinch point', 'effect sketch', 'impact analysis', 'blast radius', 'interception point', 'high-leverage test'. Triggers for 'I need to make many changes', 'many classes affected', 'cluster of related changes', 'cross-class refactoring'.
version
1.0.0
homepage
https://github.com/bookforge-ai/bookforge-skills/tree/main/books/working-effectively-with-legacy-code/skills/change-effect-analysis
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
[11, 12]
domain
software-engineering
tags
[legacy-code, testing, refactoring, software-engineering, impact-analysis]
depends-on
execution
tier
2
mode
hybrid
inputs
description
Target method/class to change + the change description + accessible codebase for tracing
tools-required
[Read, Grep, Bash]
tools-optional
[Edit]
mcps-required
[]
environment
Codebase (any language). LSP or code navigation tools improve precision but Grep is sufficient.
discovery
goal
Produce a concrete test placement plan identifying pinch points and the minimal test set for a change.
tasks
audience
roles
[software-engineer, backend-developer, tech-lead]
experience
intermediate
when_to_use
triggers
prerequisites
why
This skill executes Step 2 (find test points) of the algorithm in depth
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
12
iterations_needed
null

Change Effect Analysis

When to Use

You are about to change a method or class in a legacy codebase and you need to decide where to write tests. Specifically:

  • You need to change a method and you're not sure which of its callers could break
  • Multiple related classes need coordinated changes and breaking all their dependencies individually would take days
  • Someone asks "what could this change affect?" and you need a systematic answer, not a guess
  • You are executing Step 2 (Find Test Points) of the legacy-code-change-algorithm and need a deeper procedure

This skill does not determine whether the change is safe to make. It determines where to place the tests that will make it safe.

Before executing this skill, confirm:

  1. You have at least one specific change point (method or class being changed) identified
  2. You have read access to the relevant source files
  3. You have a description of the change, even if approximate

Context & Input Gathering

Required Context (must have — ask if missing)

  • Change point: Which method(s) or class(es) will change?

-> Check prompt for: class names, method names, file paths -> If still missing, ask: "Which specific method or class needs to change?"

  • Change description: What is being modified and why?

-> If still missing, ask: "What should the code do differently after the change?"

  • Language and codebase access: What language? Can the files be read?

-> Check environment for: file extensions, project structure -> If unknown: proceed — the analysis is language-agnostic, though language-specific firewalls affect where you stop

Default Assumptions

  • No tests exist yet: The analysis works regardless of test coverage.
  • OO codebase: Default to tracing through instance variables, superclasses, subclasses, and callers. Adjust if procedural or functional language detected.
  • Globals exist until proven otherwise: Always execute the global/static trace (Step 4 below) even if the code looks clean.

Sufficiency Threshold

SUFFICIENT: Change point named + read access to files + change description available PROCEED WITH DEFAULTS: Change point named + rough file area identified MUST ASK: No change point at all — this analysis cannot begin without knowing what changes

Process

Step 1: Identify Change Points

ACTION: Locate the exact method(s) or variable(s) being modified. Record each as a change point entry.

WHY: Every downstream effect traces from a specific origin. Vague change points ("we're changing the billing area") produce incomplete effect sketches. Precise change points ("we're modifying Invoice.calculateShipping()") let you trace outward systematically.

HOW:

  1. Read the target file(s). Identify the specific method body that changes.
  2. If multiple methods change, list each one separately — they may produce independent effect paths that only converge at a pinch point.
  3. Note any instance variables the method reads or writes. These will feed Step 3.

ARTIFACT: Start effect-sketch.md:

## Change Points
- [ClassName.methodName] — what changes: [brief description]
- [ClassName.fieldName] — what changes: [brief description]

Step 2: Trace Mechanism 1 — Return Values

ACTION: For each change point that is a method, determine if it has a return value. If yes, trace who uses that return value.

WHY: Return values are the most visible propagation mechanism. When a method's return value changes, every caller that uses that value is affected — and each of those callers may propagate the effect further through their own return values.

HOW:

  1. Read the method signature. Does it return a non-void value?
  2. If yes: Grep for all callers of this method. Read each caller.
  3. For each caller that uses the return value (not just calls and discards it):

- Does the caller return it or assign it to a field? → recurse: trace that caller's return value chain - Does the caller use it in a condition or computation? → that caller's return value (if any) is also affected

  1. Draw arrows in effect-sketch.md: changeMethod → callerA → callerB
  2. Stop when you reach a method with no further users, or a system boundary (network, file, UI).

STOP condition: If the same method appears twice in your trace chain, you have a cycle. Mark it and do not recurse further.

ARTIFACT: Add to effect-sketch.md:

## Mechanism 1: Return Value Chain
changeMethod() → [callerA(), callerB()] → [callerA: used in callerX()] → ...

Step 3: Trace Mechanism 2 — Parameter Mutation

ACTION: For each change point method, check whether it modifies state on any object it receives as a parameter.

WHY: Parameter mutation is sneaky because it does not appear in the method's return type. A method that accepts a List, an Order, or any mutable object and modifies its state will cause effects to propagate silently back through the caller. You cannot detect this from the signature alone — you must read the body.

HOW:

  1. Read the method body. Look for any assignment to fields of a parameter object (e.g., order.setStatus(...), list.add(...), buf.append(...)).
  2. For each parameter that is mutated: find all callers. For each caller, trace what they do with that parameter object after this method returns.
  3. Follow the mutated object forward: does the caller pass it to another method? Return it? Store it in a field?
  4. Add each discovered path to effect-sketch.md.

Language note: In Java and C#, object parameters are passed by reference — the handle can be used to mutate the object. Primitive parameters (int, double) cannot be mutated. In C++, check whether parameters use const — but also check if the type uses mutable internally.

ARTIFACT: Add to effect-sketch.md:

## Mechanism 2: Parameter Mutation
changeMethod(order) — mutates order.status → callers that use order after call: [callerA, callerB]

Step 4: Trace Mechanism 3 — Global and Static Data

ACTION: Check whether any method in your change points reads or writes global variables, static fields, or singleton state.

WHY: Global and static data is the sneakiest propagation mechanism. It does not appear in method signatures at all. A change point that writes to a global silently affects every method that reads that global anywhere in the codebase — including methods in completely unrelated classes. Skipping this step is how developers introduce regressions they cannot explain.

HOW:

  1. Grep the method body for: static field references (ClassName.fieldName), singleton calls (.getInstance()), global variables, or calls that clearly write to shared state (e.g., View.getCurrentDisplay().addText(...)).
  2. For each global or static reference found: Grep the entire codebase for that global name. Every location that reads it is a potential effect path.
  3. Add all discovered global readers to the effect sketch.
  4. If no globals are found: record "No global/static effects detected" — this confirms you looked, not that you skipped it.

ARTIFACT: Add to effect-sketch.md:

## Mechanism 3: Global/Static Data
changeMethod() writes: [GlobalClass.sharedField]
  → readers found: [ClassA.methodX(), ClassB.methodY()]
  — OR —
No global/static effects detected.

Step 5: Include Superclasses and Subclasses

ACTION: If the change point is on an instance method or field, check whether superclasses or subclasses access the same data.

WHY: In OO code, subclasses can override or directly access instance variables from a parent. If a field is protected or package-scoped rather than private, subclasses (and classes in the same package) may read or write it. Forgetting subclasses leads to incomplete effect sketches that miss real propagation paths.

HOW:

  1. Check the visibility of every instance variable accessed in the change point method. Private fields are safe — subclasses cannot reach them without a method. Protected, package-scoped, or public fields must be checked.
  2. Grep for subclasses of the class containing the change point. Read their methods for uses of the shared fields.
  3. Add any discovered subclass usages to the effect sketch.

ARTIFACT: Add to effect-sketch.md:

## Superclass/Subclass Check
[ClassName.field] visibility: [private/protected/public/package]
Subclasses found: [SubA, SubB]
SubA accesses field in: [SubA.someMethod()] → adds to effect path

Step 6: Build the Effect Sketch

ACTION: Consolidate all paths discovered in Steps 2–5 into a single text diagram. Each node is a method or variable. Each arrow represents "can be affected by."

WHY: The effect sketch is not documentation — it is a thinking tool. Seeing all paths in one place reveals convergences (potential pinch points), dead ends (method results that are discarded), and the true scope of the change. Without the sketch, the analysis lives only in your head and is easy to compress incorrectly.

Format: Use indented text or ASCII arrows. There is no required notation — clarity of comprehension is the only standard.

Example sketch for a change to generateIndex():

generateIndex()
  └─ writes: elements (collection)
       ├─ read by: getElementCount() → return value used by callers
       └─ read by: getElement(name) → return value used by callers
addElement()
  └─ writes: elements (collection)
       ├─ (same paths as above)

Both getElementCount() and getElement(name) are interception points — places where a test can detect changes.

ARTIFACT: Finalize effect-sketch.md with the consolidated diagram.


Step 7: Identify Pinch Points (Multi-Class Changes Only)

ACTION: If the effect sketch covers multiple classes, look for a narrowing — a single method or small set of methods through which all (or most) effect paths pass. That narrowing is a pinch point.

WHY: When three or four classes need coordinated changes and breaking each class's dependencies individually would take hours, a pinch point gives you test coverage over all of them through a single, already-reachable entry point. Pinch point tests are temporary scaffolding, not the goal — but they let you start changing safely today rather than waiting until all dependencies are broken.

HOW:

  1. Look at your effect sketch. Count how many change-point effect paths converge on each interception point.
  2. An interception point is a pinch point if testing it detects effects from most or all of your change points simultaneously.
  3. A pinch point is determined by your specific change points — not by global class structure. The same class may or may not be a pinch point depending on what changes.
  4. Reject false pinch points: a method that covers only one of six change paths is an interception point, not a pinch point.

Pinch Point Trap Warning: Pinch point tests cover a wide area but they are high-level tests. If left in place permanently, they grow into slow mini-integration tests that test cluster behavior rather than individual class behavior. Mark pinch point tests explicitly in the test file (e.g., // PINCH POINT — delete when unit tests cover OrderBuilder, OrderValidator, OrderPricer).

Exit criterion: When every class in the cluster has its own unit tests, delete the pinch point test. It has done its job.

ARTIFACT: Add to effect-sketch.md:

## Pinch Point Analysis
Candidate: [ClassName.methodName]
  Effects covered: [changePoint1, changePoint2, changePoint3] ✓
  Effects missed: [changePoint4] — needs separate test
  Verdict: PINCH POINT (covers 3 of 4 change paths)

Step 8: Write the Test Placement Plan

ACTION: Using the effect sketch and pinch point analysis, produce an ordered plan: which tests to write first, at which methods, in which order.

WHY: The test placement plan turns the analysis into action. Without it, the effect sketch is only a map — the plan is the route. The plan answers: "Given what I just traced, exactly which methods should I call in my test harness?"

HOW:

  1. If a pinch point was found:

- Write pinch point tests first. These cover the most ground immediately. - Mark them as temporary (see Step 7 warning). - List the unit tests to write as dependencies are broken.

  1. If no pinch point was found (single-class change, or effects don't converge):

- Identify the narrowest interception points closest to the change — these are the unit tests to write. - Prefer interception points close to the change point (fewer logical steps = fewer assumptions about intermediate behavior).

  1. For each test in the plan, record: which method to call, which effects it covers, and what assertion will detect a regression.

ARTIFACT: Write test-placement-plan.md:

# Test Placement Plan

## Phase 1: Pinch Point Coverage (immediate)
- Test: [ClassName.methodName]
  Covers change points: [list]
  Assertion: [what fails on regression]
  Status: TEMPORARY — delete when Phase 2 tests are in place

## Phase 2: Unit Tests (as dependencies are broken)
- Test: [ClassName.methodName]
  Covers: [specific change point]
  Dependency to break first: [technique]

## Uncovered Effects
- [anything the plan doesn't cover, and why it's acceptable or not]

Inputs

InputRequiredDescription
Change point(s)YesSpecific method(s) or class(es) being changed
Change descriptionYesWhat the code should do differently
Source filesYesReadable codebase for tracing callers, globals, subclasses
LanguageRecommendedAffects visibility rules and parameter passing semantics

Outputs

OutputDescription
effect-sketch.mdText diagram of all effect paths from change points to detectable endpoints
test-placement-plan.mdOrdered plan: which methods to test, which tests are pinch points, which are unit tests

Key Principles

  • Three mechanisms cover all effect paths — don't skip globals. Return values are the most visible. Parameter mutation is quieter. Globals are invisible from signatures. A thorough analysis executes all three traces, even when the code looks clean. Globals are where the surprises live.
  • Effect sketches are rough drawings, not UML. The goal is to see which things affect which other things. Formal notation adds no value here — a bulleted indentation tree is sufficient. The point is comprehension for test placement decisions, not documentation for future readers.
  • Pinch points are temporary scaffolding. A pinch point test is not a goal — it is a bridge. It lets you cover a cluster of classes with one test while you gradually break individual class dependencies. When unit tests cover the cluster, delete the pinch point test. Leaving it in place permanently creates a slow mini-integration test that duplicates work and masks the individual class behavior.
  • A pinch point that doesn't narrow the sketch isn't a pinch point. A method that sits at the top of the call chain is only a pinch point if testing it actually detects effects from the specific changes you are making. A broad "God method" that touches everything is not a pinch point — it's just a large test surface. Evaluate convergence relative to your change points.

Examples

Single-Class Change: Return Value Propagation

Setup: CppClass.getInterface() needs to add a language-qualifier prefix to all return values. CppClass has three methods: getInterface(), getDeclaration(), getDeclarationCount().

Trace:

  • Mechanism 1 (return values): getInterface() returns a String. Grep callers. → One caller: Parser.generateOutput(), which formats the interface into a file. generateOutput() returns a String used by FileWriter.write().
  • Mechanism 2 (parameter mutation): getInterface() does not mutate any parameter.
  • Mechanism 3 (globals): No global reads or writes in getInterface().
  • Subclasses: declarations field is private. No subclass access.

Effect sketch:

getInterface() → return String
  → Parser.generateOutput() → return String
       → FileWriter.write() → side effect (file output)

Test placement plan:

  • Write tests on getInterface() directly (closest to change point, directly callable).
  • One test verifying the prefix appears in the returned string.
  • No pinch point needed — single class, single propagation chain.

Multi-Class Change: Convergence to a Pinch Point

Setup: Three classes — OrderBuilder, OrderValidator, OrderPricer — all need changes for a new discount feature. Each takes 2 hours to break dependencies individually. All three are consumed by BillingStatement.makeStatement(), which produces the final billing output.

Trace:

  • OrderBuilder.build() writes a discount field → OrderValidator.validate() reads it → OrderPricer.price() computes discounted total → both feed into BillingStatement.makeStatement().
  • Effect sketch shows all three change paths converge on makeStatement().

Pinch point: BillingStatement.makeStatement() — one test covers all three change paths.

Test placement plan:

  • Phase 1: Write integration-style test on makeStatement() with a known Invoice. Mark as TEMPORARY.
  • Phase 2: As each class gets unit tests (break OrderBuilder dependency first, then OrderValidator, then OrderPricer), add narrower unit tests per class.
  • When all three classes have unit tests: delete the makeStatement() pinch point test.

Global Reference Change: Finding All Readers

Setup: Element.addText() is being changed to log to a different display system. The current implementation contains View.getCurrentDisplay().addText(newText) — a global reference. The new change will swap getCurrentDisplay() for Logger.getStream().

Trace:

  • Mechanism 3 (globals): Grep the entire codebase for View.getCurrentDisplay. Found in 4 additional places: HeaderRenderer, FooterRenderer, SummaryBuilder, AuditLogger.
  • Each of these reads the display global. Changing the display target in addText() does not directly break them — but confirms the global is shared across unrelated classes.

Effect sketch:

Element.addText() → writes: View.getCurrentDisplay()
  → readers of same global: [HeaderRenderer, FooterRenderer, SummaryBuilder, AuditLogger]
  → these are NOT affected by the addText change (they call getCurrentDisplay() independently)
  → confirmed: no transitive effect through the global

Test placement plan:

  • Write tests on Element.addText() directly. Verify logging target changes.
  • No pinch point needed — the global is read independently by others, not fed through a common parent.
  • Note: if View.getCurrentDisplay() itself is being changed, re-run this analysis with getCurrentDisplay() as the new change point.

References

The full 6-step effect-analysis heuristic from Chapter 11 is reproduced verbatim in the process steps above. No supplementary reference file is required — the heuristic is self-contained within this skill.

For the broader algorithm that calls this skill as Step 2, see legacy-code-change-algorithm.

License

This skill is licensed under CC-BY-SA-4.0. Source: BookForge — Working Effectively with Legacy Code by Michael C. Feathers (2004, Prentice Hall).

Related BookForge Skills

  • legacy-code-change-algorithm — This skill is Step 2 (Find Test Points) of the 5-step algorithm. Always execute the parent algorithm first to classify the change and identify change points.
  • characterization-test-writing — Downstream: once the test placement plan is written, use this skill to write the actual characterization tests at the interception points identified here.
  • big-class-responsibility-extraction — Cross-reference: when effect sketch analysis reveals that a large class has many unrelated effect paths, it is a signal that the class has too many responsibilities. Effect sketches can reveal hidden class boundaries — clusters of methods that only affect each other form natural candidates for extraction.
  • seam-type-selector — When a test placement plan identifies a dependency that blocks test harness construction, use the seam selector to choose the right seam type for that dependency.

Install the full book skill set from GitHub: bookforge-skills — working-effectively-with-legacy-code

平台分布

OpenClaw

93.68%
按下载量换算1,122

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

调用外部服务

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

安装前确认

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

继续浏览同类 Skills