Repository navigation
Share writing and code agent skills in a site_skills package - #14132
Conversation
Move the write-technical-docs, format-markdown, write-dart, and write-flutter skills to a new packages/site_skills package so that dart-lang/site-www can install them instead of keeping its own copies. - Prefix each skill name with `site-skills-`, because package:skills only installs skills whose names begin with the providing package's name. - Scope site-specific guidance in the shared skills to the sites it applies to. - Install the skills to .agents/skills/ with package:skills, and check in CI that the installed copies match the package. Contributes to flutter#14121
|
Staged preview of the updated docs.flutter.dev site (updated for commit 6434a0f): https://flutter-docs-prod--docs-pr14132-jesskuras-shared-skill-rhx2ap6q.web.app |
|
Staged preview of the updated flutter.dev site (updated for commit 6434a0f): https://flutter-dev-230821--www-pr14132-jesskuras-shared-skill-sq8j5izk.web.app |
- Add `dart pub get` to the external install and update steps in
packages/site_skills/README.md.
- Pass `--agent generic` to `dart run skills@ get` in AGENTS.md and
packages/site_skills/README.md to match CI.
- Include `dart.dev` in the Markdown-block `{: #old-id }` guidance in
site-skills-format-markdown.
- Update the remaining unprefixed skill name in word-list.yaml and fix
minor Markdown/style nits across the touched files.
- Reinstall `.agents/skills/site-skills-*` from `packages/site_skills`.
|
@kevmoo - I put together this PR to start sharing the relevant site skills, but let me know if I missed anything. I'll create a follow-up PR on the Dart side after this lands. :) Thanks! |
There was a problem hiding this comment.
Code Review
This pull request introduces a shared site_skills package to centralize agent skills for the Dart and Flutter websites, renaming existing skills with a site-skills- prefix and establishing packages/site_skills/skills/ as the single source of truth. It also updates the skill configurations, adds installation and contribution documentation in AGENTS.md and packages/site_skills/README.md, and introduces new rules such as American spelling and Latin abbreviation guidelines. The review feedback highlights several alphabetical sorting issues within the word-list.yaml file that need to be corrected.
| - term: "add-to-app" | ||
| status: style | ||
| guidance: >- | ||
| Hyphenate when referring to the Flutter feature | ||
| or when using the term as a compound modifier. | ||
| For an action, write "add Flutter to an existing app". | ||
| Lowercase except at the start of a sentence, heading, or list item. | ||
|
|
||
| - term: "ad hoc" | ||
| status: ok | ||
| guidance: >- | ||
| OK in database and analytics contexts to mean free-form or user-written. | ||
| Don't hyphenate or italicize. |
There was a problem hiding this comment.
The entry for ad hoc should be sorted before add-to-app to maintain alphabetical order, as specified in the file's header instructions.
- term: "ad hoc"
status: ok
guidance: >-
OK in database and analytics contexts to mean free-form or user-written.
Don't hyphenate or italicize.
- term: "add-to-app"
status: style
guidance: >-
Hyphenate when referring to the Flutter feature
or when using the term as a compound modifier.
For an action, write "add Flutter to an existing app".
Lowercase except at the start of a sentence, heading, or list item.References
- The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)
| - term: "e.g." | ||
| status: dont-use | ||
| prefer: ["for example", "such as"] | ||
| guidance: >- | ||
| People confuse e.g. and i.e. | ||
| see: ["i.e."] | ||
|
|
||
| - term: "each" | ||
| status: caution | ||
| prefer: ["all"] | ||
| guidance: >- | ||
| Each refers to items taken individually, not collectively, | ||
| and isn't a synonym for all. | ||
|
|
||
| - term: "earlier" | ||
| status: ok | ||
| guidance: >- | ||
| Use for a range of version numbers, | ||
| such as version 2.2 or earlier, not lower. | ||
| For a document position, use earlier or preceding. | ||
| see: ["later", "lower"] | ||
|
|
||
| - term: "easy, easily" | ||
| status: caution | ||
| guidance: >- | ||
| What's easy for you might not be for others. | ||
| Usually you can convey the same meaning without it. | ||
|
|
||
| - term: "ecommerce" | ||
| status: style | ||
| guidance: >- | ||
| One word, not e-commerce. | ||
|
|
There was a problem hiding this comment.
The entry for each should be sorted before e.g. to maintain alphabetical order, as specified in the file's header instructions.
- term: "each"
status: caution
prefer: ["all"]
guidance: >-
Each refers to items taken individually, not collectively,
and isn't a synonym for all.
- term: "earlier"
status: ok
guidance: >-
Use for a range of version numbers,
such as version 2.2 or earlier, not lower.
For a document position, use earlier or preceding.
see: ["later", "lower"]
- term: "easy, easily"
status: caution
guidance: >-
What's easy for you might not be for others.
Usually you can convey the same meaning without it.
- term: "ecommerce"
status: style
guidance: >-
One word, not e-commerce.
- term: "e.g."
status: dont-use
prefer: ["for example", "such as"]
guidance: >-
People confuse e.g. and i.e.
see: ["i.e."]References
- The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)
| - term: "i.e." | ||
| status: dont-use | ||
| prefer: ["that is"] | ||
| guidance: >- | ||
| People confuse e.g. and i.e. | ||
| see: ["e.g."] | ||
|
|
||
| - term: "ID" | ||
| status: style | ||
| guidance: >- | ||
| In prose, use ID, not Id or id. | ||
| In code identifiers, | ||
| follow the language's capitalization convention, | ||
| such as userId in Dart. | ||
| Sometimes spell out as identifier. | ||
|
|
There was a problem hiding this comment.
The entry for ID should be sorted before i.e. to maintain alphabetical order, as specified in the file's header instructions.
- term: "ID"
status: style
guidance: >-
In prose, use ID, not Id or id.
In code identifiers,
follow the language's capitalization convention,
such as userId in Dart.
Sometimes spell out as identifier.
- term: "i.e."
status: dont-use
prefer: ["that is"]
guidance: >-
People confuse e.g. and i.e.
see: ["e.g."]References
- The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)
| - term: "pre-existing" | ||
| status: style | ||
| guidance: >- | ||
| Hyphenate, not preexisting. | ||
|
|
||
| - term: "prebuilt" | ||
| status: style | ||
| guidance: >- | ||
| One word, not pre-built. | ||
|
|
There was a problem hiding this comment.
The entry for prebuilt should be sorted before pre-existing to maintain alphabetical order, as specified in the file's header instructions.
- term: "prebuilt"
status: style
guidance: >-
One word, not pre-built.
- term: "pre-existing"
status: style
guidance: >-
Hyphenate, not preexisting.References
- The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)
parlough
left a comment
There was a problem hiding this comment.
It's a bit unfortunate to have to duplicate the files within flutter/website but I think it's fine for now. Eventually, package:skills could support symlinks for local/relative files: dart-lang/ai#724. Thanks for exploring this! Just two small updates:
| - On `docs.flutter.dev` and `flutter.dev`, | ||
| use `<FragmentTarget id="old-id" />` on its own line | ||
| for an additional ID before a heading or mid-section. | ||
| Stack one `<FragmentTarget>` tag per ID when multiple aliases are needed, | ||
| and separate the tag or group from following Markdown blocks | ||
| with a blank line. | ||
| Markdown files on `dart.dev` don't support the `<FragmentTarget>` tag. |
There was a problem hiding this comment.
dart.dev supports <FragmentTarget> now as of dart-lang/site-www@fcbd888, so feel free to update this to apply to all three sites.
|
|
||
| resolution: workspace | ||
| environment: | ||
| sdk: ^3.14.0-0 |
There was a problem hiding this comment.
| sdk: ^3.14.0-0 | |
| sdk: ^3.14.0 |
- Merge upstream/main and resolve the conflict in .github/workflows/dart.yml. - Update packages/site_skills/pubspec.yaml SDK constraint to ^3.14.0. - Update FragmentTarget guidance in site-skills-format-markdown to cover docs.flutter.dev, flutter.dev, and dart.dev. - Fix alphabetical order of `ad hoc` before `add-to-app` in word-list.yaml. - Update `write-dart` reference in newly added write-jaspr skill to `site-skills-write-dart`. - Reinstall `.agents/skills/site-skills-*` from `packages/site_skills`.
🚀 Staged previews
|
…7662) Installs the shared writing, Markdown, and Dart agent skills from `flutter/website`'s `packages/site_skills` package (added in flutter/website#14132) and removes the older repo-local `proofread-markdown` skill. - **Add `site_skills` to `site/pubspec.yaml`.** Pinned to commit `c4b2b80aa6d3905965d17b5e058a2c86418ef363` of `flutter/website`. - **Install the three Dart-applicable skills with `package:skills`.** `.agents/skills/site-skills-{write-technical-docs,format-markdown,write-dart}` and `.config/dart_skills/skills_config.json` are generated by `dart run skills@ get --package site_skills --agent generic --skill site-skills-write-technical-docs --skill site-skills-format-markdown --skill site-skills-write-dart` (skipping `site-skills-write-flutter`). - **Replace `proofread-markdown`.** Removes `.agents/skills/proofread-markdown/` and updates `.agents/skills/contribute-blog/SKILL.md` to reference `site-skills-write-technical-docs`, `site-skills-format-markdown`, and `site-skills-write-dart`. - **Document update workflow.** Adds the shared skills and update steps to `.agents/README.md` and directs edits away from installed copies in `AGENTS.md`. - **Check for drift in CI.** Adds a `Check installed agent skills` step to `.github/workflows/test.yml` that reruns the installation and fails if `.agents/skills` changes. _AI disclosure: drafted with AI assistance._ Fixes flutter/website#14121 --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. - [ ] This PR doesn't contain automatically generated corrections or text (Grammarly, LLMs, and similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
Description of what this PR is changing or adding, and why:
Moves the writing and code agent skills into a new
packages/site_skillspackage sodart-lang/site-wwwcan install them instead of maintaining its own copies.packages/site_skills. It holdswrite-technical-docs,format-markdown,write-dart, andwrite-flutterunderskills/, plus a README that explains how to edit and install them.site-skills-prefix.package:skillsonly installs a dependency's skills when their names begin with the package name, sowrite-dartbecomessite-skills-write-dart, and so on. Cross-references, including those incontribute-blogandwrite-jaspr, are updated.write-flutterpairing conditional on the skill being installed.write-technical-docs.format-markdown, includingdart.dev.https://example.comURL in the image syntax example so theskills_lintcheck-relative-pathsrule passes.package:skills..agents/skills/site-skills-*and.config/dart_skills/skills_config.jsonare generated bydart run skills@ get --package site_skills --all --agent generic.AGENTS.mddirects edits to the package source.dart.ymlreruns the installation and fails if.agents/skillschanges.Notes for reviewers:
write-flutterstays next to thewrite-dartskill it builds on.dart-lang/site-wwwcan skip installing it.AI disclosure: drafted with AI assistance.
Issues fixed by this PR (if any):
Contributes to #14121. A follow-up PR in
dart-lang/site-wwwadds the dependency and replacesproofread-markdownafter this PR lands.PRs or commits this PR depends on (if any):
None.
Presubmit checklist