Skip to content

Share writing and code agent skills in a site_skills package - #14132

Merged
jesskuras merged 3 commits into
flutter:mainfrom
jesskuras:jesskuras/shared-skills
Dec 4, 2026
Merged

jesskuras merged 3 commits into
flutter:mainfrom
jesskuras:jesskuras/shared-skills

Conversation

@jesskuras

@jesskuras jesskuras commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Moves the writing and code agent skills into a new packages/site_skills package so dart-lang/site-www can install them instead of maintaining its own copies.

  • Add packages/site_skills. It holds write-technical-docs, format-markdown, write-dart, and write-flutter under skills/, plus a README that explains how to edit and install them.
  • Rename the skills with a site-skills- prefix. package:skills only installs a dependency's skills when their names begin with the package name, so write-dart becomes site-skills-write-dart, and so on. Cross-references, including those in contribute-blog and write-jaspr, are updated.
  • Generalize site-specific guidance.
    • Make the write-flutter pairing conditional on the skill being installed.
    • Add American spelling and the Latin-abbreviation rule to the core rules of write-technical-docs.
    • Name the sites that each fragment-target syntax applies to in format-markdown, including dart.dev.
    • Use an https://example.com URL in the image syntax example so the skills_lint check-relative-paths rule passes.
  • Install the skills with package:skills. .agents/skills/site-skills-* and .config/dart_skills/skills_config.json are generated by dart run skills@ get --package site_skills --all --agent generic. AGENTS.md directs edits to the package source.
  • Check for drift in CI. A new step in dart.yml reruns the installation and fails if .agents/skills changes.

Notes for reviewers:

  • The installed copies add about 6,000 lines to the diff. The moved source files show up as renames with small edits.
  • All four skills are shared, rather than the three named in the issue, so that write-flutter stays next to the write-dart skill it builds on. dart-lang/site-www can 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-www adds the dependency and replaces proofread-markdown after this PR lands.

PRs or commits this PR depends on (if any):

None.

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks of 80 characters or fewer.

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
@flutter-website-bot

flutter-website-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

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

@flutter-website-bot

flutter-website-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

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`.
@jesskuras
jesskuras marked this pull request as ready for review November 30, 2026 19:07
@jesskuras
jesskuras requested review from a team and sfshaza2 as code owners November 30, 2026 19:07
@jesskuras
jesskuras requested a review from kevmoo November 30, 2026 19:07
@jesskuras

Copy link
Copy Markdown
Contributor Author

@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!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +105 to +117
- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)

Comment on lines +824 to +856
- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)

Comment on lines +1285 to +1300
- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)

Comment on lines +1822 to +1831
- term: "pre-existing"
status: style
guidance: >-
Hyphenate, not preexisting.

- term: "prebuilt"
status: style
guidance: >-
One word, not pre-built.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. The word list entries must be sorted alphabetically by term, ignoring leading punctuation, as specified in the file's header instructions. (link)

@parlough parlough left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:

Comment on lines +72 to +78
- 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dart.dev supports <FragmentTarget> now as of dart-lang/site-www@fcbd888, so feel free to update this to apply to all three sites.

Comment thread packages/site_skills/pubspec.yaml Outdated

resolution: workspace
environment:
sdk: ^3.14.0-0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
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`.
@flutter-website-bot

flutter-website-bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

🚀 Staged previews

Site Status Preview link Commit
docs.flutter.dev ✅ Ready Visit preview ↗ 3adb351
flutter.dev ✅ Ready Visit preview ↗ 3adb351

@jesskuras
jesskuras merged commit c4b2b80 into flutter:main Dec 4, 2026
18 checks passed
jesskuras added a commit to dart-lang/site-www that referenced this pull request Dec 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants