lifecycle

Manage R package lifecycles with deprecation workflows and stage transitions.

466|38|Updated Nov 21, 2025
One-click install
npx skills add https://github.com/posit-dev/skills --skill lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lifecycle
Source: https://github.com/posit-dev/skills/tree/main/r-lib/lifecycle
Command: npx skills add https://github.com/posit-dev/skills --skill lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Addresses the need to apply tidyverse lifecycle principles to manage function and argument lifecycles in R packages, including setup, deprecation, renaming, and experimentation status.

Core Features & Use Cases

  • Setup infrastructure for lifecycle in an R package and integrate with the lifecycle package.
  • Apply deprecation workflows across functions and arguments (soft deprecation, deprecation, and defunct stages) and manage stage transitions (stable, experimental, deprecated, superseded).
  • Use lifecycle badges in package documentation to communicate status to users and developers.
  • Provide guidance and examples for renaming functions, superseding old APIs, and writing deprecation helpers, plus testing deprecations.

Quick Start

Run the recommended setup to initialize lifecycle tooling in your R package.

Frequently Asked Questions about lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deprecate a function in an R package using lifecycle stages?

To deprecate a function in an R package, apply tidyverse lifecycle principles to transition it through soft deprecation, deprecation, and defunct stages using lifecycle helpers, ensuring clear stage progression and user communication.

What's the best way to add lifecycle badges to R package documentation?

Adding lifecycle badges to R package documentation requires integrating the lifecycle package into your development workflow, applying visual stage indicators to communicate stable, experimental, deprecated, or superseded status to users and developers.

How do I rename an R package API without breaking existing user code?

Renaming an R package API without breaking user code involves using lifecycle deprecation workflows to supersede old functions, writing deprecation helpers, and guiding users to the new API while maintaining backward compatibility.

When should I mark an R package function as experimental versus stable?

Mark an R package function as experimental when its API is still changing and subject to feedback, then transition to stable once the interface is finalized, using lifecycle badges to document these stage transitions clearly.

Can I use the lifecycle package to manage argument deprecation within R functions?

Yes, the lifecycle package manages argument deprecation within R functions by applying tidyverse deprecation workflows to individual arguments, allowing progressive stage transitions from soft deprecation to defunct.

Does managing R package lifecycles require dependencies beyond the lifecycle package?

Setting up lifecycle management in an R package requires integrating with the lifecycle package itself, running recommended setup initialization, and registering deprecation helpers, but operates without additional external dependencies.