# agent-skills Packaging reusable capabilities for a Spring AI agent as `SKILL.md` folders, loaded on demand through the `Skill` tool from `org.springaicommunity:spring-ai-agent-utils`. Article: [Agent Skills in Spring AI: Packaging Reusable Capabilities for Your Agents](https://ankurm.com/agent-skills-spring-ai-packaging-reusable-capabilities/). The whole walkthrough lives in the article; this directory is only the code and the captured output. ## Versions | Component | Version | |---|---| | Spring Boot | 4.1.1 | | Spring AI | 2.0.1 | | spring-ai-agent-utils | 0.13.0 | | Java | 25 | ## Run it ``` ./scripts/run-all.sh ``` Every test drives a hand-written scripted chat model, so no API key and no network are needed. ## What is in here | Path | What it is | |---|---| | `src/main/java/com/ankurm/agentskills/SkillClients.java` | Builds the `SkillsTool` from classpath or directory skills and a `ChatClient` with `ToolCallingAdvisor` | | `src/main/resources/skills/release-notes` | A skill with a `references/` file | | `src/main/resources/skills/sql-review` | A skill with a `scripts/` file and an `allowed-tools` key | | `src/main/resources/skills/incident-summary` | A minimal skill | | `src/test/java/.../SkillListingTest` | What the model sees before it loads anything | | `src/test/java/.../SkillLoadRoundTripTest` | The two model calls for one skill | | `src/test/java/.../SkillLoadingEdgeCasesTest` | Unknown name, duplicate name, no description, `allowed-tools` | | `src/test/java/.../ListingCostTest` | Tool-description size against inlining every body, 3 to 100 skills | ## Captured output | File | Shows | |---|---| | `output/01-skill-listing.txt` | The `Skill` tool name, schema and `` block | | `output/02-skill-load-round-trip.txt` | The tool result fed back to the model | | `output/03-loading-edge-cases.txt` | Unknown, duplicate and description-less skills | | `output/04-listing-cost.txt` | Character counts (not tokens) as skills are added | ## Not measured No real model was called. Whether a given model chooses the right skill is not tested here.