Skip to content

feat: support skills_dir in agent-config.yaml - #83

Merged
pavelanni merged 2 commits into
mainfrom
feature/skills-dir-config
May 26, 2026
Merged

pavelanni merged 2 commits into
mainfrom
feature/skills-dir-config

Conversation

@pavelanni

@pavelanni pavelanni commented May 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add skills_dir field to agent-config.yaml so platform teams can control skill discovery through ConfigMaps without editing the Deployment spec
  • Resolution priority: CLI flag --skills-dir > agent-config.yaml skills_dir > default (<config-dir>/skills)
  • CLI flag kept for backward compatibility
  • Update manifest generation, docs, and demo manifests

Before (requires Deployment spec change):

args:
  - serve
  - --skills-dir
  - /skills

After (ConfigMap only):

# in agent-config.yaml
skills_dir: /skills

Fixes #78

Test plan

  • make test passes
  • make lint passes (5 pre-existing issues, no new ones)
  • Deploy skill-discovery-test with skills_dir in ConfigMap, verify skills are discovered
  • Verify CLI flag still overrides config file value

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added skills_dir as an explicit top-level configuration field in agent configuration, allowing users to specify the skills directory path in agent-config.yaml.
  • Documentation

    • Updated configuration guides to document the new skills_dir field, its default value (<config-dir>/skills), and how the --skills-dir CLI flag can override it.

Move --skills-dir from a CLI-only flag into agent-config.yaml so
platform teams can control skill discovery entirely through ConfigMaps
without editing the Deployment spec.

Resolution priority: CLI flag > agent-config.yaml > default
(<config-dir>/skills). The CLI flag is kept for backward compatibility.

- Add SkillsDir field to AgentConfig struct
- Three-tier resolution in runServe()
- Update manifest generation and HasRuntimeConfig
- Move --skills-dir from Deployment args to ConfigMap in
  skill-discovery-test.yaml
- Document in agent-config-guide.md

Fixes #78

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@coderabbitai

coderabbitai Bot commented May 26, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: f9e1352b-0868-40fb-8e0f-ce978f6e8dd7

📥 Commits

Reviewing files that changed from the base of the PR and between 5d552c2 and a64db90.

📒 Files selected for processing (7)
  • docs/agent-config-guide.md
  • docs/demo/skill-discovery-test.yaml
  • docs/oci-skills-guide.md
  • internal/cmd/agentconfig.go
  • internal/cmd/serve.go
  • pkg/manifest/agentconfig.go
  • pkg/manifest/types.go

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Walkthrough

This PR moves the --skills-dir CLI flag into the agent-config.yaml configuration file as a top-level skills_dir field. The CLI flag is retained as an override. Struct fields are added to both the manifest and agent config types, resolution logic is implemented to respect the priority order (CLI flag > config file > default), and documentation is updated to reflect the new configuration path.

Changes

Skills Directory Configuration

Layer / File(s) Summary
Data contracts and type definitions
pkg/manifest/types.go, internal/cmd/agentconfig.go
RuntimeConfig and AgentConfig struct types each gain a new SkillsDir string field mapped to YAML keys skillsDir and skills_dir respectively.
Skills directory resolution and runtime behavior
internal/cmd/serve.go
runServe now computes skillsDir with explicit priority: CLI config value takes precedence, then falls back to agentCfg.SkillsDir, then uses the default <config-dir>/skills.
Manifest generation and runtime config detection
pkg/manifest/agentconfig.go
BuildAgentConfigYAML conditionally emits skills_dir when the manifest field is non-empty, and HasRuntimeConfig now includes the SkillsDir field in its check.
Documentation and example manifests
docs/agent-config-guide.md, docs/demo/skill-discovery-test.yaml, docs/oci-skills-guide.md
User documentation, field reference, and example Kubernetes manifests are updated to show skills_dir: /skills in agent-config.yaml ConfigMap instead of passing --skills-dir /skills as a Deployment CLI argument.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • redhat-et/docsclaw#79: Extends the main agent-config guide documentation and aligns code implementation to support the new skills_dir configuration field as part of the broader effort to move agent-behavior flags into the config file.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/skills-dir-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Update skill-discovery-test.yaml comment to reference agent-config.yaml
  instead of --skills-dir flag
- Update oci-skills-guide.md to recommend skills_dir in config file
- Move skills_dir output before tools: in generated YAML for consistency
  with documentation examples

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Pavel Anni <[email protected]>
@pavelanni
pavelanni marked this pull request as ready for review May 26, 2026 23:00
@pavelanni
pavelanni merged commit d77d359 into main May 26, 2026
4 checks passed
@pavelanni
pavelanni deleted the feature/skills-dir-config branch May 26, 2026 23:00
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.

Move agent-behavior CLI flags into agent-config.yaml

1 participant