Adding Copyright Headers
Developmentadding-copyright-headersAdding Copyright Headers is an Agent Skill for development published in the flutter/devtools repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Adds copyright headers to files based on file type. Use when creating new files or when asked to verify copyright headers.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/flutter/devtools/blob/HEAD/.agents/skills/adding-copyright-headers/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/adding-copyright-headers, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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
- 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).
- Replace
- 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/bashin.shfiles) or other necessary frontmatter, the copyright header must come after the frontmatter, separated by a blank line.
- Exclusions: Copyright headers are not necessary in directories that begin with a dot (
.), such as:.agents/.gemini/.github/
- Existing Files: When editing an existing file, do NOT modify the year in the copyright header. Leave it as it is.
- 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.