Skip to content
license-header-adder logo

授權條款標頭 Skill

license-header-adder

為新建立的原始碼檔案加上標準的開源授權條款標頭。適用於需要版權聲明的程式碼檔案建立情境。

SKILL.md

Full skill instructions

授權條款標頭 Skill

這個 Skill 確保所有新建立的原始碼檔案都有正確的版權標頭。

指示說明

  1. 讀取範本:首先,讀取位於 resources/​HEADER_TEMPLATE.txt 的標頭範本檔案內容。
  2. 加入檔案開頭:當建立新檔案時(例如 .py、.java、.js、.ts、.go),將範本內容加到目標檔案的最開頭。
  3. 調整註解語法:
    • 對於 C 風格語言(Java、JS、TS、C++),保持 /​* ... */ 區塊格式。
    • 對於 Python、Shell 或 YAML,將區塊轉換為使用 # 註解。
    • 對於 HTML/​XML,使用 <!-- ... --> 格式。

使用時機

  • 當建立新的程式碼檔案時
  • 當需要為現有檔案補上授權條款標頭時
  • 當專案需要統一的版權聲明格式時

範例

範例 1:為 Java 檔案加上授權條款

使用者指令:為 MyService.java 加上授權條款標頭

AI 執行步驟:

  1. 讀取 resources/​HEADER_TEMPLATE.txt 內容
  2. 將內容以 /​* ... */ 格式加到 Java 檔案開頭

範例 2:為 Python 檔案加上授權條款

使用者指令:為 utils.py 加上授權條款標頭

AI 執行步驟:

  1. 讀取 resources/​HEADER_TEMPLATE.txt 內容
  2. 將每行轉換為 # 開頭的註解
  3. 加到 Python 檔案開頭

注意事項

  • 範本內容必須完全照抄,不可修改任何文字
  • 法律文字不可有任何錯字或遺漏
  • 根據目標檔案的程式語言調整註解格式

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View