diff --git a/.agents/agents/reidbaker-agent/README.md b/.agents/agents/reidbaker-agent/README.md index e87efc35..6e29e763 100644 --- a/.agents/agents/reidbaker-agent/README.md +++ b/.agents/agents/reidbaker-agent/README.md @@ -1,10 +1,5 @@ # Agent Skills -Skills in `.agents/skills` are managed by `npx skills`. +The skills located in `skills/` within this agent directory are locally maintained custom skills. -To fetch the skills defined in `skills-lock.json`, run: - -```bash -npx skills experimental_install -``` -Skills in `skills/` are locally managed. +For external agent skills used during development of `dart_skills_lint`, see [`tool/dart_skills_lint/.agents/skills/README.md`](../../../tool/dart_skills_lint/.agents/skills/README.md). diff --git a/tool/dart_skills_lint/.agents/skills/README.md b/tool/dart_skills_lint/.agents/skills/README.md index f4e6ae30..f3102fff 100644 --- a/tool/dart_skills_lint/.agents/skills/README.md +++ b/tool/dart_skills_lint/.agents/skills/README.md @@ -4,27 +4,38 @@ This directory (`tool/dart_skills_lint/.agents/skills/`) contains skills and con ## Setup Instructions -To set up this directory for development, you must install the remote skills using `npx`. These include general Dart development practices, testing fundamentals, and productivity tools that agents rely on. +To set up this directory for development, you must install the remote skills using the Dart `skills` package (`dart install skills@^1.0.0`). These include general Dart development practices, testing fundamentals, and productivity tools that agents rely on. Run the following commands from the `tool/dart_skills_lint/` directory to fetch the dependencies: ```sh +# Ensure the skills CLI is globally installed (version 1.0.0 or higher) +dart install skills@^1.0.0 + # Core Dart Skills -npx skills install kevmoo/dash_skills/skills/dart-best-practices -npx skills install kevmoo/dash_skills/skills/dart-doc-validation -npx skills install kevmoo/dash_skills/skills/dart-long-lines -npx skills install kevmoo/dash_skills/skills/dart-matcher-best-practices -npx skills install kevmoo/dash_skills/skills/dart-package-maintenance - -npx skills install dart-lang/skills/skills/dart-migrate-to-checks-package -npx skills install dart-lang/skills/skills/dart-build-cli-app -npx skills install dart-lang/skills/skills/dart-collect-coverage -npx skills install dart-lang/skills/skills/dart-add-unit-test -npx skills install dart-lang/skills/skills/dart-use-pattern-matching +skills add kevmoo/dash_skills \ + --skill dart-best-practices \ + --skill dart-doc-validation \ + --skill dart-long-lines \ + --skill dart-matcher-best-practices \ + --skill dart-modern-features \ + --skill dart-package-maintenance \ + --skill dart-test-coverage \ + --skill dart-test-fundamentals \ + --agent generic + +skills add dart-lang/skills \ + --skill dart-migrate-to-checks-package \ + --skill dart-build-cli-app \ + --skill dart-collect-coverage \ + --skill dart-add-unit-test \ + --skill dart-use-pattern-matching \ + --agent generic # Productivity and Workflows -npx skills install mattpocock/skills/skills/productivity/grill-me -npx skills install obra/superpowers/skills/test-driven-development +skills add mattpocock/skills --skill grill-me --agent generic +skills add obra/superpowers --skill test-driven-development --agent generic +skills add anthropics/skills --skill skill-creator --agent generic ``` ## Overview and Philosophy @@ -36,9 +47,9 @@ npx skills install obra/superpowers/skills/test-driven-development When adding new external skills to this directory, follow these guidelines: -1. Use `npx skills install` to pull them from upstream. +1. Use `skills add --skill --agent generic` to pull them from upstream. 2. Add the generated skill folder name to `.gitignore` inside this directory (`.agents/skills/.gitignore`) to prevent checking third-party content into version control. -3. Commit the updated `skills-lock.json` file located in `tool/dart_skills_lint/` to track dependency versions across the team. +3. Commit the updated configuration file located at `.config/dart_skills/skills_config.json` to track dependency versions across the team. ## Running Evaluations (Evals) @@ -78,7 +89,7 @@ We use the Anthropic static evaluation viewer to inspect the runs and grades: 1. Download and install the `skill-creator` tool (which contains the viewer scripts) into the ignored `.agents/skills/` directory: ```sh - npx skills add anthropics/skills --skill skill-creator --yes + skills add anthropics/skills --skill skill-creator --agent generic ``` 2. Run the python review generator script pointing to the skill workspace: ```sh diff --git a/tool/dart_skills_lint/.agents/skills/dart-skills-lint-integration/SKILL.md b/tool/dart_skills_lint/.agents/skills/dart-skills-lint-integration/SKILL.md index 810a6218..314e438e 100644 --- a/tool/dart_skills_lint/.agents/skills/dart-skills-lint-integration/SKILL.md +++ b/tool/dart_skills_lint/.agents/skills/dart-skills-lint-integration/SKILL.md @@ -1,11 +1,12 @@ --- name: dart-skills-lint-integration description: > - How to integrate, update, and configure the dart_skills_lint validation tool - within a repository. Make sure to use this skill whenever the user asks to - update dart_skills_lint, configure skills validation tests, fix skills linter - dependency drifts, verify repository state before editing, optimize - lint rules execution, or draft pull request submission commands. + How to roll, update, and integrate the dart_skills_lint dependency into repositories + (such as flutter/flutter). Use this skill when tasked with bumping dart_skills_lint + pinned commit refs in pubspec.yaml, configuring downstream test harnesses, + managing package hashes, and generating submission pull requests. Do NOT use + this skill for day-to-day skill validation or fixing skill markdown errors + (use dart-skills-lint-validation instead). metadata: internal: true --- diff --git a/tool/dart_skills_lint/.config/dart_skills/skills_config.json b/tool/dart_skills_lint/.config/dart_skills/skills_config.json new file mode 100644 index 00000000..106b2d0a --- /dev/null +++ b/tool/dart_skills_lint/.config/dart_skills/skills_config.json @@ -0,0 +1,573 @@ +{ + "version": 2, + "installations": { + "generic": { + "https://github.com/kevmoo/dash_skills.git": { + "skills": [ + { + "name": "dart-long-lines", + "installedAt": "2026-08-18T17:27:49.436543Z", + "contentHash": "0Ow+sE4/e0GP4e0lgVpI9Q==", + "path": "skills/dart-long-lines" + }, + { + "name": "dart-doc-validation", + "installedAt": "2026-08-18T17:27:49.438564Z", + "contentHash": "n2IqfdFOc9Gvr6Hc+ncRbA==", + "path": "skills/dart-doc-validation" + }, + { + "name": "dart-multiline-strings", + "installedAt": "2026-08-18T17:27:49.438588Z", + "isInstalled": false, + "path": "skills/dart-multiline-strings" + }, + { + "name": "dart-test-coverage", + "installedAt": "2026-08-18T17:36:39.025422Z", + "contentHash": "3o+cHW7PINj+cVkKQ/hj9g==", + "path": "skills/dart-test-coverage" + }, + { + "name": "dart-modern-features", + "installedAt": "2026-08-18T17:36:39.026875Z", + "contentHash": "AnrNPoAjYf3jrPsLb2FHXA==", + "path": "skills/dart-modern-features" + }, + { + "name": "profile-dart-code", + "installedAt": "2026-08-18T17:27:49.438594Z", + "isInstalled": false, + "path": "skills/profile-dart-code" + }, + { + "name": "dart-matcher-best-practices", + "installedAt": "2026-08-18T17:27:49.440200Z", + "contentHash": "gj8wmAmQa/OoLAkNFUjhdw==", + "path": "skills/dart-matcher-best-practices" + }, + { + "name": "dart-best-practices", + "installedAt": "2026-08-18T17:27:49.441665Z", + "contentHash": "xQp+0QhvcC1FKY6hf/YUIQ==", + "path": "skills/dart-best-practices" + }, + { + "name": "dart-package-maintenance", + "installedAt": "2026-08-18T17:27:49.443160Z", + "contentHash": "0H+7OSgyv3E0/rjt8kwlEQ==", + "path": "skills/dart-package-maintenance" + }, + { + "name": "dart-test-fundamentals", + "installedAt": "2026-08-18T17:36:39.028109Z", + "contentHash": "2HW6ObOpIuGZPyW7BMmXTA==", + "path": "skills/dart-test-fundamentals" + } + ] + }, + "https://github.com/dart-lang/skills.git": { + "skills": [ + { + "name": "dart-use-pattern-matching", + "installedAt": "2026-08-18T17:27:51.134172Z", + "contentHash": "dt0YV4d0VH2QK8z8puzumQ==", + "path": "skills/dart-use-pattern-matching" + }, + { + "name": "dart-generate-test-mocks", + "installedAt": "2026-08-18T17:27:51.134340Z", + "isInstalled": false, + "path": "skills/dart-generate-test-mocks" + }, + { + "name": "dart-use-ffigen", + "installedAt": "2026-08-18T17:27:51.134344Z", + "isInstalled": false, + "path": "skills/dart-use-ffigen" + }, + { + "name": "dart-resolve-package-conflicts", + "installedAt": "2026-08-18T17:27:51.134344Z", + "isInstalled": false, + "path": "skills/dart-resolve-package-conflicts" + }, + { + "name": "dart-collect-coverage", + "installedAt": "2026-08-18T17:27:51.136213Z", + "contentHash": "B9/qZ2V7FxeX+MIy1Pc2iA==", + "path": "skills/dart-collect-coverage" + }, + { + "name": "dart-use-primary-constructors", + "installedAt": "2026-08-18T17:27:51.136228Z", + "isInstalled": false, + "path": "skills/dart-use-primary-constructors" + }, + { + "name": "dart-setup-ffi-assets", + "installedAt": "2026-08-18T17:27:51.136229Z", + "isInstalled": false, + "path": "skills/dart-setup-ffi-assets" + }, + { + "name": "dart-migrate-to-checks-package", + "installedAt": "2026-08-18T17:27:51.138287Z", + "contentHash": "qnEkEh/eW/JmKpsNQ80yRQ==", + "path": "skills/dart-migrate-to-checks-package" + }, + { + "name": "dart-fix-runtime-errors", + "installedAt": "2026-08-18T17:27:51.138306Z", + "isInstalled": false, + "path": "skills/dart-fix-runtime-errors" + }, + { + "name": "dart-add-unit-test", + "installedAt": "2026-08-18T17:27:51.139954Z", + "contentHash": "BTBQcGE2w7XxaizcWbHAmQ==", + "path": "skills/dart-add-unit-test" + }, + { + "name": "dart-run-static-analysis", + "installedAt": "2026-08-18T17:27:51.139970Z", + "isInstalled": false, + "path": "skills/dart-run-static-analysis" + }, + { + "name": "dart-build-cli-app", + "installedAt": "2026-08-18T17:27:51.141815Z", + "contentHash": "V+mcu5FkZPIidSf7qP02dQ==", + "path": "skills/dart-build-cli-app" + } + ] + }, + "https://github.com/mattpocock/skills.git": { + "skills": [ + { + "name": "setup-pre-commit", + "installedAt": "2026-08-18T17:27:52.552866Z", + "isInstalled": false, + "path": "skills/misc/setup-pre-commit" + }, + { + "name": "git-guardrails-claude-code", + "installedAt": "2026-08-18T17:27:52.552938Z", + "isInstalled": false, + "path": "skills/misc/git-guardrails-claude-code" + }, + { + "name": "scaffold-exercises", + "installedAt": "2026-08-18T17:27:52.552941Z", + "isInstalled": false, + "path": "skills/misc/scaffold-exercises" + }, + { + "name": "migrate-to-shoehorn", + "installedAt": "2026-08-18T17:27:52.552941Z", + "isInstalled": false, + "path": "skills/misc/migrate-to-shoehorn" + }, + { + "name": "setup-ts-deep-modules", + "installedAt": "2026-08-18T17:27:52.552942Z", + "isInstalled": false, + "path": "skills/in-progress/setup-ts-deep-modules" + }, + { + "name": "loop-me", + "installedAt": "2026-08-18T17:27:52.552942Z", + "isInstalled": false, + "path": "skills/in-progress/loop-me" + }, + { + "name": "writing-fragments", + "installedAt": "2026-08-18T17:27:52.552943Z", + "isInstalled": false, + "path": "skills/in-progress/writing-fragments" + }, + { + "name": "writing-shape", + "installedAt": "2026-08-18T17:27:52.552943Z", + "isInstalled": false, + "path": "skills/in-progress/writing-shape" + }, + { + "name": "claude-handoff", + "installedAt": "2026-08-18T17:27:52.552944Z", + "isInstalled": false, + "path": "skills/in-progress/claude-handoff" + }, + { + "name": "writing-beats", + "installedAt": "2026-08-18T17:27:52.552944Z", + "isInstalled": false, + "path": "skills/in-progress/writing-beats" + }, + { + "name": "research", + "installedAt": "2026-08-18T17:27:52.552945Z", + "isInstalled": false, + "path": "skills/engineering/research" + }, + { + "name": "domain-modeling", + "installedAt": "2026-08-18T17:27:52.552945Z", + "isInstalled": false, + "path": "skills/engineering/domain-modeling" + }, + { + "name": "wayfinder", + "installedAt": "2026-08-18T17:27:52.552946Z", + "isInstalled": false, + "path": "skills/engineering/wayfinder" + }, + { + "name": "setup-matt-pocock-skills", + "installedAt": "2026-08-18T17:27:52.552946Z", + "isInstalled": false, + "path": "skills/engineering/setup-matt-pocock-skills" + }, + { + "name": "diagnosing-bugs", + "installedAt": "2026-08-18T17:27:52.552947Z", + "isInstalled": false, + "path": "skills/engineering/diagnosing-bugs" + }, + { + "name": "code-review", + "installedAt": "2026-08-18T17:27:52.552947Z", + "isInstalled": false, + "path": "skills/engineering/code-review" + }, + { + "name": "to-tickets", + "installedAt": "2026-08-18T17:27:52.552948Z", + "isInstalled": false, + "path": "skills/engineering/to-tickets" + }, + { + "name": "ask-matt", + "installedAt": "2026-08-18T17:27:52.552948Z", + "isInstalled": false, + "path": "skills/engineering/ask-matt" + }, + { + "name": "wizard", + "installedAt": "2026-08-18T17:27:52.552949Z", + "isInstalled": false, + "path": "skills/engineering/wizard" + }, + { + "name": "improve-codebase-architecture", + "installedAt": "2026-08-18T17:27:52.552949Z", + "isInstalled": false, + "path": "skills/engineering/improve-codebase-architecture" + }, + { + "name": "to-spec", + "installedAt": "2026-08-18T17:27:52.552950Z", + "isInstalled": false, + "path": "skills/engineering/to-spec" + }, + { + "name": "codebase-design", + "installedAt": "2026-08-18T17:27:52.552950Z", + "isInstalled": false, + "path": "skills/engineering/codebase-design" + }, + { + "name": "triage", + "installedAt": "2026-08-18T17:27:52.552951Z", + "isInstalled": false, + "path": "skills/engineering/triage" + }, + { + "name": "prototype", + "installedAt": "2026-08-18T17:27:52.552951Z", + "isInstalled": false, + "path": "skills/engineering/prototype" + }, + { + "name": "resolving-merge-conflicts", + "installedAt": "2026-08-18T17:27:52.552952Z", + "isInstalled": false, + "path": "skills/engineering/resolving-merge-conflicts" + }, + { + "name": "grill-with-docs", + "installedAt": "2026-08-18T17:27:52.552952Z", + "isInstalled": false, + "path": "skills/engineering/grill-with-docs" + }, + { + "name": "implement", + "installedAt": "2026-08-18T17:27:52.552953Z", + "isInstalled": false, + "path": "skills/engineering/implement" + }, + { + "name": "tdd", + "installedAt": "2026-08-18T17:27:52.552953Z", + "isInstalled": false, + "path": "skills/engineering/tdd" + }, + { + "name": "writing-for-agents", + "installedAt": "2026-08-18T17:27:52.552954Z", + "isInstalled": false, + "path": "skills/productivity/writing-for-agents" + }, + { + "name": "wait-what", + "installedAt": "2026-08-18T17:27:52.552954Z", + "isInstalled": false, + "path": "skills/productivity/wait-what" + }, + { + "name": "handoff", + "installedAt": "2026-08-18T17:27:52.552955Z", + "isInstalled": false, + "path": "skills/productivity/handoff" + }, + { + "name": "to-questionnaire", + "installedAt": "2026-08-18T17:27:52.552955Z", + "isInstalled": false, + "path": "skills/productivity/to-questionnaire" + }, + { + "name": "teach", + "installedAt": "2026-08-18T17:27:52.552956Z", + "isInstalled": false, + "path": "skills/productivity/teach" + }, + { + "name": "grill-me", + "installedAt": "2026-08-18T17:27:52.556434Z", + "contentHash": "UyaCrrVTk67EppsVYI30/g==", + "path": "skills/productivity/grill-me" + }, + { + "name": "grilling", + "installedAt": "2026-08-18T17:27:52.556522Z", + "isInstalled": false, + "path": "skills/productivity/grilling" + } + ] + }, + "https://github.com/obra/superpowers.git": { + "skills": [ + { + "name": "using-git-worktrees", + "installedAt": "2026-08-18T17:27:53.861103Z", + "isInstalled": false, + "path": "skills/using-git-worktrees" + }, + { + "name": "test-driven-development", + "installedAt": "2026-08-18T17:27:53.864197Z", + "contentHash": "PCdssGu3iJFLGNY7FvIIYA==", + "path": "skills/test-driven-development" + }, + { + "name": "systematic-debugging", + "installedAt": "2026-08-18T17:27:53.864312Z", + "isInstalled": false, + "path": "skills/systematic-debugging" + }, + { + "name": "using-superpowers", + "installedAt": "2026-08-18T17:27:53.864313Z", + "isInstalled": false, + "path": "skills/using-superpowers" + }, + { + "name": "dispatching-parallel-agents", + "installedAt": "2026-08-18T17:27:53.864314Z", + "isInstalled": false, + "path": "skills/dispatching-parallel-agents" + }, + { + "name": "executing-plans", + "installedAt": "2026-08-18T17:27:53.864315Z", + "isInstalled": false, + "path": "skills/executing-plans" + }, + { + "name": "finishing-a-development-branch", + "installedAt": "2026-08-18T17:27:53.864315Z", + "isInstalled": false, + "path": "skills/finishing-a-development-branch" + }, + { + "name": "brainstorming", + "installedAt": "2026-08-18T17:27:53.864316Z", + "isInstalled": false, + "path": "skills/brainstorming" + }, + { + "name": "writing-plans", + "installedAt": "2026-08-18T17:27:53.864316Z", + "isInstalled": false, + "path": "skills/writing-plans" + }, + { + "name": "requesting-code-review", + "installedAt": "2026-08-18T17:27:53.864317Z", + "isInstalled": false, + "path": "skills/requesting-code-review" + }, + { + "name": "receiving-code-review", + "installedAt": "2026-08-18T17:27:53.864317Z", + "isInstalled": false, + "path": "skills/receiving-code-review" + }, + { + "name": "writing-skills", + "installedAt": "2026-08-18T17:27:53.864319Z", + "isInstalled": false, + "path": "skills/writing-skills" + }, + { + "name": "verification-before-completion", + "installedAt": "2026-08-18T17:27:53.864320Z", + "isInstalled": false, + "path": "skills/verification-before-completion" + }, + { + "name": "subagent-driven-development", + "installedAt": "2026-08-18T17:27:53.864320Z", + "isInstalled": false, + "path": "skills/subagent-driven-development" + } + ] + }, + "https://github.com/anthropics/skills.git": { + "skills": [ + { + "name": "template", + "installedAt": "2026-08-18T17:36:41.168548Z", + "isInstalled": false, + "path": "template" + }, + { + "name": "theme-factory", + "installedAt": "2026-08-18T17:36:41.168617Z", + "isInstalled": false, + "path": "skills/theme-factory" + }, + { + "name": "doc-coauthoring", + "installedAt": "2026-08-18T17:36:41.168618Z", + "isInstalled": false, + "path": "skills/doc-coauthoring" + }, + { + "name": "discernment-nudge", + "installedAt": "2026-08-18T17:36:41.168618Z", + "isInstalled": false, + "path": "skills/discernment-nudge" + }, + { + "name": "claude-api", + "installedAt": "2026-08-18T17:36:41.168618Z", + "isInstalled": false, + "path": "skills/claude-api" + }, + { + "name": "xlsx", + "installedAt": "2026-08-18T17:36:41.168619Z", + "isInstalled": false, + "path": "skills/xlsx" + }, + { + "name": "pdf", + "installedAt": "2026-08-18T17:36:41.168619Z", + "isInstalled": false, + "path": "skills/pdf" + }, + { + "name": "algorithmic-art", + "installedAt": "2026-08-18T17:36:41.168620Z", + "isInstalled": false, + "path": "skills/algorithmic-art" + }, + { + "name": "internal-comms", + "installedAt": "2026-08-18T17:36:41.168620Z", + "isInstalled": false, + "path": "skills/internal-comms" + }, + { + "name": "skill-creator", + "installedAt": "2026-08-18T17:36:41.186510Z", + "contentHash": "XmGQkLldYzV5whfkKaa4MA==", + "path": "skills/skill-creator" + }, + { + "name": "canvas-design", + "installedAt": "2026-08-18T17:36:41.186631Z", + "isInstalled": false, + "path": "skills/canvas-design" + }, + { + "name": "pptx", + "installedAt": "2026-08-18T17:36:41.186632Z", + "isInstalled": false, + "path": "skills/pptx" + }, + { + "name": "slack-gif-creator", + "installedAt": "2026-08-18T17:36:41.186633Z", + "isInstalled": false, + "path": "skills/slack-gif-creator" + }, + { + "name": "webapp-testing", + "installedAt": "2026-08-18T17:36:41.186634Z", + "isInstalled": false, + "path": "skills/webapp-testing" + }, + { + "name": "frontend-design", + "installedAt": "2026-08-18T17:36:41.186634Z", + "isInstalled": false, + "path": "skills/frontend-design" + }, + { + "name": "mcp-builder", + "installedAt": "2026-08-18T17:36:41.186635Z", + "isInstalled": false, + "path": "skills/mcp-builder" + }, + { + "name": "brand-guidelines", + "installedAt": "2026-08-18T17:36:41.186636Z", + "isInstalled": false, + "path": "skills/brand-guidelines" + }, + { + "name": "docx", + "installedAt": "2026-08-18T17:36:41.186636Z", + "isInstalled": false, + "path": "skills/docx" + }, + { + "name": "academy-guide", + "installedAt": "2026-08-18T17:36:41.186637Z", + "isInstalled": false, + "path": "skills/academy-guide" + }, + { + "name": "web-artifacts-builder", + "installedAt": "2026-08-18T17:36:41.186637Z", + "isInstalled": false, + "path": "skills/web-artifacts-builder" + } + ] + } + } + } +} diff --git a/tool/dart_skills_lint/.npmrc b/tool/dart_skills_lint/.npmrc deleted file mode 100644 index 214c29d1..00000000 --- a/tool/dart_skills_lint/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry=https://registry.npmjs.org/ diff --git a/tool/dart_skills_lint/CHANGELOG.md b/tool/dart_skills_lint/CHANGELOG.md index a7f91c35..7a1c65c4 100644 --- a/tool/dart_skills_lint/CHANGELOG.md +++ b/tool/dart_skills_lint/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.5.1 + +- Migrated developer setup, integration recipes, and documentation to use `dart install skills@^1.0.0` and `dart install dart_skills_lint`. +- Removed legacy npm-based tooling artifacts (`.npmrc` and `skills-lock.json`). + ## 0.5.0 - Added support for rule-specific custom parameters in `dart_skills_lint.yaml`, allowing rules to be configured with parameter maps (e.g. passing exclusions, thresholds, length limits, etc.). diff --git a/tool/dart_skills_lint/README.md b/tool/dart_skills_lint/README.md index 4bd015c6..6ce084ee 100644 --- a/tool/dart_skills_lint/README.md +++ b/tool/dart_skills_lint/README.md @@ -52,11 +52,11 @@ Then: dart pub get ``` -#### Globally activated +#### Globally installed For multiple projects without per-project pubspec entries: ```bash -dart pub global activate dart_skills_lint +dart install dart_skills_lint ``` ### 2. `install.sh` — Linux + macOS, no Dart required @@ -234,26 +234,26 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: dart-lang/setup-dart@v1 - - run: dart pub global activate dart_skills_lint - - run: dart pub global run dart_skills_lint --skills-directory ./.claude/skills + - run: dart install dart_skills_lint + - run: dart_skills_lint --skills-directory ./.claude/skills ``` To validate a single skill directory instead, swap the last step: ```yaml - - run: dart pub global run dart_skills_lint --skill ./.claude/skills/my-skill + - run: dart_skills_lint --skill ./.claude/skills/my-skill ``` ### Recipe: Dart-native pre-commit hook A pre-commit hook that calls into the linter directly — no Husky, no Python `pre-commit` framework, just Dart and the existing -`dart pub global` tooling. +`dart install` tooling. -Activate the linter once per machine: +Install the linter globally once per machine: ```bash -dart pub global activate dart_skills_lint +dart install dart_skills_lint ``` Then install the hook into the repository (run from the repo root): @@ -264,7 +264,7 @@ cat > .git/hooks/pre-commit <<'HOOK' set -e # Lint every skill under .claude/skills before each commit. # Add --skill arguments for other locations as needed. -exec dart pub global run dart_skills_lint --skills-directory ./.claude/skills --quiet +exec dart_skills_lint --skills-directory ./.claude/skills --quiet HOOK chmod +x .git/hooks/pre-commit ``` diff --git a/tool/dart_skills_lint/bin/cli.dart b/tool/dart_skills_lint/bin/cli.dart index 265b9f92..d519944f 100644 --- a/tool/dart_skills_lint/bin/cli.dart +++ b/tool/dart_skills_lint/bin/cli.dart @@ -1,4 +1,5 @@ #!/usr/bin/env dart + // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. diff --git a/tool/dart_skills_lint/pubspec.yaml b/tool/dart_skills_lint/pubspec.yaml index 905fff1a..1c6fd45f 100644 --- a/tool/dart_skills_lint/pubspec.yaml +++ b/tool/dart_skills_lint/pubspec.yaml @@ -3,7 +3,7 @@ description: >- A static analysis linter for Agent Skills (SKILL.md) written in Dart. Validates frontmatter, naming, paths, and structure for use in CI and pre-commit hooks. -version: 0.5.0 +version: 0.5.1 resolution: workspace repository: https://github.com/flutter/agent-plugins issue_tracker: https://github.com/flutter/agent-plugins/issues diff --git a/tool/dart_skills_lint/skills-lock.json b/tool/dart_skills_lint/skills-lock.json deleted file mode 100644 index a9d2efe7..00000000 --- a/tool/dart_skills_lint/skills-lock.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "version": 1, - "skills": { - "dart-add-unit-test": { - "source": "dart-lang/skills", - "sourceType": "github", - "skillPath": "skills/dart-add-unit-test/SKILL.md", - "computedHash": "326a2b6cb57bcb4f40203e063a1060e9549a8cea0ece1a5c9a0d39a2f2b85bc8" - }, - "dart-best-practices": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-best-practices/SKILL.md", - "computedHash": "0fb4c2d73af154719350a44fa1a0eb2d19835738bed1472f8a3277fa3ed02699" - }, - "dart-build-cli-app": { - "source": "dart-lang/skills", - "sourceType": "github", - "skillPath": "skills/dart-build-cli-app/SKILL.md", - "computedHash": "2c693ba718e23155fd9acd8d2e14f5c311258ed900131b2ad12fda46ae5eebfa" - }, - "dart-checks-migration": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-checks-migration/SKILL.md", - "computedHash": "af16617754607df535feea03eb1a2512f0b166e750bc0deb58eeafe2846de0e0" - }, - "dart-cli-app-best-practices": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-cli-app-best-practices/SKILL.md", - "computedHash": "bac8c51f2ada86949f9d6bcd2a05aa40675d312a4853ff63efae2c5541daff9f" - }, - "dart-collect-coverage": { - "source": "dart-lang/skills", - "sourceType": "github", - "skillPath": "skills/dart-collect-coverage/SKILL.md", - "computedHash": "36d77c4ebc2edc7ade399ae8461776dd33a461899afda4b2b9d8e7f599d2ef6c" - }, - "dart-doc-validation": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-doc-validation/SKILL.md", - "computedHash": "acc150afe3406de17059f9215fa009ffeb1b7c0815f903c2af303380e90055c4" - }, - "dart-long-lines": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-long-lines/SKILL.md", - "computedHash": "db6543389e683823446c7ee27fb162f219cc47f209809b9fd79b012bdb944991" - }, - "dart-matcher-best-practices": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-matcher-best-practices/SKILL.md", - "computedHash": "1e408718281e630be0963d3890995cdee00a1a0955432f6ec10f5fac8ff73b3a" - }, - "dart-migrate-to-checks-package": { - "source": "dart-lang/skills", - "sourceType": "github", - "skillPath": "skills/dart-migrate-to-checks-package/SKILL.md", - "computedHash": "c63c214e28d2cfd2a3f7812da1d54c3abddba90a04d9d2dfaf91e8e8fe53a243" - }, - "dart-modern-features": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-modern-features/SKILL.md", - "computedHash": "386c4a86bbd015ad4679d228d1fc00f1aee97739d2b3ae363ef4fcfab21a1712" - }, - "dart-package-maintenance": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-package-maintenance/SKILL.md", - "computedHash": "92efdb1b873eec4e0bcb61ade541b954eee347c3ddd70c27ba22c982c318d7e6" - }, - "dart-test-coverage": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-test-coverage/SKILL.md", - "computedHash": "063e506d7b4bae28b13ae1f6d7df3eac92cf30a1a3898c12bf225d55a1dd897b" - }, - "dart-test-fundamentals": { - "source": "kevmoo/dash_skills", - "sourceType": "github", - "skillPath": "skills/dart-test-fundamentals/SKILL.md", - "computedHash": "d3b14f42e4560744d6f975acd73b9f9b8a7e6decb660421dd8bda92900208636" - }, - "dart-use-pattern-matching": { - "source": "dart-lang/skills", - "sourceType": "github", - "skillPath": "skills/dart-use-pattern-matching/SKILL.md", - "computedHash": "86ea49e8f82ebcdbfd00579c0bcaca16d3f33839c96f9d3875bee95c553daa4b" - }, - "grill-me": { - "source": "mattpocock/skills", - "sourceType": "github", - "skillPath": "skills/productivity/grill-me/SKILL.md", - "computedHash": "784f0dbb7403b0f00324bce9a112f715342777a0daee7bbb7385f9c6f0a170ea" - }, - "skill-creator": { - "source": "anthropics/skills", - "sourceType": "github", - "skillPath": "skills/skill-creator/SKILL.md", - "computedHash": "5ea13a6d9f0d4bb694405d79acd00cadec0d21bb138c4dd10fcf3c500cb835c2" - }, - "test-driven-development": { - "source": "obra/superpowers", - "sourceType": "github", - "skillPath": "skills/test-driven-development/SKILL.md", - "computedHash": "126f1ebf6ccd414f42544f6e83d8cc5adb089e1108eaffb7c400701e37eecd9f" - } - } -} diff --git a/tool/dart_skills_lint/skills/README.md b/tool/dart_skills_lint/skills/README.md index fa983681..1f365c3d 100644 --- a/tool/dart_skills_lint/skills/README.md +++ b/tool/dart_skills_lint/skills/README.md @@ -5,6 +5,6 @@ They are intended for users of the package to help them use it effectively. To install these skills into your IDE, you can use the [skills](https://pub.dev/packages/skills) package on pub: ```bash -dart pub global activate skills +dart install skills@^1.0.0 skills get ``` diff --git a/tool/dart_skills_lint/skills/dart-skills-lint-validation/SKILL.md b/tool/dart_skills_lint/skills/dart-skills-lint-validation/SKILL.md index e7036495..f0b376cb 100644 --- a/tool/dart_skills_lint/skills/dart-skills-lint-validation/SKILL.md +++ b/tool/dart_skills_lint/skills/dart-skills-lint-validation/SKILL.md @@ -24,13 +24,19 @@ If `dart_skills_lint` is in `pubspec.yaml`: dart run dart_skills_lint:cli -d .agents/skills ``` -If it's installed globally with `dart pub global activate`: +If it's installed globally with `dart install`: + +```bash +dart_skills_lint -d .agents/skills +``` + +If it's activated globally with `dart pub global activate`: ```bash dart pub global run dart_skills_lint:cli -d .agents/skills ``` -Run `dart run dart_skills_lint:cli --help` for the full flag list +Run `dart run dart_skills_lint:cli --help` (or `dart_skills_lint --help`) for the full flag list (skip the inline duplicate so it never goes stale). ## Workflow for a failing run diff --git a/tool/dart_skills_lint/test/recipe_drift_test.dart b/tool/dart_skills_lint/test/recipe_drift_test.dart index 098492b6..34989181 100644 --- a/tool/dart_skills_lint/test/recipe_drift_test.dart +++ b/tool/dart_skills_lint/test/recipe_drift_test.dart @@ -16,16 +16,12 @@ import 'package:yaml/yaml.dart'; /// broken pipeline. This test reads the README at test time and /// asserts each recipe is still well-formed. /// -/// Three checks, deliberately small: -/// 1. The README still has recipe code blocks with non-empty bodies. -/// 2. The GitHub Actions YAML still parses and still wires up the -/// expected setup-dart + install + invocation steps. -/// 3. The pre-commit hook body actually runs end-to-end against the -/// valid and invalid example fixtures and exits with the right code. -/// -/// Everything that used to translate `dart pub global run` lines into -/// `dart bin/cli.dart` lines and replay them is gone — it was fragile -/// and didn't catch anything the structural assertion above doesn't. +/// Three checks: +/// 1. The README has recipe code blocks with non-empty bodies. +/// 2. The GitHub Actions YAML parses and wires up the expected +/// setup-dart, install, and invocation steps. +/// 3. The pre-commit hook body runs end-to-end against the valid and +/// invalid example fixtures and exits with the expected codes. void main() { group('README Recipes drift', () { late _RecipeReader reader; @@ -78,30 +74,31 @@ void main() { final List runs = reader.stepsRunning(steps); expect( - runs.any((r) => r.contains('dart pub global activate dart_skills_lint')), + runs.any((r) => r.contains('dart install dart_skills_lint')), isTrue, reason: 'workflow no longer installs dart_skills_lint', ); expect( - runs.any( - (r) => - r.contains('dart pub global run dart_skills_lint') && - r.contains('--skills-directory'), - ), + runs.any((r) => r.contains('dart_skills_lint --skills-directory')), isTrue, reason: 'workflow no longer runs the linter against a skills directory', ); + expect( + runs.any((r) => r.contains('dart pub global')), + isFalse, + reason: 'workflow still references legacy dart pub global commands', + ); }); test('pre-commit hook body exits 0 on a valid fixture, non-zero on an invalid one', () async { // Run the actual hook (rewritten to call bin/cli.dart instead of a - // globally-activated linter) against both example fixtures. This + // globally-installed linter) against both example fixtures. This // catches drift in the hook's exec line, exit-code propagation, and // the linter's response to a known-good vs known-bad skill — all in // one place. final String hookBody = reader.preCommitHookBody.replaceAll( - 'dart pub global run dart_skills_lint', - 'dart "$cliPath"', + 'dart_skills_lint --skills-directory', + 'dart "$cliPath" --skills-directory', ); await _runHookAgainst(hookBody, validFixture, expectZeroExit: true);