Bootstrap .agents/skills/ directory structure - #9639
Conversation
Adds a `test-eui-pr-in-kibana` agent skill that codifies the workflow documented in `wiki/contributing-to-eui/testing/testing-in-kibana.md`: build a local @elastic/eui tarball from a PR branch, stand up a Kibana branch consuming it, and run `yarn kbn bootstrap` so Kibana CI can run against the EUI PR before merging. Layout mirrors how elastic/kibana organizes agent assets: - `.agents/skills/` is the source of truth - `.claude/skills` and `.codex/skills` symlink to it Also extends `.gitignore` to ignore user-specific Claude Code state (`.claude/*.local.json`, `.claude/worktrees/`) while keeping the skills folder committable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Clarifies when to use published theme packages and documents theme tarball output naming plus workspace dependency caveats to avoid Kibana bootstrap failures. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Adds a new agent “skill” document to codify the manual workflow for testing an EUI PR branch inside a Kibana checkout (building local tarballs, wiring Kibana deps, bootstrapping, and optionally opening a draft PR), and updates repo ignores for local Claude Code state.
Changes:
- Add
.agents/skills/test-eui-pr-in-kibana/SKILL.mddescribing the end-to-end EUI→Kibana staging workflow. - Update
.gitignoreto ignore user-local Claude Code state files/directories.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .gitignore | Ignores .claude/*.local.json and .claude/worktrees/ user-local state. |
| .agents/skills/test-eui-pr-in-kibana/SKILL.md | Introduces a detailed skill spec for building EUI tarballs and staging them in a Kibana branch/PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| cd {KIBANA_PATH} | ||
| git status # must be clean (warn if not) | ||
| git fetch upstream main | ||
| git checkout main | ||
| git merge --ff-only upstream/main # if this fails, stop and ask | ||
| ``` |
| Kibana enforces `.nvmrc`. Each Bash invocation gets a fresh shell, so | ||
| source nvm and use the right version in the same command: | ||
|
|
||
| ```bash | ||
| cd {KIBANA_PATH} && \ | ||
| source ~/.nvm/nvm.sh && nvm use > /dev/null && \ | ||
| yarn kbn bootstrap --no-validate | ||
| ``` |
Address Copilot review feedback: explicitly check that the Kibana `upstream` remote points at elastic/kibana and that nvm is present before assuming either, instead of failing on the first command. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
My 2 cents are that an agent is not the right tool here. A much more cost-efficient, deterministic approach is a scripted one, which we already have thanks to Tomasz. Each step here is a deterministic shell command. So a script is cheaper, more reliable (no hallucination risk) and easier to test than an LLM agent. Arguably, it's also an easier one to maintain as opposed to keeping the skill in check thanks to the feedback loop (similar issue as with hand-written docs, wiki). I'd prefer for this to turn into a script that you can run locally as well, and reuses as much of the piping as possible with the CI workflow. This way, if CI is failing, we can still use it locally, which is an argument behind this experiment I suppose? But I did read every line and I don't see any obvious issues! I don't mind this being merged to main if it's useful for you specifically. |
|
@weronikaolejniczak thanks for sharing your thoughts!
i know! i'm mentioning this in the very first paragraph of the description above, but i do agree with your argument (another thing i don't like is that it depends on AI being available, which might not always be the case)
yes, i think it's a nice-to-have fallback, we might need to reach out for this awful pack-a-tarball workflow still… how about this: let's remove the skill from this PR, leave only the empty folder and the symlinks (this way we kinda bootstrap having skills in the repo), and then i open another PR with a slightly better approach that includes this same skill re-purposed as a fallback, and a one or two skills more that will activate Tomasz' workflow by default, so if somebody in the future asks an agent something like "let's test this in Kibana", it'll reply something like: "here's the recommended approach (…), should i trigger it? otherwise you can do B and C, etc." — in summary, replace this with a set of small, scoped skills |
Adds a shared .agents/skills/ directory as the canonical home for Claude Code and Codex agent skills in this repo, with symlinks from .claude/skills and .codex/skills for tool discovery. Actual skills will be added in follow-up PRs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
💚 Build SucceededHistory
cc @acstll |
💚 Build Succeeded
History
cc @acstll |
|
@tkajtoch what would be the correct way to "trigger" the new workflow? |
|
@acstll maybe I misunderstood you, if so please let me know 🙏🏻 What I meant to say is: let's not use a skill for this at all. To me a nice-to-have fallback would be a bash script. Similar like what you did with the release! I'm not confident that using LLM is a good use of resources. It takes longer, it costs more and it's harder to control the output of. But I also want to highlight this: it's only my judgement. So if the rest of the team thinks there is value to having this skill, I don't have anything against merging it. And if we do decide to write it, what I would advise is updating our wiki and in the skill, point to that wiki instead. This would greatly simplify maintenance by having one source of truth. As I read the instructions, they seem perfect for human contributors as well. |
i got that, and it makes sense… either a bash script, or updating the wiki and pointing to it, they're all valid options; in the skills "spec" there's room for scripts as well, so it could be a combination (i still see value in having a skill for "testing eui in kibana" whatever the "implementation" might be) i had removed the skill in this PR in 1c72bdf and left only the empty folders to get things moving i mainly want to experiment and share (after working in the kibana repo for months, i'm missing "stuff" in the eui repo that we could be benefiting from, in my very humble opinion), i'll close this now to think about it a bit more — i also don't want to focus on this too much |
Note
PR repurposed and description updated by Claude Code. The original skill file has been removed; the actual
test-eui-pr-in-kibanaskill will be added in a follow-up PR. This PR now only bootstraps the.agents/skills/directory structure.Summary
Important
There's a better fully-automated alternative of a workflow for testing an eui commit/branch in Kibana, that should be available soon (code). This is a fallback.
Note
Also, this workflow of manually packing tarballs and manually modifying package.json files is not something we want to have in the future, but since it's still
neededuseful, i thought it was an easy way to start adding skills to this repo! Needing to create this Kibana PR was the trigger…Tip
We could also add a variant of this that triggers a gh workflow for making a snapshot release, and then open the PR in Kibana
Adds a
test-eui-pr-in-kibanaagent skill that codifies the "Testing local EUI in local Kibana" workflow documented inwiki/contributing-to-eui/testing/testing-in-kibana.md(link).You can ask an agent something like "let's test this changes in Kibana" to trigger the skill. Which will then pack the tarballs and set it up in Kibana in a new branch, optionally pushing and creating a PR to run CI.
Layout mirrors how elastic/kibana organizes agent assets:
.agents/skills/is the source of truth.claude/skillsand.codex/skillssymlink to itAlso extends
.gitignoreto ignore user-specific Claude Code state (.claude/*.local.json,.claude/worktrees/) while keeping the skills folder committable.API Changes
N/A
Screenshots
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 None
Release Readiness
Documentation: {link to docs page(s)}Figma: {link to Figma or [issue](https://github.com/elastic/eui/blob/main/wiki/contributing-to-eui/designing)Migration guide: {steps or link, for breaking/visual changes or deprecations}Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}nothing to document, skills like this should be discoverable (?)
QA instructions for reviewer
(agent-generated, edited by me)
QA is a guided dry-run of invoking the skill.
Prereqs
via the
.codex/skillssymlink — pick whichever you use)upstreamremote pointing togit@github.com:elastic/kibana.gitPR like #9630
Steps
gh pr 9639).ls .claude/skills/andls .codex/skills/should both showtest-eui-pr-in-kibana/.Test EUI #9630 in Kibana(or whichever PR number you picked). The skill should auto-load.What to verify
packages/eui/package.jsonedit and the edit is reverted at the end (git statusclean afterwards)eui-theme-common/eui-theme-borealis, the skill detects and offers to build them; otherwise it askstest-eui-{N}-{slug}created off freshupstream/maineui_{version}_{N}.tgz)package.jsonpoints@elastic/euitofile:./...tgzand adds@elastic/eui-theme-common(published version, unless built)packages/kbn-dependency-ownership/src/rule.tsandsrc/dev/license_checker/config.tseach get an@elastic/eui-theme-commonentrygit add -A— your unrelated workingtree edits should not be picked up)
Checklist before marking Ready for Review
QA: Tested light/dark modes, high contrast, mobile, Chrome/Safari/Edge/Firefox, keyboard-only, screen readerQA: Tested in CodeSandbox and KibanaQA: Tested docs changesTests: Added/updated Jest, Cypress, and VRTChangelog: Added changelog entryBreaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist