Check License

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Verify that source and test files in this repository carry a license header consistent with the repository’s license, and add one to any file that’s missing it or has it wrong. This skill only adds/fixes header comments — it never changes code logic, signatures, formatting, or existing non-header comments.

Purpose

iru-check-license closes the gap between a repository’s declared license and what its individual files actually say at the top. It never assumes a fixed license or a fixed header format: it reads the repository’s own LICENSE-family file (and any license identifier declared in pom.xml/package.json/etc.) to know which license applies, then learns the exact header wording and comment-syntax convention from files that already carry one — falling back to drafting a standard header, shown to the user for explicit accept/reject, only when no file in the repository has one yet. It makes no assumption about language or project layout, discovering the real source/test roots and file extensions present each run.

Purpose group

Invocation

/iru-check-license
/iru-check-license <path-or-glob>

Inputs

Argument Required Description Default

path-or-glob

No

Scopes the check to specific files or directories instead of the whole repository.

None — defaults to every source and test file in the repository’s discovered source roots, skipping generated/vendored directories and non-code files.

Outputs

  • A per-file status recorded before any edit: missing header, wrong/stale header, or already compliant.

  • License headers inserted (via Edit, or Write only for brand-new files) into every file found missing one, and corrected in every file whose header diverges in substance from the learned/accepted template — with the rest of each file, including any code-level Javadoc/docstring, left untouched.

  • A final report stating which license was identified, where the header template came from (learned from an existing file, with an example path, or drafted fresh and accepted by the user, noting how many revision rounds it took), a grouped list of compliant vs. fixed files, any header-format inconsistency spotted across existing files, and any file skipped as ambiguous.

  • If no license file/identifier exists anywhere in the repository, or the user chose to skip header generation with no pre-existing header to learn from: no files are checked or modified, and the report says so plainly.

Execution flow

flowchart TD A[Start /iru-check-license] --> B{License file or declared\nlicense identifier found?} B -- no --> B1[Tell user there is nothing\nto check against; stop] B -- yes --> C[Identify license family from its text] C --> D{Path/glob argument given?} D -- yes --> E[Scope check to matching files] D -- no --> F["Scope to discovered source/test roots,\nskipping generated/vendored dirs"] E --> G[Determine distinct file extensions in scope] F --> G G --> H{Existing header found\non sampled in-scope files?} H -- yes --> I["Use it verbatim as the template per extension\n(cross-check 2-3 more instances for consistency)"] H -- no --> J["Ask user: skip header handling,\nor generate one from the license text?"] J -- skip --> K["Report-only mode:\nno template, nothing audited"] J -- generate --> L["Draft header from license boilerplate +\ncopyright holder/year; show example on one real file"] L --> M{User response?} M -- reject with changes --> L M -- accept --> I I --> N["Audit every in-scope file:\nmissing / wrong / compliant"] N --> O["Fix: insert missing headers at top;\nreplace wrong header blocks only"] O --> P[Report: license, template source,\nper-file status, inconsistencies, skips] K --> P

Dependencies

Invokes

None — iru-check-license is a leaf skill; it does not call any other skill in this catalog.

Invoked by

  • Java Code One Task Group — Step 3, once per task group’s bucket, run via a iru-gate-runner sub-agent scoped to every file the bucket touched, to add or fix license headers on the code it just changed.

  • .NET Code One Task Group — the same role, for tasks in the .NET/C# language/framework key.

  • Code One Task Group — for tasks whose language/framework has no matching <key>-code-one-task-group skill installed, as part of its best-effort direct implementation path.

Source

SKILL.md on GitHub — the file this page was generated from.