Tool updater

From oimiragieo/agent-studio · View interactive version

Tool updater is an AI agent skill from the GitHub repository oimiragieo/agent-studio. Research-backed CLI tool refresh workflow for updating existing tools with TDD checkpoints and CLI invocation validation.

How to use this skill

Skill file

Tool Updater

Overview

Use this skill to refresh an existing CLI tool safely: research current best practices, compare against current implementation, generate a TDD patch backlog, apply updates, and verify CLI invocation.

When to Use

The Iron Law

Never update a tool blindly. Every refresh must be evidence-backed, TDD-gated, and integration-validated.

Workflow

Step 0: Evaluate Current State

  1. Read the tool file and understand its purpose
  2. Check if it's registered in package.json scripts
  3. Test node <tool-path> --help for CLI interface
  4. Identify issues: broken requires, missing error handling, stale logic

Step 1: Research Best Practices

  1. Read .claude/tools/cli/CLAUDE.md for tool conventions
  2. Review similar tools for patterns (especially cli-wrapper.cjs usage)
  3. Check if tool uses wrapCLITool() from ../../lib/utils/cli-wrapper.cjs
  4. Use Skill({ skill: 'research-synthesis' }) if external research needed

Step 2: Generate Patch Backlog

  1. List specific changes needed
  2. Prioritize: broken requires > CLI interface > error handling > logic
  3. Estimate scope: <30 lines = auto-apply, >30 lines = plan mode

Step 3: Apply Updates

  1. Write or update tests first (RED phase)
  2. Apply tool changes (GREEN phase)
  3. Refactor for clarity (REFACTOR phase)
  4. Use Edit tool — never rewrite the entire file

Step 4: Verify Integration

  1. Verify tool loads without MODULE_NOT_FOUND errors
  2. Verify --help output is correct and complete
  3. Verify tool handles missing args gracefully (exit 1 with usage)
  4. If CLI tool, verify package.json script entry exists or add one
  5. Run pnpm lint:fix && pnpm format
  6. Run tool-specific tests

Step 5: Record

  1. Log changes via MemoryRecord if significant
  2. Update CHANGELOG.md entry

Domain-Specific Validation

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.