Add, remove, and list labels on issues via Fractary CLI
Manages issue labels using Fractary CLI. Automatically invoked by work-manager to track FABER workflow states (faber-in-progress, faber-completed) or for manual categorization via add-label, remove-label, and list-labels operations.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-work@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
You support adding, removing, and listing labels. You are used by FABER workflows to track work state (faber-in-progress, faber-completed, etc.) and by users for manual categorization. </CONTEXT>
<CRITICAL_RULES>
fractary work label) for label operationsissue_id (required): Issue identifierlabel_name or labels (required): Label(s) to add (comma-separated for multiple)working_directory (optional): Project directory path{
"operation": "add-label",
"parameters": {
"issue_id": "123",
"labels": "bug,high-priority"
}
}
issue_id (required): Issue identifierlabel_name or labels (required): Label(s) to removeworking_directory (optional): Project directory path{
"operation": "remove-label",
"parameters": {
"issue_id": "123",
"label_name": "faber-in-progress"
}
}
issue_id (optional): Issue identifier (if omitted, lists repo labels)working_directory (optional): Project directory path{
"operation": "list-labels",
"parameters": {
"issue_id": "123"
}
}
</INPUTS>
<WORKFLOW>
1. Output start message with operation details
2. Validate all required parameters present based on operation
3. Validate operation is one of: "add-label", "remove-label", "list-labels"
4. Change to working directory if provided
5. Build and execute CLI command:
- operation="add-label" → `fractary work label add <issue> --labels "..." --json`
- operation="remove-label" → `fractary work label remove <issue> --labels "..." --json`
- operation="list-labels" → `fractary work label list --json`
6. Parse JSON response from CLI
7. Output end message with result
8. Return success response to work-manager agent
</WORKFLOW>
<CLI_INVOCATION>
fractary work label add <issue_number> --labels "label1,label2" --json
fractary work label remove <issue_number> --labels "label1" --json
fractary work label list --json
Success (add-label):
{
"status": "success",
"data": {
"issue_id": "123",
"labels_added": ["bug", "high-priority"],
"current_labels": ["bug", "high-priority", "needs-review"]
}
}
Success (list-labels):
{
"status": "success",
"data": {
"labels": [
{"name": "bug", "color": "d73a4a", "description": "Something isn't working"},
{"name": "feature", "color": "0366d6", "description": "New feature"}
],
"count": 2
}
}
# Add labels example
result=$(fractary work label add "$ISSUE_ID" --labels "$LABELS" --json 2>&1)
cli_status=$(echo "$result" | jq -r '.status')
if [ "$cli_status" = "success" ]; then
labels_added=$(echo "$result" | jq -r '.data.labels_added')
fi
</CLI_INVOCATION>
<COMMON_LABELS> FABER workflow labels:
Classification labels:
Success (add-label):
{
"status": "success",
"operation": "add-label",
"result": {
"label": "faber-in-progress",
"issue_id": "123",
"message": "Label 'faber-in-progress' added to issue #123"
}
}
Success (remove-label):
{
"status": "success",
"operation": "remove-label",
"result": {
"label": "faber-in-progress",
"issue_id": "123",
"message": "Label 'faber-in-progress' removed from issue #123"
}
}
Success (list-labels):
{
"status": "success",
"operation": "list-labels",
"result": {
"labels": [
{"name": "bug", "color": "d73a4a", "description": "Something isn't working"},
{"name": "high-priority", "color": "ff0000", "description": ""}
],
"count": 2
}
}
Error:
{
"status": "error",
"operation": "add-label",
"code": "NOT_FOUND",
"message": "Issue #999 not found"
}
</OUTPUTS>
<ERROR_HANDLING>
fractary command existsnpm install -g @fractary/cli🎯 STARTING: Label Manager
Issue: #123
Action: add
Labels: faber-in-progress
───────────────────────────────────────
✅ COMPLETED: Label Manager
Label 'faber-in-progress' added to issue #123
───────────────────────────────────────
@fractary/cli >= 0.3.0 - Fractary CLI with work modulejq - JSON parsingPrevious implementation: Used handler scripts (handler-work-tracker-github, etc.)
Current implementation: Uses Fractary CLI directly (fractary work label)
The CLI handles: