Skip to content

feat(skill): add a Solr Agent Skill for the server's tools - #281

Open
adityamparikh wants to merge 2 commits into
apache:mainfrom
adityamparikh:feat/solr-agent-skill
Open

adityamparikh wants to merge 2 commits into
apache:mainfrom
adityamparikh:feat/solr-agent-skill

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

Closes #279

What

Adds src/main/resources/skills/solr/, an Agent Skill about this server's tools:

  • SKILL.md: which tool does what, and what to know before writing data (collections created with defaults share the _default configset, document ids and re-sending, how field names and values are stored, commits).
  • references/indexing.md: what each index-* tool does to the data, how responses read, partial failures.
  • references/troubleshooting.md: the server's error messages, what each means, the next call.
  • references/solr-versions.md: what differs across Solr 9.4 to 10 as seen through the tools.

README, docs/FAQ.md and AGENTS.md describe the skill. The FAQ's "thin skill for query and faceting know-how" now reads as server-specific guidance.

Why

The tools give an agent safe operations but not the behaviour behind them: ids that decide whether a re-send duplicates, a schema shared across collections, a response that does not say which documents failed. The skill holds that. It does not teach Solr itself; query syntax, analyzers and schema design are Solr Reference Guide material, which an LLM can reach through its own knowledge, web search or a docs-lookup tool.

It also avoids restating the tool descriptions, prompts and server instructions, so the prompts are unchanged.

Tests

SolrSkillFormatTest parses the frontmatter and checks the Agent Skills rules (allowed keys, name equals the directory, description at most 1024 characters, metadata is string to string), SKILL.md under 500 lines and about 5000 tokens, every reference named in SKILL.md, every relative link resolving, no scripts/, and the SEP-2640 limits of 512 files and 16 MiB.

The claims about ids, generated ids on re-send and array-valued guessed fields were checked against a Solr 9.9 container. ./gradlew build passes: 471 tests, 0 failures, 0 skipped.

Serving the skill to clients over MCP is #280.

🤖 Generated with Claude Code

adityamparikh and others added 2 commits October 24, 2026 11:40
Add src/main/resources/skills/solr/ as an Agent Skills directory: SKILL.md
plus references on indexing behaviour, the server's error messages, and
Solr version differences seen through the tools. The skill covers this
server, not Solr itself; the Solr Reference Guide covers that.

SolrSkillFormatTest enforces the Agent Skills format and the SEP-2640
size limits so a malformed skill fails the build.

Serving the skill over MCP is tracked separately in apache#280.

Closes apache#279

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

feat: write a Solr Agent Skill (skills/solr)

1 participant