adding-copyright-headers

Ajoute des en-têtes de copyright aux fichiers selon le type de fichier. À utiliser lors de la création de nouveaux fichiers ou lorsqu'on demande de vérifier les en-têtes de copyright.

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.

Plus de skills de flutter

adding-release-notes
flutter
Ajoute des descriptions de changements destinés aux utilisateurs dans les notes de version de DevTools. À utiliser pour documenter les améliorations, correctifs ou nouvelles fonctionnalités dans le fichier NEXT_RELEASE_NOTES.md.
official
dart-modern-features
flutter
Pour trouver des candidats à la modernisation :
official
api-review
flutter
Examine le code spécifié par rapport aux directives canoniques de conception d'API. Utilisez cette compétence lorsque l'utilisateur demande une revue d'API ou souhaite vérifier que le code respecte la conception d'API…
official
code-documentation
flutter
Guide pour rédiger une documentation de code efficace, incluant les docstrings, JSDoc, dartdoc et les commentaires d'implémentation. Utilisez cette compétence lors de l'écriture de nouveau code, de l'ajout…
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
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
official
dart-collect-coverage
flutter
Collecter la couverture à l'aide du package de couverture et créer un rapport LCOV
official
dart-fix-runtime-errors
flutter
Utilise get_runtime_errors et lsp pour récupérer une trace de pile active, localiser la ligne en échec, appliquer un correctif et vérifier la résolution via hot_reload.
official