Skip to content
OpenSmartRoute
Skillv1.0.0

tool-updater

Research-backed CLI tool refresh workflow for updating existing tools with TDD checkpoints and CLI invocation validation.

by oimiragieo(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from oimiragieo/agent-studio (.claude/skills/tool-updater/SKILL.md). Install upstream with npx skills add oimiragieo/agent-studio --skill tool-updater. Copyright stays with the author.

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

  • Tool has broken require() paths or runtime errors
  • Tool's CLI interface needs updating (new flags, changed behavior)
  • Reflection flags stale or low-performing tool
  • User asks to audit/refresh an existing tool

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

  • Tool MUST load without MODULE_NOT_FOUND errors
  • Tool MUST handle --help flag and missing arguments gracefully
  • Tool require() paths MUST be file-relative, not CWD-relative
  • Tool MUST use shell: false for any child process spawning (SE security rule)
  • Tool SHOULD use wrapCLITool() for consistent CLI behavior
  • Tool SHOULD be registered in package.json if user-facing

Anti-Patterns

  • Using CWD-relative requires (./.claude/lib/...) instead of file-relative (../../lib/...)
  • Swallowing errors silently in catch blocks
  • Hardcoding paths that should be computed from __dirname
  • Using shell: true in spawn/exec calls

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/oimiragieo-agent-studio-tool-updater/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

oimiragieo-agent-studio-tool-updater.ocm.jsonjson
{
  "ocm": "1",
  "id": "oimiragieo-agent-studio-tool-updater",
  "kind": "skill",
  "name": "tool-updater",
  "description": "Research-backed CLI tool refresh workflow for updating existing tools with TDD checkpoints and CLI invocation validation.",
  "publisher": "oimiragieo",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "tools",
      "cli",
      "updater",
      "maintenance",
      "framework",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Research-backed CLI tool refresh workflow for updating existing tools with TDD checkpoints and CLI invocation validation."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/oimiragieo/agent-studio",
      "path": ".claude/skills/tool-updater/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/oimiragieo/agent-studio/blob/HEAD/.claude/skills/tool-updater/SKILL.md",
      "key": "oimiragieo/agent-studio/.claude/skills/tool-updater/SKILL.md"
    }
  },
  "instructions": "# Tool Updater\n\n## Overview\n\nUse 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.\n\n## When to Use\n\n- Tool has broken require() paths or runtime errors\n- Tool's CLI interface needs updating (new flags, changed behavior)\n- Reflection flags stale or low-performing tool\n- User asks to audit/refresh an existing tool\n\n## The Iron Law\n\nNever update a tool blindly. Every refresh must be evidence-backed, TDD-gated, and integration-validated.\n\n## Workflow\n\n##",
  "cost": {
    "context_tokens": 673
  }
}

Fetch it by URL: GET /api/v1/registry/oimiragieo-agent-studio-tool-updater/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.