Context
Part of #1208 (custom agent skills). Agents running in agentd currently have no way to receive project-level or agent-specific skills. Claude Code discovers skills from .claude/skills/ in the working directory, but there is no agentd-managed skill layer.
This is the foundation issue: define what an agentd skill looks like and implement discovery from a .agentd/skills/ directory.
Background
The project already has 16 skills in .claude/skills/ (agent-ops, git-spice, service-ops, etc.). These are Claude Code skills - markdown files with YAML frontmatter containing name, description, and optional trigger metadata. Example structure:
.claude/skills/agent-ops/SKILL.md
.claude/skills/git-spice/SKILL.md
.claude/skills/service-ops/SKILL.md
Each file has frontmatter like:
---
name: agent-ops
description: Create, monitor, message, and debug agents via the CLI.
---
# Agent Operations
...markdown content...
What to Build
1. Skill Model
Add a Skill struct (likely in crates/orchestrator/src/types.rs or a new crates/orchestrator/src/skills.rs module):
/// A discoverable skill that can be assigned to agents.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Skill {
/// Skill name (directory name or filename stem).
pub name: String,
/// Human-readable description from frontmatter.
pub description: Option<String>,
/// Full markdown content (including frontmatter).
pub content: String,
/// Filesystem path where the skill was discovered.
pub source_path: PathBuf,
}
2. Skill Discovery
Implement a function that scans a directory for skills:
/// Discover skills from a directory.
///
/// Supports two layouts (matching Claude Code conventions):
/// - `skills_dir/<name>/SKILL.md`
/// - `skills_dir/<name>.md`
pub fn discover_skills(skills_dir: &Path) -> Result<Vec<Skill>>
3. Discovery Paths
Skills should be discoverable from multiple locations with precedence:
.agentd/skills/ (project-level, primary)
~/.config/agentd/skills/ (user-level, fallback)
4. API Endpoint
Add a GET /skills endpoint to the orchestrator that returns discovered skills:
[
{
"name": "git-spice",
"description": "Branch stacking and PR management...",
"source_path": ".agentd/skills/git-spice/SKILL.md"
}
]
Acceptance Criteria
Relevant Files
crates/orchestrator/src/skills.rs - new module (primary deliverable)
crates/orchestrator/src/types.rs - Skill struct (or in skills.rs)
crates/orchestrator/src/api.rs - add GET /skills route
crates/orchestrator/src/lib.rs - add pub mod skills;
.agentd/skills/ - new directory (created in a later issue)
Stack Base
Stack on: feature/autonomous-pipeline
Parallel: no ordering constraint (this is the foundation issue)
References
Context
Part of #1208 (custom agent skills). Agents running in agentd currently have no way to receive project-level or agent-specific skills. Claude Code discovers skills from
.claude/skills/in the working directory, but there is no agentd-managed skill layer.This is the foundation issue: define what an agentd skill looks like and implement discovery from a
.agentd/skills/directory.Background
The project already has 16 skills in
.claude/skills/(agent-ops, git-spice, service-ops, etc.). These are Claude Code skills - markdown files with YAML frontmatter containingname,description, and optional trigger metadata. Example structure:Each file has frontmatter like:
What to Build
1. Skill Model
Add a
Skillstruct (likely incrates/orchestrator/src/types.rsor a newcrates/orchestrator/src/skills.rsmodule):2. Skill Discovery
Implement a function that scans a directory for skills:
3. Discovery Paths
Skills should be discoverable from multiple locations with precedence:
.agentd/skills/(project-level, primary)~/.config/agentd/skills/(user-level, fallback)4. API Endpoint
Add a
GET /skillsendpoint to the orchestrator that returns discovered skills:[ { "name": "git-spice", "description": "Branch stacking and PR management...", "source_path": ".agentd/skills/git-spice/SKILL.md" } ]Acceptance Criteria
Skillstruct defined with name, description, content, source_pathdiscover_skills()function scans a directory forSKILL.mdfiles<name>/SKILL.mdand<name>.mdlayoutsGET /skillsendpoint on orchestrator returns discovered skillsRelevant Files
crates/orchestrator/src/skills.rs- new module (primary deliverable)crates/orchestrator/src/types.rs- Skill struct (or in skills.rs)crates/orchestrator/src/api.rs- add GET /skills routecrates/orchestrator/src/lib.rs- addpub mod skills;.agentd/skills/- new directory (created in a later issue)Stack Base
Stack on:
feature/autonomous-pipelineParallel: no ordering constraint (this is the foundation issue)
References
.claude/skills/for format reference