update-copyright

Update existing copyright headers in tracked source files using IntelliJ IDEA profiles.

2|Updated May 28, 2021
One-click install
npx skills add https://github.com/SpineEventEngine/validation --skill update-copyright
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-copyright
Source: https://github.com/SpineEventEngine/validation/tree/main/.agents/skills/update-copyright
Command: npx skills add https://github.com/SpineEventEngine/validation --skill update-copyright

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It prevents stale or incorrect copyright years in source files by updating existing headers to the current year, using the notice template from your IntelliJ IDEA copyright profile.

Core Features & Use Cases

  • Year substitution from IntelliJ profile: Reads the default notice from .idea/copyright/profiles_settings.xml and replaces today.year with the selected year.
  • Selective, safe updates: Updates only files that already contain a recognizable copyright header, and skips files without one.
  • Change-set friendly behavior: Uses explicitly provided paths when given, otherwise operates on tracked source files by default; supports dry-run and check modes for controlled rollout.
  • Use Case: Before releasing a new version, refresh the copyright year across your Java/Kotlin/Proto/etc. sources without accidentally adding headers to unrelated files.

Quick Start

Run the copyright update in dry-run mode first to see which files would change, then run it again to apply the updates.

Frequently Asked Questions about update-copyright

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

FAQPage Schema
How do I update copyright headers in source files using an IntelliJ IDEA profile?

To update copyright headers, this Skill reads the default notice from your IntelliJ IDEA copyright profile and substitutes the current year. It modifies only tracked source files that already contain a recognizable header, skipping files without one.

Can I bulk edit copyright years across multiple programming languages without adding headers to unrelated files?

Yes, you can perform a bulk header refresh across multiple languages like Java, Kotlin, and Proto. The process safely updates only files with existing copyright headers and skips any files that do not already have one.

Do I need a specific configuration file to run an automated copyright header update?

Yes, you need the .idea/copyright/profiles_settings.xml file present in your repository. This configuration provides the notice template required for the year substitution process to function correctly.

How do I check which source files will have their copyright year changed before applying edits?

You can run the provided Python script in dry-run mode to see which files would change. This allows you to verify the tracked source files and excluded paths before applying the actual header update.

What is the best way to refresh stale copyright years in a repository before a new release?

The best way to refresh stale copyright years is to run the update process in dry-run mode first, then apply the updates. This ensures deterministic, bulk header refresh while honoring your explicitly provided file and directory scopes.

Does the copyright update process respect excluded paths and custom directory scopes?

Yes, the copyright update process respects excluded paths and files during execution. It also supports explicitly provided paths for targeted updates, otherwise operating on tracked source files by default.