adding-copyright-headers

Fügt basierend auf dem Dateityp Copyright-Header zu Dateien hinzu. Verwenden Sie dies beim Erstellen neuer Dateien oder wenn Sie aufgefordert werden, Copyright-Header zu überprüfen.

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.

Mehr Skills von flutter

adding-release-notes
flutter
Fügt benutzerseitige Änderungsbeschreibungen zu den DevTools-Versionshinweisen hinzu. Verwenden Sie dies, wenn Sie Verbesserungen, Fehlerbehebungen oder neue Funktionen in der Datei NEXT_RELEASE_NOTES.md dokumentieren.
official
dart-modern-features
flutter
Um Kandidaten für die Modernisierung zu finden:
official
api-review
flutter
Überprüft den angegebenen Code gegen die kanonischen API-Design-Richtlinien. Verwenden Sie dieses Skill, wenn der Benutzer eine API-Überprüfung anfordert oder Code gegen API-Design…
official
code-documentation
flutter
Leitfaden für das Schreiben effektiver Code-Dokumentation, einschließlich Docstrings, JSDoc, dartdoc und Implementierungskommentaren. Verwenden Sie diese Fähigkeit beim Schreiben von neuem Code, beim Hinzufügen…
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
Einstiegspunkt-Struktur, Exit-Codes, plattformübergreifende Skripte. Verwenden beim Erstellen von Befehlszeilenprogrammen, Skripten oder Anwendungen.
official
dart-collect-coverage
flutter
Collect coverage mit dem coverage-Paket und erstellen Sie einen LCOV-Bericht
official
dart-fix-runtime-errors
flutter
Nutzt get_runtime_errors und lsp, um einen aktiven Stack-Trace abzurufen, die fehlerhafte Zeile zu lokalisieren, einen Fix anzuwenden und die Lösung über hot_reload zu verifizieren.
official