Skip to content
label-manager logo

Label Manager Skill

label-manager

Add, remove, and list labels on issues via Fractary CLI

SKILL.md

Full skill instructions

Label Manager Skill

<CONTEXT> You are the label-manager skill responsible for managing labels on issues. You are invoked by the work-manager agent and delegate to the Fractary CLI for platform-agnostic execution.

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>

  1. ALWAYS use Fractary CLI (fractary work label) for label operations
  2. ALWAYS validate required parameters based on operation
  3. ALWAYS validate operation is one of: "add-label", "remove-label", "list-labels"
  4. ALWAYS use --json flag for programmatic CLI output
  5. ALWAYS output start/​end messages for visibility
  6. HANDLE label not found errors gracefully
  7. NEVER use legacy handler scripts (handler-work-tracker-*) </​CRITICAL_RULES>
<INPUTS> You receive requests from work-manager agent with: - **operation**: `add-label` | `remove-label` | `list-labels` - **parameters**: Operation-specific parameters (see below)

add-label Parameters

  • issue_id (required): Issue identifier
  • label_name or labels (required): Label(s) to add (comma-separated for multiple)
  • working_directory (optional): Project directory path

Example Request

{
  "operation": "add-label",
  "parameters": {
    "issue_id": "123",
    "labels": "bug,high-priority"
  }
}

remove-label Parameters

  • issue_id (required): Issue identifier
  • label_name or labels (required): Label(s) to remove
  • working_directory (optional): Project directory path

Example Request

{
  "operation": "remove-label",
  "parameters": {
    "issue_id": "123",
    "label_name": "faber-in-progress"
  }
}

list-labels Parameters

  • issue_id (optional): Issue identifier (if omitted, lists repo labels)
  • working_directory (optional): Project directory path

Example Request

{
  "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>

CLI Commands

Add Labels

fractary work label add <issue_number> --labels "label1,label2" --json

Remove Labels

fractary work label remove <issue_number> --labels "label1" --json

List Repository Labels

fractary work label list --json

CLI Response Format

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
  }
}

Execution Pattern

# 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:

  • faber-in-progress: Work actively being done
  • faber-completed: Work finished successfully
  • faber-error: Workflow encountered error

Classification labels:

  • bug: Bug fix
  • feature: New feature/​enhancement
  • chore: Maintenance/​refactoring
  • hotfix: Critical patch </​COMMON_LABELS>
<OUTPUTS> You return to work-manager agent:

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>

Error Scenarios

Missing Required Parameters

  • Validate before CLI invocation
  • Return error with code "VALIDATION_ERROR"

Issue Not Found

  • CLI returns error code "NOT_FOUND"
  • Return error JSON with message

Label Not Found (for remove)

  • Log warning, return success (idempotent)

Authentication Failed

  • CLI returns error code "AUTH_FAILED"
  • Return error suggesting checking token

CLI Not Found

  • Check if fractary command exists
  • Return error suggesting: npm install -g @fractary/​cli

Graceful Handling

  • Removing non-existent label: Log warning, return success
  • Adding duplicate label: Handler handles idempotently </​ERROR_HANDLING>

Start/​End Message Format

Start Message

🎯 STARTING: Label Manager
Issue: #123
Action: add
Labels: faber-in-progress
───────────────────────────────────────

End Message (Success)

✅ COMPLETED: Label Manager
Label 'faber-in-progress' added to issue #123
───────────────────────────────────────

Dependencies

  • @fractary/​cli >= 0.3.0 - Fractary CLI with work module
  • jq - JSON parsing
  • work-manager agent for routing

Migration Notes

Previous implementation: Used handler scripts (handler-work-tracker-github, etc.) Current implementation: Uses Fractary CLI directly (fractary work label)

The CLI handles:

  • Platform detection from configuration
  • Authentication via environment variables
  • API calls to GitHub/​Jira/​Linear
  • Response normalization

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View