--skill-dir.
For the full service YAML reference, see Deploy Services with MeshAgent.
When this pattern makes sense
Use this pattern when:- the skills are private and you do not want to pull them from a public repo at runtime
- you want a versioned, reproducible skill set baked into a service
- you want a custom agent or service to auto-load skills through
--skill-dir - you want a room to start with a seeded set of skills before anyone edits them
End-to-end example: bundle a skills repo for a process agent
This example assumes you already have a repo or folder of Agent Skills you want to ship. Theanthropic_skills sample packages those skills into an image, mounts them at /skills, copies them into /data/skills, and starts a meshagent process agent with --skill-dir /data/skills.
Step 1: Package your skills into an image
Start with a skills repo that contains one or more skill directories, each with its ownSKILL.md. In the existing sample, the skills come from the open Anthropic skills repo.
At runtime, the MeshAgent service expects those skills to be present in an image that can be mounted read-only into the container.
Build The Skills Image
Build The Skills Image
Clone the skills repo:Create a scratch Build and push the image:What the build arguments mean
bash
Dockerfile in the repo root:bash
<REGISTRY>: Container registry host such asdocker.io,ghcr.io, orus-west1-docker.pkg.dev.<NAMESPACE>: Your registry account or organization name.<IMAGE_NAME>: The repository name for the image.<TAG>: A version label such aslatestor2026-03-03.docker buildx build .: Builds from the current directory using Buildx.-t: Tags the image with the full name.--platform linux/amd64: Builds a Linux AMD64 image.--push: Pushes the built image to the registry.
bash
Step 2: Create the MeshAgent service spec
Use ameshagent.yaml file that mounts the skills image and starts a process agent that loads the copied skills.
container.storage.images.image: <REGISTRY>/<NAMESPACE>/<IMAGE_NAME>:<TAG>
Step 3: Understand what this service is doing
The sample does four important things:- It mounts the room filesystem at
/data. - It mounts the skills image at
/skills. - It copies the skills into
/data/skillson startup. - It starts
meshagent process join --skill-dir /data/skillswith the tools and rules the skills need in order to be useful.
--skill-dir /data/skills can point at the parent folder, and MeshAgent will load the immediate child skill folders inside it. You do not need to expand every skill into its own CLI flag.
Step 4: Validate the service spec
bash
ServiceTemplate is structurally valid before deployment.
Step 5: Deploy it to a room
bash
ServiceTemplate with no required input variables, you can deploy it directly to a room.
If you want the service to be available only in one room, keep the --room flag. If you later convert the sample to a plain Service, you can follow the normal room vs project deployment rules from the packaging docs.
Step 6: Verify that the skills are available
After deployment:- Open the room in MeshAgent Studio.
- Start chatting with the deployed agent.
- Give it a task that should trigger one of the packaged skills.
- Check the agent logs if you need to confirm startup or skill discovery behavior.
Why this pattern works well
This approach works well when:- you already have a private or curated skill repo you want to reuse
- you want multiple skills to ship together
- you want the service to discover whatever skills are present in the mounted or copied skills folder
- you want stable, versioned skill content in deployment
Room-managed skills vs image-baked skills
There are two common operating modes:- Room-managed skills: easier to create, inspect, pull from GitHub, and edit inside the room.
- Image-baked skills: versioned, reproducible, and better when you want a fixed private baseline.
- The mounted image acts as the default packaged source of truth.
- On startup, the skills are copied into
/data/skills, which lives in room storage. - Because the sample uses
cp -R -n, files that already exist in room storage are not overwritten by later startups.
/data/skills.
This gives you a useful hybrid model:
- ship a stable base set of skills in the image
- let a specific room inspect or customize those skills after deployment
- keep the agent pointed at the room-backed paths it actually uses at runtime
Adapting this pattern to your own repo
If your skills repo differs from the sample:- change the mounted image in
storage.images - adjust the source path if your repo uses a different root layout
- keep the copied files under a parent folder such as
/data/skills - enable whatever tools the skills actually depend on
--skill-dir directly at that one skill directory instead.
See also
- Skills Overview: understand how skills differ from tools and rules.
- Packaging and Deploying Services: deployment paths and CLI workflows.
- Deploy Services with MeshAgent: full service YAML field reference.