linear-issue-fixer
Skill180 starsChanged 8 months agoMITView on GitHub
Fetch the most urgent Linear issue with tag "studio" and size XS, then fix it
- Deletes or force-pushes
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cloudflare-cliSkill
- create-prSkill
- discord-community-feedbackSkill
- hosted-studio-debugSkill
- integration-testsSkill
- manage-api-keysSkill
- manage-tiersSkill
- sentry-issue-fixerSkill
- setupSkill
- studio-dbSkill
- unit-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If Linear MCP is not configured, set it up first:
- Distinctive: line 44
Use Linear MCP tools to find candidate issues:
- Distinctive: line 82
Use the AskUserQuestion tool to let the user choose which issue to work on.
- Distinctive: line 122
Before implementing, understand the relevant code:
- Distinctive: line 137
Create a clear implementation plan:
- Very specific: line 167
Use the Linear issue identifier (e.g., DXP-123) as branch prefix.
- Distinctive: line 172
Add appropriate error handling
- Distinctive: line 173
Add or update tests
- Distinctive: line 234
Create a PR with the proper template format
- Very specific: line 236
Make sure to include the Linear issue URL in the PR body with Fixes <LINEAR-ISSUE-URL> so the issue gets linked automatically.
- Distinctive: line 240
After PR is created:
- Very specific: line 288
Run claude mcp list to check status
- Very specific: line 289
Run /mcp to trigger authentication
- Distinctive: line 293
Verify the "studio" label exists in your Linear workspace
- Distinctive: line 294
Check you have access to the relevant team
- Very specific: line 298
Check Docker is running: docker compose ps
- Distinctive: line 300
Run specific test file to isolate issue
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Linear Issue Fixer
Automatically fetch the most urgent Linear issue with the "studio" label and "XS" size estimate, analyze it, implement a fix, verify with tests, and create a pull request.
Prerequisites
- Linear MCP server connected
- GitHub CLI (
gh) authenticated - Docker running (for integration tests)
- Python 3.12 with virtualenv
- Checkout
mainbranch and pull the latest changes
Linear MCP Server Setup
If Linear MCP is not configured, set it up first:
claude mcp add --transport sse linear https://mcp.linear.app/sseThen restart Claude Code and run /mcp to authenticate with Linear via OAuth.
Alternatively, add via JSON:
claude mcp add-json linear '{"command": "npx", "args": ["-y","mcp-remote","https://mcp.linear.app/sse"]}'To troubleshoot auth issues:
rm -rf ~/.mcp-authWorkflow
Step 1: Fetch Candidate XS Studio Issues
Use Linear MCP tools to find candidate issues:
1. First, check Linear MCP is connected:
Run /mcp to verify "linear" server is connected
2. Search for issues with "studio" label and XS size:
Use list_issues with:
- label: "studio"
- Sort by priority (highest first)
- limit: 10
3. Filter results to find XS-sized issues:
- Look for issues with estimate/size "XS" or 1 point
- Prioritize by urgency: Urgent > High > Medium > Low
4. If a specific issue ID was provided as argument, fetch that instead:
$ARGUMENTSPriority Levels in Linear:
- 1 = Urgent
- 2 = High
- 3 = Medium
- 4 = Low
- 0 = No priority
Step 2: User Selection
IMPORTANT: Always ask the user to select which issue to work on.
Present the candidate issues to the user with:
- Issue identifier (e.g., DXP-123)
- Title
- Priority level
- Size estimate
- Brief description summary
Use the AskUserQuestion tool to let the user choose which issue to work on. Do NOT proceed with an issue automatically - always wait for user confirmation.
Example prompt:
I found the following XS studio issues:
1. DXP-456 [High] "Fix address validation" - XS
2. DXP-789 [Medium] "Update error message" - XS
3. DXP-012 [Low] "Typo in config" - XS
Which issue would you like me to work on?Step 3: Analyze the Selected Issue
Once the user has selected an issue:
1. Get full issue details including:
- Title and description
- Current status
- Any linked issues or dependencies
- Comments with context
- Acceptance criteria
2. Understand the scope:
- What files are likely affected?
- Is this a bug fix, feature, or improvement?
- Are there any blocking dependencies?Gather from analysis:
- Issue type (bug, feature, task, improvement)
- Affected area (backend, frontend, infrastructure)
- Expected behavior vs current behavior
- Acceptance criteria
- Related files mentioned in description
Step 4: Explore the Codebase
Before implementing, understand the relevant code:
1. Launch an Explore agent to find relevant code:
- Search for files/functions mentioned in the issue
- Understand the existing implementation
- Identify patterns and conventions used
2. Read key files that will need modification
3. Check for existing tests covering the affected areaStep 5: Plan the Fix
Create a clear implementation plan:
- Root Cause / Current State
- What is the current behavior?
- Why does it need to change?
- Proposed Solution
- What changes are needed?
- Which files need modification?
- Are there related areas to consider?
- Risk Assessment
- Could this fix break other functionality?
- Does it need backward compatibility?
- Testing Strategy
- What unit tests should be added/modified?
- What integration tests are relevant?
Present the plan to the user and get approval before implementing.
Step 6: Implement the Fix
Create a Feature Branch
git checkout main git pull origin main git checkout -b <issue-identifier>-<short-description>Use the Linear issue identifier (e.g.,
DXP-123) as branch prefix.- Make Code Changes
- Implement the planned fix
- Follow codebase conventions
- Add appropriate error handling
- Add or update tests
- Commit Changes
git add <files> git commit -m "<type>: <description> Resolves <LINEAR-ISSUE-ID> Co-Authored-By: Claude <noreply@anthropic.com>"
Step 7: Run ALL Test Suites
IMPORTANT: You MUST run ALL of the following test suites before creating a PR. Do NOT skip any.
7.1 DB/SQLAlchemy Tests (Primary Backend Tests - Dockerized)
docker compose -f tests/db-sqlalchemy/docker-compose.yml --project-directory . run --build --rm tests7.2 Backend Unit Tests
.venv/bin/pytest tests/unit/ -v --tb=short --ignore=tests/unit/test_rpc_endpoint_manager.py7.3 Frontend Unit Tests
cd frontend && npm run testIf any tests fail:
- Analyze the failure
- Fix the issue
- Re-run ALL test suites until they pass
Step 8: Run Integration Tests (if needed)
For changes that affect runtime behavior:
# Ensure Docker is running with the studio
docker compose up -d
source .venv/bin/activate
export PYTHONPATH="$(pwd)"
# Run integration tests
gltest --contracts-dir . tests/integration -n 4 --ignore=tests/integration/test_validators.pyStep 9: Create Pull Request
Use the /create-pr skill to create the pull request.
This skill will:
- Push the branch to origin
- Analyze the diff against main
- Create a PR with the proper template format
Make sure to include the Linear issue URL in the PR body with Fixes <LINEAR-ISSUE-URL> so the issue gets linked automatically.
Step 10: Update Linear Issue
After PR is created:
1. Add a comment to the Linear issue with:
- Link to the PR
- Brief summary of the implementation
2. Update issue status to "In Review" or appropriate status
Use linear_add_comment and linear_update_issue toolsIssue Size Reference
| Size | Points | Typical Scope |
| XS | 1 | Trivial fix, typo, config change |
| S | 2 | Simple bug fix, small feature |
| M | 3 | Moderate feature, multiple files |
| L | 5 | Large feature, significant changes |
| XL | 8+ | Epic-level work |
Linear MCP Tools Reference
| Tool | Purpose |
linear_search_issues | Find issues with filters (labels, priority, status) |
linear_update_issue | Update issue status, assignee, etc. |
linear_add_comment | Add comment to an issue |
linear_create_issue | Create new issues |
linear_get_user_issues | Get issues assigned to a user |
Common Search Patterns
# Find urgent studio issues
linear_search_issues(labels=["studio"], priority=1)
# Find all studio issues sorted by priority
linear_search_issues(labels=["studio"], limit=20)
# Find in-progress issues
linear_search_issues(status="In Progress", teamId="...")Troubleshooting
Linear MCP Not Connected
- Run
claude mcp listto check status - Run
/mcpto trigger authentication - Clear auth with
rm -rf ~/.mcp-authand retry
Cannot Find Issues
- Verify the "studio" label exists in your Linear workspace
- Check you have access to the relevant team
- Try searching without filters first
Tests Failing
- Check Docker is running:
docker compose ps - View logs:
docker compose logs -f - Run specific test file to isolate issue
Example Session
1. Check Linear MCP connection:
> /mcp
> linear: Connected
2. Search for XS studio issues:
> list_issues(label="studio")
> Found 3 XS issues
3. Ask user to select:
> "Which issue would you like to work on?"
> 1. DXP-456 [High] "Fix address validation" - XS
> 2. DXP-789 [Medium] "Update error message" - XS
> User selects: DXP-456
4. Analyze selected issue:
- Bug: addresses without 0x prefix cause validation errors
- Affected: backend validation logic
- Acceptance: addresses like "abc123..." should be accepted
5. Explore codebase:
- Find address validation code
- Understand current validation logic
6. Plan fix:
- Add normalization to accept addresses without prefix
- Add unit test for edge case
7. Implement:
- Edit validation.py
- Add test_address_without_prefix.py
8. Test:
- docker compose -f tests/db-sqlalchemy/docker-compose.yml run tests
- All pass
9. Create PR:
- Use /create-pr skill
- Include "Fixes https://linear.app/genlayer/issue/DXP-456"
10. Update Linear:
- Add PR link as comment
- Move to "In Review"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

