adding-copyright-headers

โดย flutter

เพิ่มส่วนหัวลิขสิทธิ์ให้กับไฟล์ตามประเภทไฟล์ ใช้เมื่อสร้างไฟล์ใหม่หรือเมื่อถูกขอให้ตรวจสอบส่วนหัวลิขสิทธิ์

npx skills add https://github.com/flutter/devtools --skill adding-copyright-headers

Adding Copyright Headers

Formats

Dart Files (.dart)

// Copyright 20?? The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.

YAML Files (.yaml)

# Copyright 20?? The Flutter Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.

HTML Files (.html) and Markdown Files (.md)

<!--
Copyright 20?? The Flutter Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
-->

Shell Scripts (.sh)

# Copyright 20?? The Flutter Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.

Instructions

  1. New Files: When creating a new file, you MUST add the appropriate copyright header based on its file extension.
    • Replace 20?? with the current year (e.g., 2026).
  2. Placement:
    • The copyright header should be at the very top of the file by default.
    • Exception: If the file requires a shebang (e.g., #!/bin/bash in .sh files) or other necessary frontmatter, the copyright header must come after the frontmatter, separated by a blank line.
  3. Exclusions: Copyright headers are not necessary in directories that begin with a dot (.), such as:
    • .agents/
    • .gemini/
    • .github/
  4. Existing Files: When editing an existing file, do NOT modify the year in the copyright header. Leave it as it is.
  5. Subsequent Edits: Subsequent edits should not modify the year.

Examples (for 2026)

Shell Script with Shebang

#!/bin/bash

# Copyright 2026 The Flutter Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.

Dart File

// Copyright 2026 The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.

Skills เพิ่มเติมจาก flutter

adding-release-notes
flutter
เพิ่มคำอธิบายการเปลี่ยนแปลงที่ผู้ใช้เห็นลงในบันทึกประจำรุ่นของ DevTools ใช้เมื่อบันทึกการปรับปรุง การแก้ไข หรือฟีเจอร์ใหม่ในไฟล์ NEXT_RELEASE_NOTES.md
official
dart-modern-features
flutter
เพื่อหาผู้สมัครสำหรับการปรับปรุงให้ทันสมัย:
official
api-review
flutter
ตรวจสอบโค้ดที่ระบุเทียบกับแนวทาง API Design มาตรฐาน ใช้สกิลนี้เมื่อผู้ใช้ขอให้รีวิว API หรือตรวจสอบโค้ดตามแนวทาง API design…
official
code-documentation
flutter
คู่มือสำหรับการเขียนเอกสารประกอบโค้ดอย่างมีประสิทธิภาพ รวมถึง docstrings, JSDoc, dartdoc และคอมเมนต์การใช้งาน ใช้ทักษะนี้เมื่อเขียนโค้ดใหม่ เพิ่มเติม…
official
dart-add-unit-test
flutter
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains…
official
dart-build-cli-app
flutter
โครงสร้างจุดเริ่มต้น, รหัสออกจากโปรแกรม, สคริปต์ข้ามแพลตฟอร์ม ใช้เมื่อสร้างยูทิลิตี้คำสั่ง, สคริปต์, หรือแอปพลิเคชัน
official
dart-collect-coverage
flutter
เก็บข้อมูลความครอบคลุมโดยใช้แพ็กเกจ coverage และสร้างรายงาน LCOV
official
dart-fix-runtime-errors
flutter
ใช้ get_runtime_errors และ lsp เพื่อดึง stack trace ที่ใช้งานอยู่ ค้นหาบรรทัดที่เกิดข้อผิดพลาด ใช้การแก้ไข และตรวจสอบผลลัพธ์ผ่าน hot_reload
official