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/pyproject.toml/etc. — for Python, [project].license as an SPDX expression or the legacy table, plus License :: classifiers) 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 — including Android Gradle module source sets,
SwiftPM’s Sources//Tests/, Hilla’s embedded frontend, and React Native/Capacitor’s native ios//android/
directories, and Python packages (src/<pkg>/, FastAPI’s app/, Django’s config/ + apps/) — and it knows the native comment syntax for .kt, .swift, .py (a block of # lines, never a docstring) and .ts/.tsx headers alongside the
languages it already covered, plus .rs and .go (a block of // lines or /* … */, never Rust //////! doc comments). For Python it keeps a shebang and PEP 263 encoding line on lines 1-2 with the header inserted after them, and skips generated Django/Alembic migrations and empty init.py files unless existing ones are headered. For Rust it inserts the header above inner attributes and //! crate docs; for Go it keeps the header above any //go:build constraint with a blank line before package (so go doc doesn’t treat it as the package comment) and skips generated // Code generated … DO NOT EDIT. files. When no repo-wide inception year is stamped in a config field (e.g. Maven’s
<inceptionYear> or a Gradle library module’s lib/build.gradle.kts), it falls back to each file’s first-commit
year, or, when a single repo-wide year is needed and no field supplies one, to the repository’s own first-commit
year.
Plugin
Shipped by the iru-core plugin of the ai-catalog marketplace (install with /plugin install iru-core@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
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 ( |
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
Dependencies
Invoked by
-
Java Code One Task Group — Step 3, once per task group’s bucket, run via a
iru-gate-runnersub-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.
-
TypeScript Code One Task Group — the same role (its Step 3.1), for tasks in the TypeScript language/framework key.
-
Android Code One Task Group — the same role (its Step 3.1), for tasks in the Android language/framework key.
-
Swift Code One Task Group — the same role (its Step 3.1), for tasks in the Swift language/framework key.
-
Code One Task Group — Step 3, license headers in the best-effort fallback path, via the
iru-gate-runneragent. -
Kotlin Spring Boot Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
NestJS Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
Next.js Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
PHP Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
Quarkus Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
Java Spring Boot Code One Task Group — Step 3.1, via
iru-gate-runner. Skipped if not installed. -
KMP Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
React Native Code One Task Group — Step 3.1, license headers for touched files, via the
iru-gate-runneragent. -
Rust Code One Task Group — license headers for touched
.rsfiles, via theiru-gate-runneragent. Skipped if not installed. -
Go Code One Task Group — license headers for touched
.gofiles, via theiru-gate-runneragent. Skipped if not installed.
Related agents
-
iru-gate-runner— see the note in Java Code One Task Group, .NET Code One Task Group, TypeScript Code One Task Group, Android Code One Task Group, Swift Code One Task Group, and Agents about the sub-agent wrapper each caller uses to invoke it.
Source
SKILL.md on GitHub — the file this page was generated from.