Skip to content

Commit be1d7ba

Browse files
Create authoring-skills skill (#9716)
1 parent d99fca2 commit be1d7ba

5 files changed

Lines changed: 103 additions & 7 deletions

File tree

.agents/skills/adding-release-notes/scripts/add_note.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 The Flutter Authors
1+
// Copyright 2026 The Flutter Authors
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
44

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Skill Authoring Checklist
2+
3+
Copy this checklist into your response when starting the creation of a new skill.
4+
5+
```markdown
6+
Skill Development Progress:
7+
- [ ] Define Purpose: Confirm the skill is necessary and distinct from existing ones.
8+
- [ ] Naming: Select a lowercase, kebab-case name (prefer gerund form, e.g., adding-release-notes).
9+
- [ ] Description: Write a third-person "what + when" description for the YAML frontmatter.
10+
- [ ] Planning: Outline the `SKILL.md` sections (Workflow, Guidelines, Resources).
11+
- [ ] Progressive Disclosure: Identify if any content should be moved to secondary files (EXAMPLES.md, REFERENCE.md).
12+
- [ ] Automation (Dart): Ensure any utility scripts in `scripts/` are written in **Dart**.
13+
- [ ] Final Review: Ensure instructions are concise and skip "obvious" explanations.
14+
```
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Skill Authoring Examples
2+
3+
## 1. Effective YAML Frontmatter
4+
5+
**Good (Gerund + What/When Description):**
6+
```yaml
7+
---
8+
name: processing-logs
9+
description: Extracts and summarizes error patterns from system logs. Use when the user asks to analyze logs or troubleshoot runtime errors.
10+
---
11+
```
12+
13+
**Bad (Vague + First Person):**
14+
```yaml
15+
---
16+
name: helper-tool
17+
description: I can help you look at files and tell you what is wrong.
18+
---
19+
```
20+
21+
## 2. Progressive Disclosure Pattern
22+
23+
If a skill has a complex API or many configuration options, do not put them all in `SKILL.md`.
24+
25+
**SKILL.md:**
26+
```markdown
27+
## Advanced Configuration
28+
For detailed information on environment variables and performance tuning, see [CONFIG.md](CONFIG.md).
29+
```
30+
31+
## 3. Workflow Patterns
32+
33+
Always use checklists to track state.
34+
35+
```markdown
36+
## Workflow
37+
Copy this checklist:
38+
- [ ] Step 1: Analyze input.
39+
- [ ] Step 2: Generate draft.
40+
- [ ] Step 3: Run validation script.
41+
```
42+
43+
## 4. Automation with Dart
44+
45+
All scripts should be written in Dart and placed in the `scripts/` directory.
46+
47+
**Good Script Usage:**
48+
```markdown
49+
## Step 4: Add the entry
50+
Use the provided utility script to insert the note safely.
51+
`dart .agents/skills/adding-release-notes/scripts/add_note.dart "Inspector updates" "Added XYZ" TODO`
52+
```
53+
54+
## 5. Anti-Patterns to Avoid
55+
56+
- **Prohibited**: Using non-Dart languages for utility scripts.
57+
- **Prohibited**: Using Windows-style paths (always use `/`).
58+
- **Prohibited**: Offering too many options (narrow the scope to recommended defaults).
59+
- **Prohibited**: Verbose background stories (Claude already knows how to code).
60+
- **Prohibited**: Interactive prompts (Agents should be autonomous, not ask for permission at every step).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: authoring-skills
3+
description: Guides the creation of high-quality, effective skills for agentic workflows. Use when creating or modifying skills in the .agents/skills/ directory.
4+
---
5+
6+
# Authoring Skills
7+
8+
When creating or modifying skills in this repository, follow these best practices:
9+
10+
- **Antigravity Guidelines**: [Skill authoring best practices](https://antigravity.google/docs/skills)
11+
- **Anthropic Guidelines**: [Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
12+
13+
## Repository-Specific Guidelines
14+
15+
- **Location**: All skills must be placed in the `.agents/skills/` directory.
16+
- **Avoid Duplication**: Before creating a skill, check if one already exists in the [flutter/skills](https://github.com/flutter/skills/tree/main/skills) repository. If it does, do not create a local skill; instead, instruct the user to install it via `npx`.
17+
- **Naming**: Use the gerund form (**verb-ing-noun**) or **noun-phrase** (e.g., `authoring-skills`, `adding-release-notes`). Use only lowercase letters, numbers, and hyphens.
18+
- **Conciseness**: Prioritize brevity in `SKILL.md`. Agents are already highly capable; only provide context they don't already have.
19+
- **Automation**: Any utility scripts placed in the `scripts/` directory MUST be written in **Dart**.
20+
- **Progressive Disclosure**: Use the patterns below to organize instructions effectively:
21+
- [CHECKLIST.md](CHECKLIST.md): Template for tracking skill development progress.
22+
- [EXAMPLES.md](EXAMPLES.md): Local examples and anti-patterns.

pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ packages:
8585
dependency: "direct dev"
8686
description:
8787
name: build_runner
88-
sha256: "7981eb922842c77033026eb4341d5af651562008cdb116bdfa31fc46516b6462"
88+
sha256: "3552e5c2874ed47cf9ed9d6813ac71b2276ee07622f48530468b8013f1767e3f"
8989
url: "https://pub.dev"
9090
source: hosted
91-
version: "2.12.2"
91+
version: "2.13.0"
9292
built_collection:
9393
dependency: transitive
9494
description:
@@ -522,10 +522,10 @@ packages:
522522
dependency: transitive
523523
description:
524524
name: markdown
525-
sha256: "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1"
525+
sha256: ee85086ad7698b42522c6ad42fe195f1b9898e4d974a1af4576c1a3a176cada9
526526
url: "https://pub.dev"
527527
source: hosted
528-
version: "7.3.0"
528+
version: "7.3.1"
529529
matcher:
530530
dependency: transitive
531531
description:
@@ -1006,10 +1006,10 @@ packages:
10061006
dependency: transitive
10071007
description:
10081008
name: web_benchmarks
1009-
sha256: "4160714bd85af6b11e7c321a2be98ec746363b69e9a496c80207c7285889960b"
1009+
sha256: "5ba2c37aa1ae09c75485cfd029fa380a0d91d043c8db431ee858e6a504ab52a8"
10101010
url: "https://pub.dev"
10111011
source: hosted
1012-
version: "4.1.0"
1012+
version: "4.1.1"
10131013
web_socket:
10141014
dependency: transitive
10151015
description:

0 commit comments

Comments
 (0)