rominirani

license-header-adder

62
15
# Install this skill:
npx skills add rominirani/antigravity-skills --skill "license-header-adder"

Install specific skill from multi-skill repository

# Description

Adds the standard open-source license header to new source files. Use involves creating new code files that require copyright attribution.

# SKILL.md


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.


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")

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

  2. Modify Comment Syntax:

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

Example Usage

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

# Copyright (c) 2024 Google LLC
# ... (rest of license text) ...

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

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.