bookforge-legacy-code-addition-techniquesAdd new functionality to untested legacy code using Sprout Method, Sprout Class, Wrap Method, or Wrap Class — whichever best fits the dependency profile. Use...
Install via ClawdBot CLI:
clawdbot install quochungto/bookforge-legacy-code-addition-techniquesGrade Fair — based on market validation, documentation quality, package completeness, maintenance status, and authenticity signals.
Calls external URL not in known-safe list
https://github.com/bookforge-ai/bookforge-skills/tree/main/books/working-effectiAudited May 1, 2026 · audit v1.0
Generated May 12, 2026
A developer needs to add logging of payment amounts and timestamps to an existing monolithic PaymentProcessor class that has no tests and a complex constructor with database connections. Using Wrap Method, they create a wrapper that calls the original method and then logs without modifying or testing the legacy class.
A team must add input validation to a legacy UserController that mixes routing and business logic. The controller cannot be instantiated in tests due to static dependencies. They apply Sprout Method to extract the validation logic into a new, testable method called validateInput(), then call it from the controller without refactoring the rest.
An existing OrderService needs to integrate a new external fraud detection API call after order placement. The method is large and untested. Using Sprout Class, they create a new FraudCheckService class, write tests for it, and then add a single line in the legacy method to call it, leaving the old code untouched.
A developer needs to record every inventory adjustment in an audit log. The InventoryAdjustment class's updateStock method is deeply coupled to a database. Using Wrap Class, they create an AuditedInventoryAdjustment that implements the same interface, delegates to the original, and adds audit entries before and after the call.
A legacy ReportGenerator generates reports on every request, causing slow performance. The class is untestable due to file I/O dependencies. Using Wrap Method, they create a CachedReportGenerator that checks a cache before calling the original method and stores the result, all without modifying the legacy code.
Provide rapid addition of new features (logging, validation, integrations) to existing legacy codebases without requiring costly refactoring or full test coverage. This model allows development teams to meet tight deadlines while maintaining code safety.
Offer a consulting service that applies sprout and wrap techniques to stabilize legacy modules, flagging them for future refactoring. Clients pay for reduced risk while gaining new functionality in critical systems.
Integrate sprout/wrap techniques as a step in CI/CD pipelines, enabling teams to deploy new behaviors to legacy components without disrupting existing automated tests or requiring immediate dependency injection overhaul.
💬 Integration Tip
Integrate this skill after mastering the legacy-code-change-algorithm and safe-legacy-editing-discipline skills. Use it as a tactical step (Step 5) when you cannot break dependencies upfront.
Scored May 12, 2026
Control desktop applications on Windows — launch, close, focus, resize, move windows, simulate keyboard/mouse input, manage processes, control VSCode, read clipboard, and capture screen info. Use when the user wants to interact with any running program, switch windows, type text, press shortcuts, open files in VSCode, manage running processes, or get system display information.
Conduct rigorous, adversarial code reviews with zero tolerance for mediocrity. Use when users ask to "critically review" my code or a PR, "critique my code", "find issues in my code", or "what's wrong with this code". Identifies security holes, lazy patterns, edge case failures, and bad practices across Python, R, JavaScript/TypeScript, SQL, and front-end code. Scrutinizes error handling, type safety, performance, accessibility, and code quality. Provides structured feedback with severity tiers (Blocking, Required, Suggestions) and specific, actionable recommendations.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.
Pragmatic coding standards for writing clean, maintainable code — naming, functions, structure, anti-patterns, and pre-edit safety checks. Use when writing new code, refactoring existing code, reviewing code quality, or establishing coding standards.
Claude Code integration for OpenClaw. This skill provides interfaces to: - Query Claude Code documentation from https://code.claude.com/docs - Manage subagents and coding tasks - Execute AI-assisted coding workflows - Access best practices and common workflows Use this skill when users want to: - Get help with coding tasks - Query Claude Code documentation - Manage AI-assisted development workflows - Execute complex programming tasks
Plan, draft, version, and refine written content with enforced versioning and quality audits.