
yux-linear-workflow
by wuyuxiangX
SKILL.md
name: yux-linear-workflow description: Complete Linear workflow automation for development tasks. Triggers: "linear workflow", "start task", "work on issue", "create pr", "merge pr", "开始任务", "处理Issue", "创建PR", "合并PR". allowed-tools: Read, Write, Glob, Grep, Bash(git:), Bash(gh:), mcp__linear__*
Linear Workflow
Automate the complete development workflow with Linear issue tracking, from task start to merge completion.
Overview
This skill provides end-to-end workflow automation:
- Mandatory Linear verification - All Linear operations are verified
- Issue creation/selection with validation
- Branch management
- Local state persistence - Task state saved to
.claude/linear-tasks/<ISSUE_ID>.json - Status synchronization
- PR creation with CI monitoring
- Merge and cleanup
Key Features
- Mandatory Linear Connection: The
/yux-linear-startcommand will FAIL if Linear MCP is not configured or unavailable - Issue Verification: Every issue creation/selection is verified via
mcp__linear__get_issue() - Local State Files: Task state is persisted to
.claude/linear-tasks/directory (tracked by git) - Session Detection: New sessions automatically detect current Linear task context
Configuration
Before generating output, read .claude/yux-config.json:
- If
languageis set, output in that language - If file doesn't exist, detect from user input or default to English
- Load messages from
templates/messages.jsonfor the configured language
Initialize config with /yux-init if not exists.
Local State File
Each Linear task has a corresponding state file in .claude/linear-tasks/:
File format: .claude/linear-tasks/<ISSUE_ID>.json
Example: .claude/linear-tasks/LIN-456.json
{
"issue_id": "LIN-456",
"issue_uuid": "cfef1fd0-...",
"issue_title": "Implement user authentication",
"branch_name": "feat/LIN-456-user-auth",
"status": "in_progress",
"linear_url": "https://linear.app/team/issue/LIN-456",
"started_at": "2026-01-09T10:30:00Z",
"verified": true
}
Git tracking: These files are committed to git, ensuring state persists across branches and sessions.
Workflow States
| State | Linear Status | Description |
|---|---|---|
INIT | - | Workflow not started |
ISSUE_CREATED | Backlog | Issue created, no branch |
BRANCH_CREATED | Todo | Branch created, ready to work |
IN_PROGRESS | In Progress | Active development |
PR_CREATED | In Review | PR submitted, awaiting review |
CI_RUNNING | In Review | CI checks in progress |
CI_FAILED | In Progress | CI failed, needs fix |
READY_TO_MERGE | In Review | All checks passed |
MERGED | Done | PR merged, task complete |
Core Functions
1. Start Task
When user wants to start a new task:
-
MANDATORY: Verify Linear connection:
mcp__linear__list_teams()- If this fails, STOP immediately and guide user to configure Linear
- Do NOT proceed without a working Linear connection
-
Check other prerequisites:
gh auth status git rev-parse --is-inside-work-tree -
Search or create Linear issue:
- Use
mcp__linear__list_issuesfor search - Use
mcp__linear__create_issuefor new issues
- Use
-
MANDATORY: Verify issue exists:
mcp__linear__get_issue(id: "<issue-uuid>")- If verification fails, STOP and report error
-
Create branch:
- Format:
<type>/LIN-<id>-<description> - Types: feat, fix, docs, refactor, test, chore
git checkout -b <branch-name> git push -u origin <branch-name> - Format:
-
Update Linear status:
mcp__linear__update_issue(id: "<issue-uuid>", state: "In Progress") -
Save local state file:
mkdir -p .claude/linear-tasks # Write state to .claude/linear-tasks/<ISSUE_ID>.json
2. Development Tracking
During active development:
-
Validate commits follow Conventional Commits:
- Pattern:
<type>(<scope>): <description> - Valid types: feat, fix, docs, style, refactor, test, chore, perf
- Pattern:
-
Sync progress periodically:
- Add comments to Linear issue with progress updates
- Track blockers and decisions
2.5 Stage Commit (/yux-linear-commit)
For incremental commits during development:
- Show changed files categorized by type (new/modified/deleted)
- Let user select files to commit (not automatic)
- Atomic check - Suggest splitting if multiple unrelated changes detected
- Auto-generate commit message (user input is reference only)
- Claude analyzes changes and generates appropriate message
- Format with emoji prefix:
<emoji> <type>(<scope>): <subject> **What** - Specific changes made **Why** Explanation of motivation Refs: LIN-xxx **Who** Co-Authored-By: wuyuxiang 🤖 Generated by Claude AINote: Output language follows
.claude/yux-config.jsonsetting. - Execute commit - Only
git addandgit commit, NOTgit push - MANDATORY: Sync to Linear - Add comment to issue recording the commit
Emoji mapping:
| Type | Emoji | Type | Emoji |
|---|---|---|---|
| feat | ✨ | fix | 🐛 |
| docs | 📝 | style | 💄 |
| refactor | ♻️ | perf | ⚡️ |
| test | ✅ | chore | 🔧 |
Key points:
- Output language follows
.claude/yux-config.jsonsetting - Every commit is recorded to Linear (not optional)
- Sensitive files (
.env, credentials) are flagged for review - Commit message is auto-generated, user input only serves as reference
- User manually runs
git pushafter commit
3. Create Pull Request
When ready for review:
-
Generate PR content:
- Title:
[LIN-xxx] <Issue Title> - Body: Summary + changelog + test plan
- Title:
-
Create PR:
gh pr create --title "<title>" --body "<body>" --base main -
Update Linear:
- Status: In Review
- Add PR link as comment
-
Monitor CI:
- Invoke yux-ci-monitor skill
- Report status to user
4. Merge Completion
When CI passes and reviews approved:
-
Merge PR:
gh pr merge <number> --squash --delete-branch -
Cleanup:
git checkout main git pull origin main git branch -d <branch-name> -
Update Linear:
- Status: Done
- Add completion comment
Branch Naming Convention
Format: <type>/LIN-<issue-id>-<short-description>
| Type | Use Case |
|---|---|
feat | New features |
fix | Bug fixes |
docs | Documentation |
refactor | Code refactoring |
test | Test additions |
chore | Maintenance |
Examples:
feat/LIN-123-user-authfix/LIN-456-login-bugdocs/LIN-789-api-docs
Commit Message Format
Follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Refs: LIN-xxx
Examples:
feat(auth): add JWT token validationfix(ui): correct button alignmentdocs(api): update endpoint documentation
Error Handling
Linear Not Configured
Linear MCP is not configured.
To set up Linear:
1. Run /mcp in Claude Code
2. Add the Linear MCP server
3. Complete OAuth authorization
Not in Git Repository
Not inside a git repository.
Please navigate to your project directory and try again.
Branch Already Exists
Branch <name> already exists.
Options:
1. Switch to existing branch
2. Create branch with different name
3. Delete existing branch and recreate
CI Failed
CI checks failed.
Failed: <check-name>
Error: <error-message>
To fix:
1. Review the error details
2. Make necessary changes
3. Push fixes
4. CI will re-run automatically
Integration Points
Linear MCP Functions
| Function | Purpose |
|---|---|
searchIssues | Find existing issues |
createIssue | Create new issue |
getIssue | Get issue details |
updateIssue | Update status/fields |
createComment | Add progress comments |
GitHub CLI (gh)
| Command | Purpose |
|---|---|
gh auth status | Verify authentication |
gh pr create | Create pull request |
gh pr view | Get PR details |
gh pr checks | Check CI status |
gh pr merge | Merge pull request |
gh run view | Get CI run details |
Output Examples
Output language follows
.claude/yux-config.jsonsetting
Task Started
=== Task Started ===
Issue: LIN-456 - Implement user authentication
Status: In Progress
Branch: feat/LIN-456-user-auth
You can now start coding!
Task Completed
=== Task Completed! ===
Issue: LIN-456 - Implement user authentication
Status: Done
PR: #78 merged to main
Great work! Use /yux-linear-start for your next task.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon