Skip to content

feat: install agent skills into scaffolded projects and canonicalize AGENTS.md - #1015

Open
YusukeHirao wants to merge 7 commits into
devfrom
feature/agent-skills-integration
Open

feat: install agent skills into scaffolded projects and canonicalize AGENTS.md#1015
YusukeHirao wants to merge 7 commits into
devfrom
feature/agent-skills-integration

Conversation

@YusukeHirao

Copy link
Copy Markdown
Member

概要

scaffold で生成する案件プロジェクトに、frontend-guidelines の Agent Skillsdzero-*)を導入します。生成時に自動でスキルを展開し、以後は yarn skills:sync で更新に追従できるようにします。あわせて、Cursor が CLAUDE.md を読まない問題に対処するため常時ロードの指示ファイルを AGENTS.md に正本化します。

変更内容

@d-zero/scaffold

  • AGENTS.md を新設(正本化): 共通ルールを CLAUDE.md から移設し、Cursor / Claude Code の両方に届くようにする。CLAUDE.md は @AGENTS.md を読み込む薄いラッパーに
    • 「UI・機能の実装に着手する前に dzero-tech-selection スキルを必読し実装レイヤーを決定する」ルールを追加
  • skills:sync スクリプトを追加: バージョン固定の skills CLI で frontend-guidelines(main ブランチ)の skills/.claude/skills/ に copy 展開する。更新も同スクリプトの再実行(差分は PR でレビュー)
  • .prettierignore を追加: skills CLI が管理する skills-lock.json.claude/skills/ を prettier の書き換えから除外(配布元とのハッシュ照合が壊れるのを防ぐ)
  • cspell に dzero を登録

@d-zero/create-frontend

  • 生成フローの依存インストール後に Install agent skills アクションを追加。スキル取得元とバージョンは plopfile の定数(scaffold の skills:sync と同期)
  • --no-install 時はスキップ。ネットワーク失敗時も生成は継続し、後から yarn skills:sync で導入可能
  • スナップショット更新(AGENTS.md / .prettierignore の追加とアクション行)

リポジトリルート

  • .gitignoreAGENTS.md(エージェントランタイム用の全階層 ignore)に対し、scaffold テンプレートの AGENTS.md だけ追跡できるよう否定パターンを追加

依存関係

動作確認

  • yarn lint / yarn build / yarn test(357 件)通過
  • skills CLI のローカル実行で .claude/skills/ への copy 展開・skills-lock.json 生成・再実行での上書き更新を確認済み

🤖 Generated with Claude Code

…cal agent instructions

- Move common agent rules from CLAUDE.md to AGENTS.md so Cursor also loads them;
  CLAUDE.md becomes a thin @AGENTS.md wrapper
- Mandate reading the dzero-tech-selection skill before implementation
- Add skills:sync script that installs dzero-* skills from d-zero-dev/frontend-guidelines
  (main branch) into .claude/skills/ via the pinned skills CLI
- Ignore skills-lock.json and .claude/skills/ in prettier to avoid drift with upstream
- Register the dzero word in cspell
Run the pinned skills CLI after dependency installation to copy the
dzero-* skills into .claude/skills/. Skipped with --no-install, and
generation continues with a hint to run yarn skills:sync if the fetch
fails.
Pinning the version inside the skills:sync script kept it out of
renovate's reach. Install skills as a pinned devDependency instead and
let npx resolve the local binary, so version updates flow through the
normal dependency update process.
Delegate to the generated project's skills:sync script so the skill
source URL and CLI version live only in the scaffold package.json.
… checks

State in AGENTS.md that browser checks (rendering, behavior,
interactions) must use the chrome-devtools MCP already configured
in .mcp.json. Pairs with the guidelines skills requiring browser
verification at implementation and review time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants