/devops-skills:sonatype-nexus-repository-configurationfrom devops-skills
Configures Sonatype Nexus Repository Manager hosted, proxy, and group repositories, cleanup/retention policies, blob store sizing, and per-format setup for npm, Maven, and Docker registries.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Nexus Repository Manager is a self-hostable artifact registry that unifies otherwise-separate package ecosystems (npm, Maven/Java, Docker, PyPI, NuGet, and more) behind one server, one authentication model, and one storage layer. Its core configuration abstraction is the repository type: hosted (a repository you publish your own artifacts to), proxy (a caching pass-through to a remote registry like npmjs.org or Docker Hub), and group (a single virtual endpoint that aggregates one or more hosted/proxy repositories into one URL for clients to point at). Getting this three-way distinction right — and configuring cleanup policies and blob store sizing before storage grows unbounded — is what separates a Nexus instance that stays fast and manageable from one that silently fills disk or serves stale/duplicate artifacts. This skill covers Nexus specifically; for the vendor-neutral concepts (why a private registry matters, lockfile/version-pinning discipline, retention policy design) see artifact-and-dependency-management, and for a direct product comparison see jfrog-artifactory-configuration.
Create a blob store before creating repositories — every repository
writes to a named blob store, and the default default blob store is
rarely the right long-term choice for a production instance with
multiple formats:
Administration → Repository → Blob Stores → Create blob store
Type: File (local disk) or S3 (object storage, Pro or newer OSS releases)
Name: npm-blobs
Path: /nexus-data/blobs/npm (File type)
Use separate blob stores per format or per team (npm-blobs,
maven-blobs, docker-blobs) rather than one shared blob store — this
isolates disk pressure from one format's growth (Docker layers are
usually the biggest) from starving another format's repositories, and
makes capacity planning per-format tractable.
Create a proxy repository for each public registry your builds depend on, rather than pointing CI directly at the public internet:
Repository → Create repository → npm (proxy)
Name: npm-proxy
Remote storage: https://registry.npmjs.org
Blob store: npm-blobs
Negative cache enabled: true, TTL 1440 min (cache "not found" too, avoid repeat misses)
Equivalent for Docker Hub:
Repository → Create repository → docker (proxy)
Name: docker-hub-proxy
Remote storage: https://registry-1.docker.io
Docker Index: Use Docker Hub
HTTP port: 8082 (Docker requires a dedicated connector port per repo, unlike npm/Maven which share the base URL path)
Docker's requirement for a dedicated repository connector port (rather than a path-based route like npm/Maven) is a frequent point of confusion when migrating from a different registry product — plan port allocation for every Docker (proxy, hosted, and group) repository up front.
Create a hosted repository for artifacts your own builds publish:
Repository → Create repository → maven2 (hosted)
Name: maven-releases
Blob store: maven-blobs
Version policy: Release (a separate maven-snapshots hosted repo
should use Version policy: Snapshot)
Deployment policy: Disable redeploy (release immutability — see pitfalls)
Keep releases and snapshots in separate hosted repositories for Maven — this is Nexus's standard convention and lets cleanup policy and deployment-policy (redeploy allowed vs. not) differ correctly between the two.
Create a group repository as the single URL clients actually use, combining the proxy and hosted repositories so consumers never need to know which underlying repository actually served a given artifact:
Repository → Create repository → npm (group)
Name: npm-group
Member repositories (in order): npm-hosted, npm-proxy
Order matters: Nexus checks member repositories in the listed order and returns the first match, so list your hosted repository before the proxy — otherwise a package name collision could resolve to the public proxy's version instead of your intentionally-published internal one.
Point CI and developer tooling at the group repository URL, never at individual hosted/proxy repositories directly:
npm config set registry https://nexus.example.com/repository/npm-group/
<!-- ~/.m2/settings.xml -->
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>https://nexus.example.com/repository/maven-group/</url>
</mirror>
Pointing at the group repository is what gives you the resilience and single-point-of-scanning benefits described generically in artifact-and-dependency-management — changing or adding a member repository later requires no client-side reconfiguration.
Configure a cleanup policy to reclaim space from artifacts that no longer need to be retained, rather than growing the blob store unbounded:
Administration → Repository → Cleanup Policies → Create cleanup policy
Name: snapshots-older-than-30-days
Format: maven2
Criteria: Component age (30 days), Last downloaded (14 days)
Attach the policy to maven-snapshots (never to maven-releases, which
should generally be retained indefinitely) and either run cleanup
on-demand or schedule it via a Nexus task:
Administration → System → Tasks → Create task → Admin - Cleanup repositories using their associated policy
Repositories: maven-snapshots
Schedule: Weekly
Warning: a cleanup policy attached to the wrong repository (e.g. accidentally attached to
maven-releasesinstead ofmaven-snapshots), or a subsequent blob store compaction, permanently deletes the underlying artifact bytes — this is not reversible from within Nexus itself. Double-check the target repository before enabling or scheduling a cleanup policy, and confirm a separate backup of the blob store/data directory exists before running compaction for the first time against a production instance.
Configure Docker-specific cleanup separately, since untagged/ superseded image layers are usually the fastest-growing storage category:
Cleanup Policies → Create cleanup policy
Name: docker-untagged-30d
Format: docker
Criteria: Component age (30 days)
Follow cleanup with the separate compact blob store task — Nexus cleanup policies delete component metadata and mark blobs for deletion, but reclaiming actual disk space requires running blob store compaction afterward:
Administration → System → Tasks → Create task → Admin - Compact blob store
Blob store: docker-blobs
Size the blob store with real numbers, not a guess — estimate per-format growth rate (average artifact size × publish frequency × retention window) per blob store, and alert well before the underlying disk/volume approaches capacity; Nexus's own health check UI surfaces blob store free-space percentage, but don't rely on manually checking it — wire it into your existing monitoring stack instead.
Deployment policy: Disable redeploy) so a published release version's
artifact is immutable — silently overwriting a released version breaks
the "same version means same bytes" guarantee that
artifact-and-dependency-management
depends on for reproducible builds.Symptom: A Docker pull through Nexus returns "no matching manifest" or connects to the wrong repository entirely. Fix: Confirm the client is pointed at the correct repository connector port — unlike npm/Maven, each Docker repository (hosted, proxy, and group) in Nexus needs its own dedicated HTTP/HTTPS connector port, and a misconfigured or reused port is the most common cause of Docker registry connectivity issues in Nexus specifically.
Symptom: Disk usage keeps climbing even after a cleanup policy is configured and running successfully. Fix: Cleanup policies remove component metadata/references but the underlying blob bytes aren't actually reclaimed from disk until the separate Compact blob store task runs — schedule compaction to run after cleanup, not assume cleanup alone frees space.
Symptom: An internal npm package name accidentally resolves to a same-named public npm package (or vice versa) through the group repository. Fix: Check the group repository's member ordering — the hosted repository (your internal packages) must be listed before the proxy repository (the public registry mirror) so Nexus's first-match resolution favors your internal package; this is a real dependency confusion/supply-chain risk, not just a minor misconfiguration.
Symptom: A Maven release artifact was accidentally overwritten by a redeploy of the same version, and builds that pinned that version now resolve to different bytes than before. Fix: Set the hosted release repository's deployment policy to "Disable redeploy" so this is rejected at publish time going forward; for the already-corrupted version, republish under a new patch version rather than trying to restore exact original bytes, and audit which builds consumed the corrupted artifact in the meantime.
Symptom: The Nexus blob store fills to capacity unexpectedly, causing publish failures across every format sharing that blob store. Fix: This is the direct consequence of not separating blob stores per format — split high-growth formats (typically Docker) into their own dedicated blob store going forward, and in the immediate term, run cleanup + compaction against the offending format's oldest/least-used components to free emergency headroom.
Scenario: Standing up Nexus to serve as the private npm and Docker registry for a mid-size engineering org, with a 30-day cleanup policy on snapshots/untagged images and separate blob stores per format.
Blob stores created: npm-blobs, docker-blobs (each a File type blob
store on its own disk volume, sized independently).
Repositories:
npm-hosted (hosted, blob store: npm-blobs) — internal packages
npm-proxy (proxy → registry.npmjs.org, blob store: npm-blobs)
npm-group (group: [npm-hosted, npm-proxy]) — what CI/devs actually use
docker-hosted (hosted, blob store: docker-blobs, connector port 8081)
docker-proxy (proxy → registry-1.docker.io, blob store: docker-blobs, connector port 8082)
docker-group (group: [docker-hosted, docker-proxy], connector port 8083)
Cleanup policies:
npm-untagged-90d → format: npm, criteria: component age 90 days
(attached to npm-proxy cache only, not npm-hosted)
docker-untagged-30d → format: docker, criteria: component age 30 days
(attached to docker-proxy cache only, not docker-hosted)
Scheduled task: Admin - Cleanup repositories using their associated policy weekly, followed by Admin - Compact blob store for both
npm-blobs and docker-blobs, so metadata cleanup and actual disk
reclamation both run on the same weekly cadence rather than metadata being
cleaned while disk usage keeps climbing.
CI configuration points at npm-group and docker-group exclusively:
npm config set registry https://nexus.example.com/repository/npm-group/
docker login nexus.example.com:8083
docker pull nexus.example.com:8083/library/alpine:3.20
Six months later, when a new internal team's build system needs the same registries, they point at the same two group URLs with no changes to repository structure required — the group indirection is what makes this addition transparent to every existing consumer.
What SKILL.md sets; muted values are Claude Code's defaults
16 skills in this plugin
/artifact-and-dependency-managementManages build artifacts and third-party dependencies through a private registry/proxy with lockfiles, version pinning, retention policies, and automated update workflows. Use when the user asks to "set up an artifact repository," "configure a package registry proxy/mirror," "pin/lock dependency versions," "clean up old artifacts," "handle a dependency update / Dependabot-Renovate PR," or "avoid a left-pad-style supply-chain incident."
/blue-green-canary-deploymentsDesigns and executes progressive delivery strategies — blue-green cutover, canary rollout, and traffic-shifted releases — with automated health checks and rollback triggers, typically on Kubernetes. Use when the user asks to "reduce deployment risk," "set up canary/blue-green deployments," "do a zero-downtime release," "gradually shift traffic to a new version," or "automatically roll back a bad deploy."
/ci-access-and-credential-lifecycle-managementManages the lifecycle of one-off/temporary repo and environment access grants and CI service-account credentials — granting time-boxed access for a specific task, revoking it reliably when the task ends, and rotating CI service-account tokens/keys before they expire or become stale. Use when the user asks to "give a contractor temporary repo access," "grant one-off access to the production environment," "rotate our CI service account token/API key," "find and revoke stale CI credentials," or "our CI token is about to expire, what do we do."
/ci-cd-pipeline-designDesigns and troubleshoots CI/CD pipelines (GitHub Actions, GitLab CI, or equivalent) including stage layout, caching, parallelization, quality gates, and secrets handling. Use when the user asks to "set up a CI/CD pipeline," "add a build/test/deploy workflow," "fix a failing pipeline stage," "speed up CI," "add branch protection / required checks," or "design a deployment pipeline" for an application or infrastructure repo.
/container-build-and-releaseBuilds, tags, scans, and publishes container images with reproducible, minimal, multi-stage Dockerfiles and a defensible tagging/release scheme. Use when the user asks to "write a Dockerfile," "reduce image size," "set up multi-arch builds," "tag and push a container image," "add image scanning to the pipeline," or "publish a release image to a registry."
/devops-delivery-metrics-and-dora-analysisMeasures and interprets the DORA four keys — deployment frequency, lead time for changes, mean time to restore (MTTR), and change failure rate — including how to compute each one correctly, common measurement pitfalls (vanity metrics, gaming the numbers, misclassifying a rollback), and how to use the results to drive process improvement rather than individual blame. Use when the user asks to "set up DORA metrics," "measure our deployment frequency/lead time," "what's our change failure rate," "are we an elite/high/medium/low performer," or "use delivery metrics to improve, not to blame the team."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devops-skillsOther plugins' skills for the same job