Skip to content

Commit 86d03c7

Browse files
committed
Specify excluded directories and how to handle frontmatter
1 parent 458ad4c commit 86d03c7

2 files changed

Lines changed: 32 additions & 24 deletions

File tree

.agents/skills/adding-copyright-headers/SKILL.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,42 @@ found in the LICENSE file or at https://developers.google.com/open-source/licens
3535
-->
3636
```
3737

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+
3846
## Instructions
3947

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.
4149
- 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.
4459

4560
## Examples (for 2026)
4661

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
5365

54-
### YAML
55-
```yaml
5666
# Copyright 2026 The Flutter Authors
5767
# Use of this source code is governed by a BSD-style license that can be
5868
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
5969
```
6070

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.
6876
```

pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -863,26 +863,26 @@ packages:
863863
dependency: transitive
864864
description:
865865
name: test
866-
sha256: "8d9ceddbab833f180fbefed08afa76d7c03513dfdba87ffcec2718b02bbcbf20"
866+
sha256: "280d6d890011ca966ad08df7e8a4ddfab0fb3aa49f96ed6de56e3521347a9ae7"
867867
url: "https://pub.dev"
868868
source: hosted
869-
version: "1.31.0"
869+
version: "1.30.0"
870870
test_api:
871871
dependency: transitive
872872
description:
873873
name: test_api
874-
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
874+
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
875875
url: "https://pub.dev"
876876
source: hosted
877-
version: "0.7.11"
877+
version: "0.7.10"
878878
test_core:
879879
dependency: transitive
880880
description:
881881
name: test_core
882-
sha256: "1991d4cfe85d5043241acac92962c3977c8d2f2add1ee73130c7b286417d1d34"
882+
sha256: "0381bd1585d1a924763c308100f2138205252fb90c9d4eeaf28489ee65ccde51"
883883
url: "https://pub.dev"
884884
source: hosted
885-
version: "0.6.17"
885+
version: "0.6.16"
886886
typed_data:
887887
dependency: transitive
888888
description:

0 commit comments

Comments
 (0)