Skip to content

Commit 458ad4c

Browse files
committed
Add copyright headers skills
1 parent c00ad26 commit 458ad4c

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: adding-copyright-headers
3+
description: Adds copyright headers to files based on file type. Use when creating new files or when asked to verify copyright headers.
4+
---
5+
6+
# Adding Copyright Headers
7+
8+
This skill provides instructions for adding copyright headers to source files in this repository based on their file type.
9+
10+
## Formats
11+
12+
### Dart Files (`.dart`)
13+
14+
```dart
15+
// Copyright 20?? The Flutter Authors
16+
// Use of this source code is governed by a BSD-style license that can be
17+
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
18+
```
19+
20+
### YAML Files (`.yaml`)
21+
22+
```yaml
23+
# Copyright 20?? The Flutter Authors
24+
# Use of this source code is governed by a BSD-style license that can be
25+
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
26+
```
27+
28+
### HTML Files (`.html`) and Markdown Files (`.md`)
29+
30+
```html
31+
<!--
32+
Copyright 20?? The Flutter Authors
33+
Use of this source code is governed by a BSD-style license that can be
34+
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
35+
-->
36+
```
37+
38+
## Instructions
39+
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.
41+
- 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.
44+
45+
## Examples (for 2026)
46+
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+
```
53+
54+
### YAML
55+
```yaml
56+
# Copyright 2026 The Flutter Authors
57+
# Use of this source code is governed by a BSD-style license that can be
58+
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
59+
```
60+
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+
-->
68+
```

0 commit comments

Comments
 (0)