ring:migrating-to-lib-observability
Migrating a Lerian Go app off lib-commons observability imports (deprecated shims or removed APIs) to lib-observability via a fixed mapping table, then bumps go.mod and validates the build; ring:backend-go applies the edits. Covers log/zap/runtime/assert, opentelemetry/tracing, HTTP middleware, context helpers, and direct systemplane import moves. Use when lib-commons observability imports remain or the build breaks on removed APIs.
What this skill does
# Migrate lib-commons Observability APIs to lib-observability ## When to use - Application imports one or more lib-commons observability packages/symbols listed in the mapping table below - Team decision to eliminate deprecation warnings from lib-commons shims - lib-commons deprecation notices appear in IDE or go vet output - Application no longer builds because lib-commons has removed observability APIs and source imports still reference them ## Skip when - Application already imports lib-observability for all observability concerns - Application has no imports of the lib-commons observability packages/symbols listed below - Application is lib-commons itself **Do NOT skip when:** - "The app only imports log/ from lib-commons" → still migrate; log is an observability target - "The app uses streaming/kafka" → streaming is out of scope; only observability packages and HTTP/gRPC observability middleware migrate - "The app uses commons/opentelemetry for tracing bootstrap" → migrate when `lib-observability/tracing` exposes the target API (helper-only files first, bootstrap when type boundaries allow) - "`go list` or `go build` fails because lib-commons removed the observability APIs" → still migrate; this skill performs static source rewrites against the known mapping table even when the source packages no longer exist ## Sequence **Runs before:** (none) **Runs after:** (none) ## Related **Complementary:** ring:using-ring, ring:running-dev-cycle, ring:reviewing-code, ring:fixing-lint, ring:using-lib-commons --- ## Overview This skill replaces imports/usages of lib-commons observability APIs with their canonical lib-observability equivalents. **Stable target baseline for this migration:** - `github.com/LerianStudio/lib-commons/v5` >= `v5.2.0` - `github.com/LerianStudio/lib-observability` >= `v1.0.0` - `github.com/LerianStudio/lib-auth/v2` >= `v2.8.0` when present - `github.com/LerianStudio/lib-license-go/v2` >= `v2.3.5` when present - `github.com/LerianStudio/lib-streaming` >= `v1.3.1` when present - `github.com/LerianStudio/lib-systemplane` >= `v1.0.0` when systemplane is used `lib-commons/v5.2.0` is the first stable lib-commons release where the deprecated observability shims are removed. `lib-observability/v1.0.0` is the first stable lib-observability release. `lib-auth/v2.8.0` and `lib-license-go/v2.3.5` are the first stable companion releases known to be compatible with the removed lib-commons observability APIs. `lib-streaming/v1.3.1` is the first stable streaming release in this validation set that no longer imports removed lib-commons observability packages. `lib-systemplane/v1.0.0` is the stable package destination for direct `commons/systemplane` imports removed from lib-commons. Do not use beta tags for new migrations unless the target application is intentionally pinned to a beta train. **Known lib-commons observability removal refs:** - Removal commit: `fe1db9e60ac9e959de4288208b6cf65f7bbfe439` (`refactor: remove deprecated commons observability shims`) - First stable removal release: `v5.2.0` - Pre-removal reference: `fe1db9e60ac9e959de4288208b6cf65f7bbfe439^` (currently `a33b160ac165cff8b4ddf5c69d8dbb80a10868f6`) Use the pre-removal reference as the default source-evidence ref when the effective lib-commons dependency has already removed the deprecated shims and the user did not provide `lib_commons_pre_removal_ref`. That ref still contains the `Deprecated:` notices while using lib-observability types internally. **Targeting strategy:** migrate known observability APIs when the target API exists in the effective lib-observability version. Source-side `Deprecated:` notices are preferred evidence. Read them from the effective lib-commons version when available; if a removal commit/ref is known, read them from the immediate pre-removal lib-commons ref. If neither source is available because lib-commons has already removed the package/symbol, the application may not compile, and the skill must still migrate by static source analysis. If a target API is missing from lib-observability, do not migrate that API. Report the missing target and leave the lib-commons usage unchanged unless it is already broken by removal; in that case report it as a manual migration blocker. In removed-api mode, package-level imports such as `commons/log` can still cross non-observability lib-commons boundaries (for example `mongo.Config.Logger`, `postgres.Config.Logger`, `WithCORSLogger`, `circuitbreaker.NewManager`, auth middleware, outbox/tenant-manager clients, streaming builders, or any remaining lib-commons API typed as `commons/log.Logger`). Do not invent adapters in the skill. Migrate safe source files, run build validation, and if a file fails only because a migrated value crosses a remaining lib-commons typed boundary, revert that file/family to lib-commons and report it as a manual blocker. Also check transitive dependencies after bumping lib-commons to a removal release. If `go build` fails from `$GOMODCACHE` with errors such as `no required module provides package github.com/LerianStudio/lib-commons/v5/commons/log`, `commons/zap`, or `commons/opentelemetry`, the target repo was migrated as far as local source allows, but one of its dependencies still depends on removed lib-commons observability packages. First try the known stable companion bumps when the modules are present: ```bash GONOSUMDB="github.com/LerianStudio/*" \ GOPRIVATE="github.com/LerianStudio/*" \ go get github.com/LerianStudio/lib-auth/[email protected] \ github.com/LerianStudio/lib-license-go/[email protected] \ github.com/LerianStudio/[email protected] \ github.com/LerianStudio/[email protected] go mod tidy ``` If the dependency is outside that stable set (for example `lib-auth/v3`, `systemplane` packages removed from lib-commons, or a `lib-streaming` version older than `v1.3.1`), first apply the known companion bumps and direct systemplane import move. Then report only the remaining module/package as a manual blocker; do not try to patch module cache files or vendor ad-hoc replacements into the application. Known repo-specific dependency drift: - `matcher` may depend on `github.com/LerianStudio/lib-auth/v3` as a pseudo-version even though there is no stable lib-auth v3 release in this migration train. If that pseudo-version still imports removed lib-commons observability packages, do not rewrite it automatically. Report it as a dependency blocker and ask the executor whether they want to move matcher back to `github.com/LerianStudio/lib-auth/[email protected]` for this migration. Packages that are NOT deprecated in lib-commons (e.g. non-observability `commons/net/http` helpers, `commons/streaming`) are explicitly out of scope. **What changes:** import paths and deprecated symbol qualifiers in `.go` files + `go.mod` dependency. **What stays the same:** all non-deprecated lib-commons packages, including infrastructure clients (`commons/postgres`, `commons/streaming`, etc.). --- ## CRITICAL: Role Clarification | Who | Responsibility | |-----|----------------| | **This Skill** | Discover imports, plan replacements, validate, report | | **Agent** | Apply file edits, run go mod, fix compilation errors | --- ## Import Mapping Reference The lib-commons observability packages and their lib-observability replacements. Match the source import with the module major already used by the repo (`/v2`, `/v4`, `/v5`, etc.); do not require a lib-commons major-version bump before migrating observability imports. | lib-commons import | lib-observability replacement | Package name change? | |---|---|---| | `lib-commons[/vN]/commons/log` | `lib-observability/log` | No — qualifier stays `log` | | `lib-commons[/vN]/commons/zap` | `lib-observability/zap` | No — qualifier stays `zap` | | `lib-commons[/vN]/commons/runtime` | `lib-observability/runtime` | No — qualifier stays `runtime` | | `lib-commons[/vN]/commons/assert` | `lib-observability/assert` | No — q
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.