npx claudepluginhub fractary/claude-plugins --plugin fractary-workWant just this command?
Add to a custom plugin, then install with one command.
Create a new work item
"<title>" [--type "feature|bug|chore|patch"] [--body "<text>"] [--prompt "<instructions>"] [--label <label>] [--milestone <milestone>] [--assignee <user>] [--branch-create] [--spec-create]claude-opus-4-5<CRITICAL_RULES> YOU MUST:
- Parse the command arguments from user input
- Invoke the fractary-work:work-manager agent (or @agent-fractary-work:work-manager)
- Pass structured request to the agent
- Return the agent's response to the user
YOU MUST NOT:
- Perform any operations yourself
- Invoke skills directly (the work-manager agent handles skill invocation)
- Execute platform-specific logic (that's the agent's job)
WHEN COMMANDS FAIL:
- NEVER bypass the command architecture with manual bash/gh/jq commands
- NEVER use gh/jq CLI directly as a workaround
- ALWAYS report the failure to the user with error details
- ALWAYS wait for explicit user instruction on how to proceed
- DO NOT be "helpful" by finding alternative approaches
- The user decides: debug the skill, try different approach, or abort
THIS COMMAND IS ONLY A ROUTER. </CRITICAL_RULES>
<WORKFLOW> 1. **Parse user input** - Extract title (required) - Parse optional arguments: --type, --body, --prompt, --label, --milestone, --assignee, --branch-create, --spec-create - Validate required arguments are present-
Capture working directory context
- Capture current directory:
WORK_CWD="${PWD}" - This ensures operations execute in the correct repository
- Critical fix for agent execution context bug
- Capture current directory:
-
Handle --prompt argument (if provided)
- If
--promptis provided but--bodyis NOT provided:- Use the conversation history plus the context instructions to generate an appropriate issue body
- The context argument provides guidance on what to include, how to structure it, or what aspects to focus on
- Leverage all relevant discussion, decisions, and plans from the current conversation
- Generate a well-structured issue body that captures the agreed-upon approach
- If both
--promptand--bodyare provided:- Use
--bodyas the base, but enhance/refine it using the context instructions
- Use
- If only
--bodyis provided (no--prompt):- Use
--bodyas-is (current behavior)
- Use
- If
-
Build structured request
- Convert
--typeto label format (e.g., "type: feature") - Merge type label with any additional --label flags
- Set
branch_createto true if --branch-create flag is provided - Set
spec_createto true if --spec-create flag is provided - Include the generated/provided body in the description field
- Package all parameters
- Include working_directory in parameters
- Convert
-
ACTUALLY INVOKE the Task tool
- Use the Task tool with subagent_type="fractary-work:work-manager"
- Pass the structured JSON request in the prompt parameter
- Do NOT just describe what should be done - actually call the Task tool
IF THE TASK TOOL INVOCATION FAILS:
- STOP IMMEDIATELY - do not attempt any workarounds
- Report the exact error message to the user
- DO NOT use bash/gh/jq CLI commands as a fallback
- DO NOT invoke skills directly
- DO NOT try alternative approaches
- Wait for user to provide explicit instruction
-
Return response
- The work-manager agent will handle the operation and return results
- Display results to the user </WORKFLOW>
<ARGUMENT_SYNTAX>
Command Argument Syntax
This command follows the space-separated argument syntax (consistent with work/repo plugin family):
- Format:
--flag value(NOT--flag=value) - Multi-word values: MUST be enclosed in quotes
- Example:
--body "This is a description"✅ - Wrong:
--body This is a description❌
Quote Usage
Always use quotes for multi-word values:
✅ /fractary-work:issue-create "Title with spaces" --body "Description with spaces"
✅ /fractary-work:issue-create "Bug fix" --type bug --label high-priority
❌ /fractary-work:issue-create Title with spaces --body Description with spaces
Single-word values don't require quotes:
✅ /fractary-work:issue-create "Title" --type feature
✅ /fractary-work:issue-create "Title" --label urgent
Labels cannot contain spaces:
✅ /fractary-work:issue-create "Title" --label urgent --label high-priority
❌ /fractary-work:issue-create "Title" --label "high priority" # Spaces not supported in label values
Use hyphens or underscores instead: high-priority, high_priority
</ARGUMENT_SYNTAX>
<ARGUMENT_PARSING>
Arguments
Required Arguments:
title: Issue title (use quotes if multi-word)
Optional Arguments:
--type: Issue type (feature|bug|chore|patch, default: feature) - Automatically converted to "type: <value>" label--body: Issue description (use quotes if multi-word) - exact text to use as body--prompt: Instructions for generating the issue body from conversation context (use quotes). When provided without--body, Claude will craft the body using the current conversation plus these instructions. This is useful for capturing discussion, decisions, and plans into a well-structured issue.--label: Additional labels (can be repeated, space-separated values not allowed)--milestone: Milestone name or number--assignee: User to assign (use @me for yourself)--branch-create: Automatically create a Git branch for this issue (requires fractary-repo plugin)--spec-create: Automatically create a specification after issue (and branch if --branch-create provided) creation (requires fractary-spec plugin)
Maps to: create-issue operation
Type Conversion: The --type flag is automatically converted to a label in the format "type: <value>". For example, --type feature becomes the label "type: feature". This label is then merged with any additional --label flags.
Body vs Prompt:
--bodyprovides the exact text to use as the issue body--promptprovides instructions for Claude to generate the body from conversation context- When both are provided,
--bodyis the base and--promptrefines it - When only
--promptis provided, Claude generates the entire body based on the conversation and instructions </ARGUMENT_PARSING>
# Create a new feature issue
/fractary-work:issue-create "Add CSV export feature" --type feature
# Create a bug with description
/fractary-work:issue-create "Fix login timeout" --type bug --body "Users logged out after 5 minutes"
# Create with multiple labels
/fractary-work:issue-create "Fix login bug" --type bug --label urgent --label security
# Create with milestone and assignee
/fractary-work:issue-create "Implement auth" --type feature --milestone "v1.0 Release" --assignee @me
# Create and automatically create branch
/fractary-work:issue-create "Add dark mode" --type feature --branch-create
# Create, create branch, and create spec (full workflow)
/fractary-work:issue-create "Add CSV export" --type feature --branch-create --spec-create
# Create issue with body generated from conversation context
# (Claude will use the discussion to craft a detailed body)
/fractary-work:issue-create "Implement user auth flow" --type feature --prompt "Include the OAuth2 approach we discussed, the token refresh strategy, and the error handling requirements"
# Create issue capturing the full problem/solution discussion
/fractary-work:issue-create "Fix race condition in queue processor" --type bug --prompt "Summarize the root cause analysis and agreed solution from our discussion"
# Use context to guide body generation with additional labels
/fractary-work:issue-create "Add dark mode support" --type feature --prompt "Focus on the CSS variables approach and component changes we identified" --label frontend --label ui
</EXAMPLES>
<AGENT_INVOCATION>
Invoking the Agent
After parsing arguments, invoke the work-manager agent with a structured request.
CRITICAL: Capture the current working directory and pass it to the agent to ensure operations execute in the correct repository.
Invoke the fractary-work:work-manager agent with the following request:
{
"operation": "create-issue",
"parameters": {
"title": "Issue title",
"description": "Optional description",
"labels": "type: feature,label1,label2",
"milestone": "Optional milestone",
"assignee": "Optional assignee",
"branch_create": false,
"spec_create": false,
"working_directory": "/path/to/project"
}
}
Note:
- Set
branch_createtotrueif the--branch-createflag is provided. This will automatically create a Git branch after the issue is created (requires fractary-repo plugin to be configured). - Set
spec_createtotrueif the--spec-createflag is provided. This will automatically create a specification after the issue (and branch if applicable) is created (requires fractary-spec plugin to be configured).
The work-manager agent will:
- Set
CLAUDE_WORK_CWDenvironment variable fromworking_directory - Validate the request
- Route to the appropriate skill (issue-creator)
- Execute the platform-specific operation (GitHub/Jira/Linear)
- Return structured results
Why working_directory is required:
When agents execute via Task tool, they run from the plugin directory, not the user's project directory. Passing working_directory ensures scripts load the correct configuration and create the issue in the correct repository. See: /.tmp/FRACTARY_WORK_PLUGIN_BUG_REPORT.md
Type Conversion
IMPORTANT: The --type flag must be converted to a label before sending to the agent.
When the user provides --type <value>, convert it to "type: <value>" label format and merge with any additional --label flags:
--type feature→"type: feature"label--type bug→"type: bug"label--type chore→"type: chore"label--type patch→"type: patch"label
Example: /fractary-work:issue-create "Title" --type bug --label urgent becomes:
{
"operation": "create-issue",
"parameters": {
"title": "Title",
"labels": "type: bug,urgent"
}
}
</AGENT_INVOCATION>
<ERROR_HANDLING> Common errors to handle:
Missing required argument:
Error: title is required
Usage: /fractary-work:issue-create <title> [--type <type>]
Invalid type:
Error: Invalid type: invalid
Valid types: feature, bug, chore, patch
</ERROR_HANDLING>
<NOTES> ## Issue TypesThe work plugin supports these universal issue types:
- feature: New functionality or enhancement
- bug: Bug fix or defect
- chore: Maintenance tasks, refactoring, dependencies
- patch: Urgent fixes, hotfixes, security patches
These map to platform-specific types automatically:
- GitHub: Uses labels (type: feature, type: bug, etc.)
- Jira: Uses issue types (Story, Bug, Task)
- Linear: Uses issue types and labels
Platform Support
This command works with:
- GitHub Issues
- Jira Cloud
- Linear
Platform is configured via /fractary-work:init and stored in .fractary/plugins/work/config.json.
Prompt-Based Body Generation
The --prompt argument enables a powerful workflow pattern: after discussing a problem and solution with Claude, you can create an issue that captures all that thinking without manually writing the body.
Use Cases:
- After debugging a complex issue together, create a bug report that captures the root cause analysis
- After designing a feature approach, create an issue with the agreed-upon requirements and implementation notes
- After reviewing code and identifying improvements, create issues that capture the context of why changes are needed
How it works:
- Have a conversation with Claude about the problem/solution
- Invoke
/fractary-work:issue-createwith--promptproviding instructions - Claude reviews the conversation and crafts an issue body following your instructions
- The issue is created with a well-structured body that captures the discussion
Example workflow:
User: Let's discuss how to implement rate limiting for our API...
[... discussion about approaches, trade-offs, decisions ...]
User: /fractary-work:issue-create "Implement API rate limiting" --type feature --prompt "Include the token bucket approach we agreed on, the Redis backend decision, and the per-endpoint configuration requirements"
See Also
For detailed documentation, see: /docs/commands/work-issue.md
Related commands:
/fractary-work:issue-fetch- Fetch issue details/fractary-work:issue-list- List issues/fractary-work:issue-update- Update issue/fractary-work:issue-assign- Assign issue/fractary-work:comment-create- Add comment/fractary-work:label-add- Add labels/fractary-work:init- Configure work plugin </NOTES>