Agent skill

Deprecated API Updater

by ArabelaTso in ArabelaTso/Skills-4-SE

Identify and replace deprecated API usage in source code with modern alternatives.

Apache-2.0Auto-check passedBackend & APIs

Install Deprecated API Updater

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill deprecated-api-updater -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE deprecated-api-updater --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/deprecated-api-updater .claude/skills/deprecated-api-updater && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deprecated-api-updater
GitHub stars
253
Token cost
~2.8k tokens
SKILL.md length
740 words
Files
6 (incl. scripts, references)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Identify and replace deprecated API usage in source code with modern alternatives.

  • Works in 6 steps: Scan for Deprecations → Review Suggestions → Test Replacements (Dry Run) → …
  • Modernizing legacy codebases
  • SKILL.md covers Quick Start, Supported Languages, Detection Methods and Workflow, plus 3 more sections
  • Runs Python scripts from its folder; calls python, git and npm

What it does

Deprecated API Updater is an agent skill from ArabelaTso/Skills-4-SE. Identify and replace deprecated API usage in source code with modern alternatives. Use when: (1) Modernizing legacy codebases, (2) Upgrading framework versions (React, Django, Spring, etc.), (3) Fixing deprecation warnings in build output, (4) Preparing for major version upgrades, (5) Ensuring code uses current best practices. Supports Python, JavaScript/TypeScript, Java, and other major languages with both AST-based detection and pattern matching for accurate identification and automated replacement with…

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/java_deprecations.md`, `references/javascript_deprecations.md` and `references/python_deprecations.md`).

It sits in Backend & APIs, covering Backend development and Code migrations. It works with Python, Java, JavaScript and Django. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Modernizing legacy codebases
  • Upgrading framework versions (React
  • Fixing deprecation warnings in build output
  • Preparing for major version upgrades

Example prompts

  • “/deprecated-api-updater”

Requirements

  • Python 3
  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Scan for Deprecations
  2. Review Suggestions
  3. Test Replacements (Dry Run)
  4. Apply Replacements
  5. Validate Changes
  6. Commit Changes

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • git
    • npm
    • pytest
    • mvn
    • eslint

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deprecated API Updater loads about 2.8k tokens when it runs, and up to ~8.7k if it reads all its reference files. Until then it costs about 136 tokens; SKILL.md has 740 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 740 words, ~2,777 tokens.

Download SKILL.mdSave it as .claude/skills/deprecated-api-updater/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
deprecated-api-updater
description
Identify and replace deprecated API usage in source code with modern alternatives. Use when: (1) Modernizing legacy codebases, (2) Upgrading framework versions (React, Django, Spring, etc.), (3) Fixing deprecation warnings in build output, (4) Preparing for major version upgrades, (5) Ensuring code uses current best practices. Supports Python, JavaScript/TypeScript, Java, and other major languages with both AST-based detection and pattern matching for accurate identification and automated replacement with validation.

Deprecated API Updater

Identify and replace deprecated API usage with modern alternatives automatically.

Quick Start

Detect Deprecated APIs

Scan code to identify deprecated API usage:

bash
# Scan a single file
python scripts/detect_deprecated_apis.py src/app.py

# Scan entire directory
python scripts/detect_deprecated_apis.py src/

# Specify language explicitly
python scripts/detect_deprecated_apis.py legacy/ --language python

# Output as JSON
python scripts/detect_deprecated_apis.py src/ --format json
Replace Deprecated APIs

Automatically replace deprecated APIs:

bash
# Dry run (preview changes)
python scripts/replace_deprecated_apis.py src/ --dry-run

# Apply replacements (creates .bak backups)
python scripts/replace_deprecated_apis.py src/

# Replace in specific language
python scripts/replace_deprecated_apis.py src/ --language javascript

Supported Languages

Python
  • Standard library (collections, time, os, platform, imp)
  • Django (URL routing, encoding, translation, models)
  • Flask (JSON handling, send_file)
  • SQLAlchemy, Pandas, NumPy, Requests

See python_deprecations.md for complete reference.

JavaScript/TypeScript
  • Node.js core (Buffer, url, crypto, fs, util)
  • React (lifecycle methods, createClass, PropTypes, Context)
  • Express.js (body-parser)
  • Webpack, Moment.js alternatives

See javascript_deprecations.md for complete reference.

Java
  • Java core (Date/Calendar, Thread methods, finalize)
  • Spring Framework (WebMvcConfigurerAdapter, RestTemplate)
  • Hibernate (Criteria API)
  • JUnit 4 → JUnit 5
  • Android (AsyncTask, ProgressDialog, startActivityForResult)

See java_deprecations.md for complete reference.

Other Languages
  • Ruby: URI.escape, Dir.exists?, File.exists?
  • Go: ioutil package functions

Detection Methods

AST-Based Detection (Precise)

For Python and JavaScript, the skill uses Abstract Syntax Tree parsing for accurate detection:

  • Advantages: Precise, understands code structure, fewer false positives
  • Limitations: Requires parseable code, language-specific implementation

Example: Detects os.popen() by analyzing the AST node structure, not just string matching.

Pattern Matching (Fast)

For all languages, regex-based pattern matching provides fast detection:

  • Advantages: Works across all languages, fast, handles unparseable code
  • Limitations: May have false positives, less precise

Both methods are used together for comprehensive detection.

Workflow

1. Scan for Deprecations

Run detection to identify deprecated APIs:

bash
python scripts/detect_deprecated_apis.py src/

Output example:

Found 3 deprecated API usage(s):

📍 src/utils.py:5:0
   Deprecated: collections.Mapping
   Replacement: collections.abc.Mapping
   Context: from collections import Mapping
   Detection: ast

📍 src/legacy.py:12:9
   Deprecated: os.popen()
   Replacement: subprocess.run() or subprocess.Popen()
   Context: result = os.popen('ls')
   Detection: ast
2. Review Suggestions

Examine the detected deprecations and suggested replacements. Check the reference documentation for detailed migration guides.

3. Test Replacements (Dry Run)

Preview changes before applying:

bash
python scripts/replace_deprecated_apis.py src/ --dry-run

Output shows:

  • What will be replaced
  • Line-by-line changes
  • Deprecated API → Replacement API mapping
4. Apply Replacements

Apply changes with automatic backups:

bash
python scripts/replace_deprecated_apis.py src/

Creates:

  • .bak backup files for all modified files
  • Updated source files with modern APIs
5. Validate Changes

Critical: Always validate after replacement:

bash
# Run tests
npm test  # JavaScript
pytest    # Python
mvn test  # Java

# Run linters
eslint src/     # JavaScript
flake8 src/     # Python
mvn checkstyle  # Java

# Manual testing
# Test critical functionality
6. Commit Changes

Once validated:

bash
# Review changes
git diff

# Commit
git add .
git commit -m "Replace deprecated APIs with modern alternatives"

# Remove backup files
find . -name "*.bak" -delete

Best Practices

Before Replacement
  1. Create a branch: git checkout -b fix/deprecated-apis
  2. Commit current state: Ensure working directory is clean
  3. Run tests: Verify tests pass before changes
  4. Review deprecation docs: Check reference files for context
During Replacement
  1. Start with dry run: Always preview changes first
  2. Replace incrementally: Process one module/directory at a time
  3. Keep backups: Don't delete .bak files until validated
  4. Check imports: Some replacements require new imports
After Replacement
  1. Run full test suite: Catch any breaking changes
  2. Check build output: Look for new warnings
  3. Manual testing: Test critical user flows
  4. Update dependencies: Install any newly required packages
  5. Code review: Have team members review changes

Common Scenarios

Scenario 1: Upgrading Django 2.x → 3.x

Deprecations:

  • django.conf.urls.url → django.urls.path
  • force_text() → force_str()
  • ugettext → gettext

Process:

bash
# Detect Django-specific deprecations
python scripts/detect_deprecated_apis.py myproject/ --language python

# Preview replacements
python scripts/replace_deprecated_apis.py myproject/ --dry-run

# Apply
python scripts/replace_deprecated_apis.py myproject/

# Test
python manage.py test
Scenario 2: Upgrading React 17 → 18

Deprecations:

  • ReactDOM.render() → ReactDOM.createRoot()
  • Unsafe lifecycle methods → Modern alternatives

Process:

bash
# Detect React deprecations
python scripts/detect_deprecated_apis.py src/ --language javascript

# Manual review needed for complex cases
# Some React upgrades require structural changes

# Apply simple replacements
python scripts/replace_deprecated_apis.py src/ --dry-run
python scripts/replace_deprecated_apis.py src/

# Test
npm test
npm start  # Manual testing
Show full SKILL.md (300 more words)Show less
Scenario 3: Modernizing Python Standard Library Usage

Deprecations:

  • collections.Mapping → collections.abc.Mapping
  • time.clock() → time.perf_counter()
  • os.popen() → subprocess.run()

Process:

bash
# Scan codebase
python scripts/detect_deprecated_apis.py . --language python --format json > deprecations.json

# Review JSON output
cat deprecations.json

# Apply replacements
python scripts/replace_deprecated_apis.py . --dry-run
python scripts/replace_deprecated_apis.py .

# Run tests
pytest

Limitations and Caveats

Automatic Replacement Limitations
  1. Context-dependent changes: Some deprecations require understanding business logic
  2. Complex refactoring: Major API redesigns may need manual intervention
  3. Imports: New imports may need to be added manually
  4. Breaking changes: Some replacements change behavior subtly
Manual Review Required

Always manually review replacements for:

  • Security-sensitive code (authentication, encryption)
  • Performance-critical sections (may need optimization)
  • Complex logic (ensure semantics unchanged)
  • Public APIs (breaking changes for consumers)
Known Edge Cases
  1. Dynamic imports: May not detect importlib.import_module('collections').Mapping
  2. Aliased imports: May not detect import collections as c; c.Mapping
  3. Conditional code: Replacements in dead code paths
  4. Comments: May replace deprecated API mentions in comments

Troubleshooting

Detection Issues

Problem: Deprecations not detected

Solutions:

  • Check file extension matches language
  • Use --language flag explicitly
  • Verify file is parseable (no syntax errors)
  • Check if pattern exists in deprecation database

Problem: False positives

Solutions:

  • Review AST vs pattern detection method
  • Check if it's actually deprecated in your version
  • Report false positives for pattern refinement
Replacement Issues

Problem: Replacement breaks code

Solutions:

  • Restore from .bak files
  • Review reference documentation for proper usage
  • Check if imports need updating
  • Manually refactor complex cases

Problem: Tests fail after replacement

Solutions:

  • Check test expectations (mocking, assertions)
  • Update test fixtures if API signatures changed
  • Review behavior changes in reference docs
  • Consider phased replacement approach

Reference Documentation

Language-Specific Guides

Each guide includes:

  • Deprecated API examples
  • Modern replacement examples
  • Migration rationale
  • Code samples (before/after)

Advanced Usage

Custom Detection Patterns

To add custom deprecation patterns, edit the scripts:

scripts/detect_deprecated_apis.py:

python
DEPRECATION_PATTERNS = {
    'python': [
        # Add your patterns
        (r'your\.deprecated\.api\(', 'your.deprecated.api()', 'modern.api()'),
    ]
}

scripts/replace_deprecated_apis.py:

python
REPLACEMENT_RULES = {
    'python': [
        # Add your replacements
        (r'your\.deprecated\.api\(', r'modern.api(', 'deprecated', 'modern'),
    ]
}
Integration with CI/CD

Detect deprecations in CI:

yaml
# .github/workflows/deprecation-check.yml
name: Check Deprecations
on: [push, pull_request]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Check for deprecated APIs
        run: |
          python scripts/detect_deprecated_apis.py src/ --format json > deprecations.json
          if [ -s deprecations.json ]; then
            echo "Deprecated APIs found!"
            cat deprecations.json
            exit 1
          fi
Batch Processing

Process multiple projects:

bash
#!/bin/bash
for project in project1 project2 project3; do
    echo "Processing $project..."
    python scripts/detect_deprecated_apis.py "$project/src" > "$project-report.txt"
    python scripts/replace_deprecated_apis.py "$project/src" --dry-run
done

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/deprecated-api-updater of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/java_deprecations.md
  • references/javascript_deprecations.md
  • references/python_deprecations.md
  • scripts/detect_deprecated_apis.py
  • scripts/replace_deprecated_apis.py

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Deprecated API Updater next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deprecated API Updater compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deprecated API Updater this skillArabelaTso/Skills-4-SE253—~2.8kAutomated safety check: PassApache-2.0
Developing Softwaretelagod/code-abyss243—~410Automated safety check: PassMIT
Design Patternswaybarrios/opencode-power-pack533—~2.2kAutomated safety check: PassMIT
Assess Migrationmendixlabs/mxcli129—~3.6kAutomated safety check: NotesApache-2.0
Fullstack Devinfometa/workbuddyskills346—~1kAutomated safety check: PassMIT
Technology Stack Blueprint Generatorgithub/awesome-copilot40k1 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Developing Software

    telagod/code-abyss

    Software development knowledge reference covering Python, Go, Rust, TypeScript, Java, C++, and Shell.

    243 GitHub stars~410 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Design Patterns

    waybarrios/opencode-power-pack

    Agents should invoke this skill when choosing patterns, designing traits/interfaces/components, deciding abstraction boundaries, evaluating dependency injection/callbacks, or comparing…

    533 GitHub stars~2.2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Assess Migration

    mendixlabs/mxcli

    Investigate an existing non-Mendix application (Java, .NET, Python, Node, PHP, …) and produce a structured migration assessment for Mendix.

    129 GitHub stars~3.6k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Fullstack Dev

    infometa/workbuddyskills

    Full-stack backend architecture and frontend-backend integration guide.

    346 GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Comprehensive technology stack blueprint generator that analyzes codebases to create detailed architectural documentation.

    40k GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check passed
  • Code Review Skill

    awesome-skills/code-review-skill

    Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…

    2.1k GitHub stars~2.8k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Deprecated API Updater

What does Deprecated API Updater do?

Identify and replace deprecated API usage in source code with modern alternatives. Deprecated API Updater is an agent skill from ArabelaTso/Skills-4-SE. Identify and replace deprecated API usage in source code with modern alternatives.

When should I use Deprecated API Updater?

Deprecated API Updater fits situations like: modernizing legacy codebases; upgrading framework versions (React; fixing deprecation warnings in build output; preparing for major version upgrades.

How do I install Deprecated API Updater in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill deprecated-api-updater -a claude-code`. Or copy the skill folder (skills/deprecated-api-updater in ArabelaTso/Skills-4-SE) into .claude/skills/deprecated-api-updater in your project. Claude Code loads it when a task matches its description.

How do I install Deprecated API Updater in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill deprecated-api-updater -a codex`. Or copy the skill folder (skills/deprecated-api-updater in ArabelaTso/Skills-4-SE) into .agents/skills/deprecated-api-updater in your project. Codex loads it when a task matches its description.

Can I use Deprecated API Updater in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill deprecated-api-updater -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deprecated-api-updater, .gemini/skills/deprecated-api-updater, .github/skills/deprecated-api-updater and .opencode/skills/deprecated-api-updater in your project.

What does Deprecated API Updater need to run?

Going by SKILL.md and its folder, Deprecated API Updater needs Python for the scripts in its folder and the command-line tools its instructions call (python, git, npm, pytest, mvn and eslint). Our summary lists: Python 3; Node.js.

Does Deprecated API Updater access the network?

SKILL.md contains no URLs. Its commands use git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Deprecated API Updater safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Deprecated API Updater use?

Deprecated API Updater is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deprecated API Updater use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6k tokens, read only when the agent opens those files.

What are the alternatives to Deprecated API Updater?

Skills that share tags, products or a category with Deprecated API Updater: Developing Software (telagod/code-abyss, 243 stars), Design Patterns (waybarrios/opencode-power-pack, 533 stars), Assess Migration (mendixlabs/mxcli, 129 stars) and Fullstack Dev (infometa/workbuddyskills, 346 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deprecated API Updater?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.