Proposal: First-class support for agent-skills
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3565489. --> Reported by: [fago](https://www.drupal.org/user/16747) >>> <h3 id="summary-problem-motivation">Motivation</h3> <p>Goal: Make AI-coding agents like claude code, opencode, .. work *really* well with Drupal!</p> <p><a href="https://agentskills.io/home">Agent skills</a> is a standard introduced by claude code, but got released as separate standard and is meanwhile adopted by most widely-spread coding agents, i.e. codex, open code, cursors, ... - see <a href="https://agentskills.io/home#adoption">https://agentskills.io/home#adoption</a></p> <p>It's a simple markdown-based format, describing skills, that agents can easily find and load on demand when needed. It turns out to be a great way to provide knowledge and instructions to coding agents without filling up the context with tons of text by default.</p> <p>Atm, many developers working with AI roll their own setup, including skills and agents. At some point that makes sense, but it would be great to have a community maintained baseline of share-able skills, so we can kickstart development setups and establish good patterns.</p> <p>grashmash already built a first skill library here: <a href="https://github.com/grasmash/drupal-claude-skills">https://github.com/grasmash/drupal-claude-skills</a></p> <h3 id="summary-proposed-resolution">Outline of a proposed resolution</h3> <p>1. Let's focus on development *and* site building in the context of development here.<br> 2. Make skills usable in-dependent of a project setup (e.g. ddev vs lando vs docker-compose, ..), so they can be re-used. (The project setup shall provide its own skills.)<br> 3. Aggregate project-related skills, e.g. skills of all modules and tools used, such that coding agents can use and find them easily. We could consider building a composer plugin or extend drupal-scaffold to scaffold a skills folder for the coding agent to pick-up.<br> 4. Embrace what works for Drupal: Share good defaults via libraries/packages and allow projects to customize / override / extend. Work together to make defaults better.<br> 5. Establish a standard way for modules to share skills, e.g. a "skills" folder. So the modules installed already come with the skills needed, and they are automatically versioned with the code. So when something in a module changes, the skills can reflect that.<br> 6. Avoid vendor lock-in. Even it's standardized already, let's make it's not only built and tested for claude code, make sure to support choice e.g. via opencode.<br> 7. On top of that, consider maintain a couple of best-practice valuable skills in a project like "Agent Skills", for example<br> - a skill for working with Drupal.org issues and github MRs, i.e. is able to read issues, MR comments, sets up local-dev environments with issue forks, ...<br> - a drupal.org gitlab-ci QA skill that is able to run checks locally<br> - a skill for looking up drupal developer documentation - in the right version!<br> - a skill for Drupal config handling, e.g. with config validation<br> - a skill to look up examples from the examples project<br> - a skill to look up available config-actions and write recipes</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>- Agree on an outline - what do we need/want to address really / has priority?<br> - Figure out a good structure for skills that enables good re-use, while staying efficient. E.g. is a better to only have a few skills, referencing more knowledge, or to have plenty of small skills and let the AI agent choose?<br> - Work on find good solutions to address the outlined points.</p> <p>For 2. I'm wondering what access-level we should assume to have for the skills. Should we assume a locally running site? Or assume we have an instance of the site running remotely, reachable via a drush site-aliases? Or assume we have no running instance of the site? Possibly, we could categorize the skills based upon the assumed access-level, so agents can pick suiting skills as available.</p>
issue