linear-todo-sync
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-05-18
- Stars
- ★ 0
- Forks
- 0
02 资源文件 5
- 参考文档ENHANCEMENTS_SUMMARY.md10.4 KB
- 参考文档examples.md17.7 KB
- 参考文档README.md7.3 KB
- 参考文档reference.md13.6 KB
- 脚本scripts/sync_linear_tasks.py10.9 KB
03 SKILL.md 正文
---name: Linear Todo Syncdescription: This skill fetches open tasks assigned to the user from the Linear API and generates a markdown todo list file in the project root. This skill should be used when the user asks about their work items, wants to see what they need to work on, or requests to load/sync their Linear tasks. Requires Python 3.7+, requests, mdutils, and python-dotenv packages. Requires LINEAR_API_KEY in .env file.allowed-tools: Read, Write, Bash, Globlicense: MIT---# Linear Todo SyncAutomatically fetch assigned Linear tasks and generate a comprehensive markdown todo list in your project root. This skill queries the Linear GraphQL API to retrieve all open tasks assigned to you, organizing them by project with full details including status, priority, labels, estimates, and due dates.## Setup### 1. Install Required PackagesInstall the Python dependencies:bashpip install requests mdutils python-dotenvOr using conda:bashconda install requests python-dotenvpip install mdutils### 2. Obtain Linear API Key1. Navigate to Linear API Settings2. Click "Create new key" under Personal API Keys3. Give it a descriptive name (e.g., "Claude Code Sync")4. Copy the generated API key### 3. Configure EnvironmentCreate a .env file in your project root:bashcp .claude/skills/linear-todo-sync/assets/.env.example .envEdit .env and add your API key:LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxImportant: Ensure .env is in your .gitignore to protect your API key.### 4. Verify SetupTest the configuration by running:bashpython .claude/skills/linear-todo-sync/scripts/sync_linear_tasks.pyA markdown file named linear-todos-YYYY-MM-DD.md should appear in your project root.## How It WorksWhen triggered, this skill:1. Loads credentials from the .env file in your project root2. Queries Linear API using GraphQL to fetch all assigned issues in non-completed states3. Retrieves task details including title, description, status, priority, labels, estimates, due dates, project, and URL4. Groups tasks by project for better organization5. Generates markdown file with filename linear-todos-YYYY-MM-DD.md in the project root6. Outputs summary showing total tasks and project countThe generated markdown file provides a comprehensive view of your work with all relevant task metadata, making it easy to review priorities and plan your day.## UsageTrigger this skill with phrases like:- "What do I need to work on this morning"- "Show me my work"- "Load work"- "Sync my Linear tasks"- "Get my todo list from Linear"The skill will execute the sync script and create a dated markdown file in your project root.## Generated File FormatThe markdown file follows this structure:markdown# Linear Tasks - January 18, 2025Generated: 2025-01-18 09:30:45Total Tasks: 12## Project Alpha### Implement user authentication (High)- **Status**: In Progress- **Labels**: backend, security- **Estimate**: 5 points- **Due**: 2025-01-20- **Link**: https://linear.app/team/issue/PROJ-123Add JWT-based authentication to the API endpoints...### Fix login bug (Urgent)- **Status**: Todo- **Labels**: bug, frontend- **Estimate**: 2 points- **Due**: 2025-01-19- **Link**: https://linear.app/team/issue/PROJ-124Users cannot log in when using Safari...## Project Beta...## CustomizationTo modify the skill's behavior, edit scripts/sync_linear_tasks.py:### Change GraphQL QueryModify the QUERY variable to fetch additional fields:pythonQUERY = """query { viewer { assignedIssues(filter: { state: { type: { nin: ["completed", "canceled"] } } }) { nodes { id title description state { name } priority labels { nodes { name } } estimate dueDate project { name } url # Add more fields here createdAt updatedAt assignee { name } } } }}"""### Adjust Task FilteringModify the filter in the GraphQL query to change which tasks are fetched:python# Include completed tasks from the last weekfilter: { state: { type: { nin: ["canceled"] } } completedAt: { gte: "2025-01-11" }}### Modify Output FormatCustomize the markdown generation in the generate_markdown() function to change structure, add sections, or include different metadata.### Change Output LocationUpdate the output_path variable in main():python# Save to a different directoryoutput_path = os.path.join(project_root, "docs", filename)## Troubleshooting### Error: "LINEAR_API_KEY not found in environment"Cause: The .env file is missing or doesn't contain the API key.Solution:1. Verify .env exists in your project root (not in the skill directory)2. Check that it contains: LINEAR_API_KEY=lin_api_...3. Ensure no extra spaces around the = sign4. Restart your terminal session if you just created the file### Error: "Authentication failed: Invalid API key"Cause: The API key is incorrect or expired.Solution:1. Go to Linear API Settings2. Verify your API key is still active3. Generate a new key if needed4. Update .env with the correct key### Error: "Network request failed"Cause: Cannot connect to Linear API (network issue, timeout, or API downtime).Solution:1. Check your internet connection2. Verify https://linear.app is accessible3. Check Linear Status for outages4. Try again in a few moments### Error: "Rate limit exceeded (429)"Cause: Too many API requests in a short period.Solution:- Wait 60 seconds before retrying- Avoid running the sync multiple times in quick succession- Linear's rate limit is 2000 requests per hour per API key### Warning: "No tasks found"Cause: You have no assigned tasks in non-completed states.Solution: This is informational only. The skill will still create a markdown file indicating zero tasks.### Error: "Permission denied when writing file"Cause: Insufficient file system permissions.Solution:1. Check you have write permissions in the project directory2. Verify the directory exists and is accessible3. Try running with appropriate permissions### Script runs but no file appearsCause: File created in unexpected location or script error.Solution:1. Check the script output for the exact file path2. Look for error messages in the console3. Run with verbose output: python scripts/sync_linear_tasks.py --verbose## Security Best Practices1. Never commit .env file: Always add .env to .gitignore2. Rotate API keys periodically: Generate new keys every 90 days3. Use minimal permissions: Linear API keys inherit your user permissions4. Keep packages updated: Run pip install --upgrade requests mdutils python-dotenv5. Review generated files: Check markdown files before sharing to ensure no sensitive data## Advanced Usage### Automated Daily SyncAdd to your shell profile (.bashrc, .zshrc) to sync on terminal startup:bash# Auto-sync Linear tasks dailyif [ -f "/path/to/project/.env" ]; then python /path/to/project/.claude/skills/linear-todo-sync/scripts/sync_linear_tasks.pyfi### Integration with Git HooksCreate a post-checkout hook to sync after changing branches:bash#!/bin/bash# .git/hooks/post-checkoutpython .claude/skills/linear-todo-sync/scripts/sync_linear_tasks.py### CI/CD IntegrationUse in continuous integration to track team tasks:yaml# .github/workflows/sync-tasks.yml- name: Sync Linear Tasks run: | pip install requests mdutils python-dotenv python .claude/skills/linear-todo-sync/scripts/sync_linear_tasks.py env: LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}## Additional Resources- Linear GraphQL API Documentation- Linear API Reference- Python Requests Documentation- MDUtils DocumentationFor detailed API reference and advanced GraphQL queries, see the Linear API documentation.
04 同仓库更多 Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vercel-react-view-transitions
Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
vercel-cli-with-tokens
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".