Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
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.
-->

# Agent Skills
Comment thread
reidbaker marked this conversation as resolved.

This directory contains AI agent skills for this repository.

## Validation

To ensure skills meet the required specification, they are automatically validated in pre-submit checks.
You should also validate your skills locally before submitting a review.

### Running the Linter Locally

To validate skills locally before review, run the linter from the `tool` directory:

```bash
cd tool && dart run dart_skills_lint:cli
```

This will use the configuration in `tool/dart_skills_lint.yaml` to validate all skills in the `.agents/skills` directory.

Or for a single skill (also from the `tool` directory):

```bash
cd tool && dart run dart_skills_lint:cli --skill ../.agents/skills/my-skill
```

### Running via Dart Test

Alternatively, you can run the validation as a test from the `tool` directory:

```bash
cd tool && dart test test/validate_skills_test.dart
```

This ensures that the validation logic is executed in the same way as in CI.
2 changes: 1 addition & 1 deletion .agents/skills/adding-release-notes/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Add images to `packages/devtools_app/release_notes/images/` and reference them:
**Constraint**: Use **dark mode** for screenshots.

## Resources
- [README.md](../../packages/devtools_app/release_notes/README.md): Official project guidance.
- [README.md](../../../packages/devtools_app/release_notes/README.md): Official project guidance.
1 change: 1 addition & 0 deletions .agents/skills/authoring-skills/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ When creating or modifying skills in this repository, follow these best practice
- **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.
- **Conciseness**: Prioritize brevity in `SKILL.md`. Agents are already highly capable; only provide context they don't already have.
- **Automation**: Any utility scripts placed in the `scripts/` directory MUST be written in **Dart**.
- **Validation**: Skills are automatically validated using `dart_skills_lint`. Ensure your skills pass the linter before submitting. See the `README.md` in `.agents/skills/` for instructions on how to run the linter locally.
- **Progressive Disclosure**: Use the patterns below to organize instructions effectively:
- [CHECKLIST.md](CHECKLIST.md): Template for tracking skill development progress.
- [EXAMPLES.md](EXAMPLES.md): Local examples and anti-patterns.
10 changes: 10 additions & 0 deletions .agents/skills/dart_skills_lint_ignore.json
Comment thread
reidbaker marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"skills": {
"adding-release-notes": [
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still required because the example for image does not resolve.

{
"rule_id": "check-relative-paths",
"file_name": "SKILL.md"
}
]
}
}
9 changes: 9 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.0.3"
dart_skills_lint:
dependency: transitive
description:
path: "tool/dart_skills_lint"
ref: "2420128e11101002e2eac98eb90512103a388714"
resolved-ref: "2420128e11101002e2eac98eb90512103a388714"
url: "https://github.com/flutter/skills"
source: git
version: "0.2.0"
dart_style:
dependency: transitive
description:
Expand Down
10 changes: 10 additions & 0 deletions tool/dart_skills_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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_skills_lint:
rules:
check-relative-paths: error
check-absolute-paths: error
check-trailing-whitespace: error
directories:
- path: "../.agents/skills"
9 changes: 8 additions & 1 deletion tool/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ dependencies:
meta: ^1.18.0
path: ^1.9.0
yaml: ^3.1.2

dev_dependencies:
# TODO(https://github.com/flutter/devtools/issues/9771): Update to published version
dart_skills_lint:
git:
url: https://github.com/flutter/skills
path: tool/dart_skills_lint
ref: 2420128e11101002e2eac98eb90512103a388714
logging: ^1.1.1
test: ^1.25.8
35 changes: 35 additions & 0 deletions tool/test/validate_skills_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// 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.

import 'dart:async';
Comment thread
reidbaker marked this conversation as resolved.
import 'package:dart_skills_lint/dart_skills_lint.dart';
import 'package:logging/logging.dart';
import 'package:test/test.dart';

void main() {
test('Validate DevTools Skills', () async {
final Level oldLevel = Logger.root.level;
Logger.root.level = Level.ALL;
final StreamSubscription<LogRecord> subscription = Logger.root.onRecord.listen((record) {
print(record.message);
});

try {
// TODO(https://github.com/flutter/skills/issues/85): Update test
// to use dart_skills_lint.yaml for config when available.
final bool isValid = await validateSkills(
skillDirPaths: ['../.agents/skills'],
resolvedRules: {
'check-relative-paths': AnalysisSeverity.error,
'check-absolute-paths': AnalysisSeverity.error,
'check-trailing-whitespace': AnalysisSeverity.error,
Comment thread
reidbaker marked this conversation as resolved.
},
);
expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.');
} finally {
Logger.root.level = oldLevel;
await subscription.cancel();
}
});
}
Loading