---
name: license-header-adder
description: Adds the standard open-source license header to new source files. Use involves creating new code files that require copyright attribution.
title: license-header-adder
canonical_url: https://skilld.dev/gh/rominirani/antigravity-skills/license-header-adder
last_updated: 2026-09-26T14:20:08.000Z
---

> **Skill from skilld.dev.** Follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [resources/HEADER_TEMPLATE.txt](https://skilld.dev/api/skills-raw/rominirani/antigravity-skills/license-header-adder/resources/HEADER_TEMPLATE.txt).
>
> If the user asked to install this Skill, run `npx skilld install rominirani/antigravity-skills/license-header-adder`. Install writes the Skill files into the project, so every session loads them.

# License Header Adder Skill

This skill ensures that all new source files have the correct copyright header.

## Instructions

1. **Read the Template**:
   First, read the content of the header template file located at `resources/HEADER_TEMPLATE.txt`.
   
   ```python
   # Pseudocode for agent understanding
   template_content = view_file("resources/HEADER_TEMPLATE.txt")
   ```

2. **Prepend to File**:
   When creating a new file (e.g., `.py`, `.java`, `.js`, `.ts`, `.go`), prepend the `target_file` content with the template content.

3. **Modify Comment Syntax**:
   - For C-style languages (Java, JS, TS, C++), keep the `/* ... */` block as is.
   - For Python, Shell, or YAML, convert the block to use `#` comments.
   - For HTML/XML, use `<!-- ... -->`.

## Example Usage
If the user asks to "create a python script for hello world", you should generate:

```python
# Copyright (c) 2026 MyCompany LLC
# ... (rest of license text) ...

def main():
    print("Hello World")
```
