remove-deprecated-api
БесплатноЗапускает вложенные скриптыНе проверенAEM Cloud Service expert skill — migrate deprecated and removed Java APIs to comply with AEM as a Cloud Service enforcement policies. Detection is…
от adobe★ 342 звезды на GitHubОб этом скилле
Remove Deprecated API — AEM as a Cloud Service
This pattern is executed by the code-assessment runbook — follow
../references/runbook.mdfor the outer flow (preflight → plan → apply → verify, run log). This skill supplies the plugin-driven detection and the hint-driven fix recipe the runbook applies.
Overview
Adobe curates the list of deprecated / removed AEM APIs inside the AEM SDK's
api-regions metadata; Cloud Manager's region-deprecated-api analyser task consumes
that JSON at build time. The AEM Analyser Maven Plugin
(com.adobe.aem:aemanalyser-maven-plugin) runs the same task locally against the
project's built bundles. This skill uses the plugin as its detection engine — no
curated tables, no static lists, no drift.
For each deprecated package the plugin reports, its log line contains a hint: the
deprecated.msg field from the SDK metadata, which typically names a successor
package (e.g. "Please use org.apache.sling.xss instead"). Fixes are derived from
that hint at plan time. When the hint names no successor, the recipe consults the
Adobe Experience League API-removal guidance as a documented fallback.
Classification — confirm this pattern applies
- Any
*.java,pom.xml, or OSGi config file the AEM Analyser Maven Plugin reports underregion-deprecated-api(i.e. anyUsage of deprecated ... foundlog line produced bymvn verifyagainst the project). - Cloud Manager code-quality pipeline failures citing
region-deprecated-api,api-regions-check,Import-Package not satisfied, orbundle-unversioned-packagesviolations.
The plugin only reports past-due deprecations by default (entries whose
for-removal date has already elapsed). Future-dated deprecations are not touched;
re-running the skill after each removal date passes picks them up automatically — the
list is live.
Discovery — two-phase
The detector lives in the shared Java analyzer (scripts/analyzer/detectors/RemoveDeprecatedApi.java),
same shape as every other pattern's detector — but its rules are loaded at run time
from a preflight-produced cache, not hardcoded.
Phase 1 — preflight (populates the rules cache)
bash plugins/aem/cloud-service/skills/code-assessment/remove-deprecated-api/scripts/detect.sh <project-root>
detect.sh:
- Resolves the latest
com.adobe.aem:aemanalyser-maven-pluginand the latestcom.adobe.aem:aem-sdk-apireleases from Maven Central (maven-metadata.xml); each can be pinned with--pin-plugin <version>/--pin-sdk <version>. The freshest SDK is used by default because Cloud Manager itself runs the analyser against the latest SDK — matching that behaviour surfaces every deprecation the pipeline will flag. If the project'spom.xmlpins an older SDK via<sdkVersion>X.Y.Z</sdkVersion>or<useDependencyVersions>true</useDependencyVersions>inside the analyser plugin config,detect.shoverrides at the CLI (-DsdkVersion=<latest>and-DsdkUseDependency=false) so the fresh set is used just for the preflight — no pom edit. Pass--respect-pom-sdkto honour the pom's pin instead. - Invokes the analyser by its fully-qualified
com.adobe.aem:aemanalyser-maven-plugin:<version>:project-analysecoordinates, so the resolved version runs whether or not the project declares the plugin — the pom is never modified (no patch, no backup, no restore). Command shape:mvn package com.adobe.aem:aemanalyser-maven-plugin:<version>:project-analyse …— thepackagephase (override with--goal) builds the module artifacts thatproject-analyseinspects. Log path:/tmp/aem-analyser.log(override with--log <path>). - Parses
Usage of deprecated package found : <pkg> : <hint> Deprecated since <since> For removal : <date>andUsage of deprecated library found : <lib>, package(s) : <start>...<end> : <hint>lines. - Writes the rules cache TSV —
<package>\t<hint>\t<for_removal>per line — at$AEM_DEPRECATED_API_RULES(env override) or$TMPDIR/aem-code-assessment/deprecated-api-rules.tsv(default). - Emits a JSON summary on stdout (findings + meta) for callers that don't chain
through
analyze.sh.
Phase 2 — analyzer (consumes the cache, emits findings)
bash plugins/aem/cloud-service/skills/code-assessment/scripts/analyze.sh <workspace-root>
The Java RemoveDeprecatedApi detector reads the rules TSV, matches each rule's
package against every import in the corpus (longest-prefix match), applies today's
past-due gating as a defence-in-depth, and emits findings in the standard
{pattern,file,line,snippet} shape with an added hint field carrying the analyser
message.
Findings shape — the standard runbook shape plus an optional hint:
{
"findings": [
{
"pattern": "remove-deprecated-api",
"file": "core/src/main/java/com/example/MyService.java",
"line": 5,
"sn
Установить remove-deprecated-api в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл remove-deprecated-api?
AEM Cloud Service expert skill — migrate deprecated and removed Java APIs to comply with AEM as a Cloud Service enforcement policies. Detection is **plugin-driven, not table-driven**: the skill runs the AEM Analyser Maven Plugin (`com.adobe.aem:aemanalyser-maven-plugin`) at its latest published version against the project and parses the `region-deprecated-api` output — the same data Cloud Manager's pipeline uses. Each finding carries the plugin's own deprecation hint (typically a successor package parsed from the analyser message), which drives the fix. Use when auditing deprecated APIs, fixing Cloud Manager pipeline failures citing `region-deprecated-api` / `api-regions-check` / `Import-Package not satisfied`, or proactively modernizing AEM projects before enforcement deadlines.
Как установить скилл remove-deprecated-api?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл remove-deprecated-api запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic