Add a label to an issue
Adds a label to an issue with optional color and description.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-work@fractary<number> <label> [--color <hex>] [--description "<text>"]claude-haiku-4-5<CRITICAL_RULES> YOU MUST:
YOU MUST NOT:
THIS COMMAND IS ONLY A ROUTER. </CRITICAL_RULES>
<WORKFLOW> 1. **Parse user input** - Extract issue number (required) - Extract label name (required) - Parse optional arguments: --color, --description - Validate required arguments are presentCapture working directory context
WORK_CWD="${PWD}"Build structured request
ACTUALLY INVOKE the Task tool
IF THE TASK TOOL INVOCATION FAILS:
Return response
<ARGUMENT_SYNTAX>
This command follows the space-separated argument syntax (consistent with work/repo plugin family):
--flag value (NOT --flag=value)Label names cannot contain spaces:
✅ /work:label-add 123 high-priority
✅ /work:label-add 123 urgent
✅ /work:label-add 123 bug --color ff0000
❌ /work:label-add 123 "high priority" # Spaces not supported in label names
Use hyphens or underscores instead:
high-priority ✅high_priority ✅high priority ❌Multi-word descriptions need quotes:
✅ /work:label-add 123 urgent --description "Requires immediate attention"
❌ /work:label-add 123 urgent --description Requires immediate attention
</ARGUMENT_SYNTAX>
<ARGUMENT_PARSING>
Required Arguments:
number (number): Issue number (e.g., 123, not "#123")label (string): Label name to add (no spaces, use hyphens/underscores). Examples: "bug", "high-priority", "needs_review"Optional Arguments:
--color (string): Label color as hex code for label creation if label doesn't exist (e.g., "ff0000" for red, "00ff00" for green). No # prefix needed--description (string): Label description for label creation if label doesn't exist, use quotes if multi-word (e.g., "High priority items")Maps to: add-label operation </ARGUMENT_PARSING>
<EXAMPLES> ## Usage Examples# Add a single label
/work:label-add 123 bug
# Add label with color
/work:label-add 123 urgent --color ff0000
# Add label with description
/work:label-add 123 high-priority --description "Critical issues requiring immediate attention"
# Add label with both
/work:label-add 123 security --color ffa500 --description "Security-related issues"
</EXAMPLES>
<AGENT_INVOCATION>
After parsing arguments, invoke the work-manager agent with a structured request.
Invoke the fractary-work:work-manager agent with the following request:
{
"operation": "add-label",
"parameters": {
"issue_number": "123",
"label": "urgent",
"color": "ff0000",
"description": "High priority items"
}
}
The work-manager agent will:
<ERROR_HANDLING> Common errors to handle:
Missing issue number:
Error: issue_number is required
Usage: /work:label-add <number> <label>
Missing label name:
Error: label name is required
Usage: /work:label-add <number> <label>
Label contains spaces:
Error: Label names cannot contain spaces: "high priority"
Use hyphens or underscores: high-priority, high_priority
</ERROR_HANDLING>
<NOTES> ## Common LabelsStandard labels include:
This command works with:
Platform is configured via /work:init and stored in .fractary/plugins/work/config.json.
For detailed documentation, see: /docs/commands/work-label.md
Related commands:
/work:label-remove - Remove label/work:label-list - List labels/work:label-set - Set all labels/work:issue-create - Create issue/work:init - Configure work plugin
</NOTES>