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. Используйте этот навык, когда пользователь запрашивает ревью 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 для получения активного стек-трейса, поиска строки с ошибкой, применения исправления и проверки результата через hot_reload.
official