-
Notifications
You must be signed in to change notification settings - Fork 2
Add 'daf skills' command to list and inspect available skills #337
Copy link
Copy link
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Problem
Currently, there's no easy way to:
- Discover which skills are available in the current session
- See where skills are loaded from (user/workspace/hierarchical/project)
- Inspect skill details without reading files manually
Users need to manually navigate to ~/.claude/skills/, $DEVAIFLOW_HOME/.claude/skills/, etc. to see what's available.
Solution
Add a new daf skills command with two modes:
Mode 1: List All Skills (default)
daf skillsOutput:
Available Skills (sorted by name)
User-level (~/.claude/skills/):
- daf-active Show information about the currently active conversation
- daf-cli Commands that work inside Claude Code sessions
- daf-config View current configuration (read-only)
- daf-git Manage GitHub/GitLab issues and sessions
- daf-help Show available daf commands and quick reference
- daf-info Show detailed information about the current session
- daf-jira View JIRA ticket details for current session
- daf-jira-fields JIRA field mapping rules and validation
- daf-list List all DevAIFlow sessions
- daf-notes View all progress notes for the current session
- daf-status Show status and progress dashboard
- daf-workflow Workflow guidance for development sessions
- gh-cli GitHub CLI tool for PRs and API operations
- git-cli Git version control commands
- glab-cli GitLab CLI tool for MRs and API operations
Hierarchical ($DEVAIFLOW_HOME/.claude/skills/):
- 01-enterprise Red Hat Enterprise custom fields and backend configuration
- 02-organization Red Hat Organization JIRA templates and acceptance criteria
- 03-team Red Hat Team defaults for workstream and components
- 04-user Red Hat User personal preferences and workspace configuration
Project-level (<project>/.claude/skills/):
(none)
Total: 19 skills
Mode 2: Inspect Specific Skill
daf skills <skill-name>Example:
daf skills daf-cliOutput:
Skill: daf-cli
Location: ~/.claude/skills/daf-cli/
File: ~/.claude/skills/daf-cli/SKILL.md
Frontmatter:
name: daf-cli
description: Commands that work inside Claude Code sessions for JIRA integration
user-invocable: false
Content preview:
----------------------------------------
# DAF CLI - Commands for Claude Code Sessions
**IMPORTANT**: You are currently inside an active Claude Code session.
This skill documents commands that are ALLOWED to run inside sessions.
## JIRA Commands
...
----------------------------------------
To view full content: cat ~/.claude/skills/daf-cli/SKILL.md
Benefits
- ✅ Easy skill discovery (no manual file navigation)
- ✅ See skill loading hierarchy (user > workspace > hierarchical > project)
- ✅ Quick reference for available skills
- ✅ Inspect skill details without leaving terminal
- ✅ Helpful for debugging skill loading issues
Implementation Notes
Skills discovery order (same as devflow/agent/claude_agent.py:_discover_skills_dirs()):
- User-level:
~/.claude/skills/(or$CLAUDE_CONFIG_DIR/skills/) - Workspace-level:
<workspace>/.claude/skills/ - Hierarchical:
$DEVAIFLOW_HOME/.claude/skills/ - Project-level:
<project>/.claude/skills/
Sorting:
- Skills should be sorted alphabetically within each level
- Display levels in discovery order (user → workspace → hierarchical → project)
Skill details:
- Parse YAML frontmatter (if present)
- Show first ~20 lines of content as preview
- Display full file path for easy access
Command Syntax
# List all skills
daf skills
# List with JSON output
daf skills --json
# Inspect specific skill
daf skills <skill-name>
# Inspect with JSON output
daf skills <skill-name> --jsonAcceptance Criteria
Core Functionality
-
daf skillslists all available skills sorted by name - Skills grouped by level (user/workspace/hierarchical/project)
- Each skill shows name and description (from frontmatter or first line)
- Total count displayed at bottom
Skill Details Mode
-
daf skills <name>shows full details for specific skill - Displays location, file path, and frontmatter
- Shows content preview (~20 lines)
- Includes instruction to view full content
Skills Discovery
- Uses same discovery logic as
_discover_skills_dirs() - Detects user-level, workspace-level, hierarchical, and project-level skills
- Handles
CLAUDE_CONFIG_DIRenvironment variable - Works correctly in multi-project sessions
Output Formats
-
--jsonflag produces machine-readable output - JSON includes: name, description, location, level, file_path
- Text output is well-formatted and easy to read
Error Handling
- Graceful handling when skill not found
- Clear error message if skill name is ambiguous (exists in multiple levels)
- Works when no skills directories exist
Integration
- Command works inside Claude Code sessions (read-only, safe)
- Add to daf-help skill quick reference
- Update daf-cli skill with new command
Files to Modify
devflow/cli/commands/skills_command.py- New file for command implementationdevflow/cli/main.py- Register new commanddevflow/cli_skills/daf-cli/SKILL.md- Document new commanddevflow/cli_skills/daf-help/SKILL.md- Add to quick referencetests/test_skills_command.py- Test coverage
Example JSON Output
{
"skills": [
{
"name": "daf-cli",
"description": "Commands that work inside Claude Code sessions",
"level": "user",
"location": "/Users/username/.claude/skills/daf-cli",
"file_path": "/Users/username/.claude/skills/daf-cli/SKILL.md",
"frontmatter": {
"name": "daf-cli",
"description": "Commands that work inside Claude Code sessions for JIRA integration",
"user-invocable": false
}
}
],
"total": 19,
"levels": {
"user": 15,
"workspace": 0,
"hierarchical": 4,
"project": 0
}
}Related
- Skills discovery logic:
devflow/agent/claude_agent.py:_discover_skills_dirs() - Skills deployment: existing
daf skillscommand (installs skills) - Issue Fix duplicate skills loading and improve skills discovery documentation #335: Skills loading and documentation improvements
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request