routes.skills
FastAPI routes for skills discovery and management.
Uses agent-skills library for proper skill discovery.
SkillInfo Objects
class SkillInfo(BaseModel)
Information about a discovered skill.
SkillsListResponse Objects
class SkillsListResponse(BaseModel)
Response for listing skills.
list_skills
@router.get("", response_model=SkillsListResponse)
async def list_skills(request: Request) -> SkillsListResponse
List all available skills.
Discovers skills from the configured skills directory using the agent-skills library.
Returns:
List of available skills with their metadata.
get_skill
@router.get("/{skill_id}", response_model=SkillInfo)
async def get_skill(skill_id: str, request: Request) -> SkillInfo
Get information about a specific skill.
Arguments:
skill_id- The skill identifier (name).
Returns:
Skill information if found.
Raises:
HTTPException- If skill is not found.
get_skill_content
@router.get("/{skill_id}/content")
async def get_skill_content(skill_id: str, request: Request) -> dict[str, Any]
Get the full content of a skill including its SKILL.md content.
Arguments:
skill_id- The skill identifier (name).
Returns:
Full skill content and metadata.
Raises:
HTTPException- If skill is not found.