You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/adding-copyright-headers/SKILL.md
+26-18Lines changed: 26 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,34 +35,42 @@ found in the LICENSE file or at https://developers.google.com/open-source/licens
35
35
-->
36
36
```
37
37
38
+
### Shell Scripts (`.sh`)
39
+
40
+
```bash
41
+
# Copyright 20?? The Flutter Authors
42
+
# Use of this source code is governed by a BSD-style license that can be
43
+
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
44
+
```
45
+
38
46
## Instructions
39
47
40
-
1.**New Files**: When creating a new file, you MUST add the appropriate copyright header at the very top of the file based on its file extension.
48
+
1.**New Files**: When creating a new file, you MUST add the appropriate copyright header based on its file extension.
41
49
- Replace `20??` with the current year (e.g., 2026).
42
-
2.**Existing Files**: When editing an existing file, do NOT modify the year in the copyright header. Leave it as it is.
43
-
3.**Subsequent Edits**: Subsequent edits should not modify the year.
50
+
2.**Placement**:
51
+
- The copyright header should be at the very top of the file by default.
52
+
-**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.
53
+
3.**Exclusions**: Copyright headers are **not necessary** in directories that begin with a dot (`.`), such as:
54
+
-`.agents/`
55
+
-`.gemini/`
56
+
-`.github/`
57
+
4.**Existing Files**: When editing an existing file, do NOT modify the year in the copyright header. Leave it as it is.
58
+
5.**Subsequent Edits**: Subsequent edits should not modify the year.
44
59
45
60
## Examples (for 2026)
46
61
47
-
### Dart
48
-
```dart
49
-
// Copyright 2026 The Flutter Authors
50
-
// Use of this source code is governed by a BSD-style license that can be
51
-
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
52
-
```
62
+
### Shell Script with Shebang
63
+
```bash
64
+
#!/bin/bash
53
65
54
-
### YAML
55
-
```yaml
56
66
# Copyright 2026 The Flutter Authors
57
67
# Use of this source code is governed by a BSD-style license that can be
58
68
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
59
69
```
60
70
61
-
### HTML / Markdown
62
-
```html
63
-
<!--
64
-
Copyright 2026 The Flutter Authors
65
-
Use of this source code is governed by a BSD-style license that can be
66
-
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
67
-
-->
71
+
### Dart File
72
+
```dart
73
+
// Copyright 2026 The Flutter Authors
74
+
// Use of this source code is governed by a BSD-style license that can be
75
+
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
0 commit comments