集成

Linear GraphQL Agent

试用

Operate Linear workspace issues, projects, and teams through Linear GraphQL API using UXC. Use when tasks require querying or creating issues, managing proje...

它能做什么

Operate Linear workspace issues, projects, and teams through Linear GraphQL API using UXC. Use when tasks require querying or creating issues, managing proje...

技能文档

Linear GraphQL Skill

Use this skill to run Linear GraphQL API operations through uxc.

Reuse the uxc skill guidance for discovery, schema inspection, auth lifecycle, and error recovery.

Prerequisites

  • uxc is installed and available in PATH.
  • Network access to https://api.linear.app/graphql.
  • Linear API key or OAuth credentials available.

Authentication

Linear supports two authentication methods:

  1. Get your API key from Linear: https://linear.app/settings/api

  2. Set credential with custom Authorization header:

    uxc auth credential set linear-graphql \
      --auth-type api_key \
      --header "Authorization:{{secret}}" \
      --secret "lin_api_XXX"
    

    Or use environment variable:

    export LINEAR_API_KEY="lin_api_XXX"
    uxc auth credential set linear-graphql \
      --auth-type api_key \
      --header "Authorization:{{secret}}" \
      --secret-env LINEAR_API_KEY
    
  3. Bind endpoint:

    uxc auth binding add \
      --id linear-graphql \
      --host api.linear.app \
      --path-prefix /graphql \
      --scheme https \
      --credential linear-graphql \
      --priority 100
    

Important (Personal API Key only): Linear API keys require Authorization: lin_api_XXX format (no Bearer prefix). The --header "Authorization:{{secret}}" configuration above is required for API key auth. For OAuth access tokens, use standard Authorization: Bearer semantics (handled by the OAuth credential flow in uxc).

Credential/binding IDs in this skill use linear-graphql by convention; IDs are local aliases and can be changed if needed.

Option 2: OAuth 2.0 (For production/user-delegated access)

  1. Create an OAuth app in Linear: https://linear.app/settings/api

  2. Start OAuth login:

    uxc auth oauth start linear-graphql \
      --endpoint https://api.linear.app/graphql \
      --redirect-uri http://127.0.0.1:8788/callback \
      --scope read \
      --scope write
    

    After approval, complete it with:

    uxc auth oauth complete linear-graphql \
      --session-id  \
      --authorization-response 'http://127.0.0.1:8788/callback?code=...&state=...'
    
  3. Bind endpoint:

    uxc auth binding add \
      --id linear-graphql \
      --host api.linear.app \
      --path-prefix /graphql \
      --scheme https \
      --credential linear-graphql \
      --priority 100
    

Core Workflow

  1. Use fixed link command by default:

    • command -v linear-graphql-cli
    • If the command exists, confirm it is the expected uxc link for this skill before using it.
    • If a command conflict is detected and cannot be safely reused, stop and ask skill maintainers for guidance instead of dynamically renaming the command.
    • If missing, create it: uxc link linear-graphql-cli https://api.linear.app/graphql
    • linear-graphql-cli -h
  2. Discover operations:

    • linear-graphql-cli -h
    • Returns hundreds of GraphQL operations
  3. Inspect specific operation:

    • linear-graphql-cli query/issues -h
    • linear-graphql-cli mutation/issueCreate -h
  4. Execute queries:

    # Query issues (simple)
    linear-graphql-cli query/issues '{"first":10}'
    
    # Query issues with explicit selection set for useful fields
    linear-graphql-cli query/issues '{"first":10,"_select":"nodes { identifier title url state { name } assignee { name } }"}'
    
    # Query teams
    linear-graphql-cli query/teams '{"first":10}'
    
    # Create issue (requires write scope)
    linear-graphql-cli mutation/issueCreate '{
      "input": {
        "teamId": "TEAM_ID",
        "title": "New Issue Title",
        "description": "Issue description"
      }
    }'
    

Available Operations

Queries

  • query/issues - List and filter issues
  • query/issue - Get single issue
  • query/teams - List teams
  • query/team - Get single team
  • query/projects - List projects
  • query/workflowStates - List workflow states

Mutations

  • mutation/issueCreate - Create new issue
  • mutation/issueUpdate - Update issue
  • mutation/issueArchive - Archive issue
  • mutation/commentCreate - Add comment

Usage Examples

List recent issues

linear-graphql-cli query/issues '{"first":20,"_select":"nodes { identifier title url state { name } assignee { name } }"}'

Get issue by ID

linear-graphql-cli query/issue id=ISSUE_ID

List teams

linear-graphql-cli query/teams

Create issue

linear-graphql-cli mutation/issueCreate '{"input":{"teamId":"YOUR_TEAM_ID","title":"Fix bug"}}'

Troubleshooting

Authentication Errors

Error: "Bearer token" prefix rejected

  • Linear API does not accept Authorization: Bearer lin_api_XXX
  • Ensure credential uses --auth-type api_key --header "Authorization:{{secret}}"
  • Do not use --auth-type bearer

Error: "Credential not found"

  • Check credential exists: uxc auth credential list
  • Verify binding: uxc auth binding list
  • Create binding if missing (see Authentication section)

OAuth login spans multiple agent turns

  • Prefer uxc auth oauth start ... and uxc auth oauth complete ...
  • Use uxc auth oauth login ... --flow authorization_code only when one process can wait for the pasted callback URL

Error: "No binding matched"

  • Check binding exists: uxc auth binding match api.linear.app/graphql
  • If missing, create binding with uxc auth binding add (see Authentication section)

For detailed authentication troubleshooting, see uxc skill's references/auth-configuration.md.

Common Issues

Daemon issues after credential changes

  • Restart daemon: uxc daemon restart
  • Check status: uxc daemon status

Environment variable not found

  • Ensure variable is exported in daemon's environment
  • Or use --secret for literal values (less secure)
  • Or use --secret-op for 1Password (most secure)

Guardrails

  • Keep automation on JSON output envelope; do not use --text.
  • Parse stable fields first: ok, kind, data, error.
  • Prefer positional JSON for non-string and typed arguments (for example: linear-graphql-cli query/issues '{"first":10}' and linear-graphql-cli mutation/issueCreate '{"input":{"teamId":"TEAM_ID","title":"Test"}}').
  • Use reserved GraphQL argument _select (string) when you need explicit return fields, e.g. {"_select":"nodes { identifier title }"}.
  • Use linear-graphql-cli as the default command path.
  • linear-graphql-cli ... is equivalent to uxc https://api.linear.app/graphql ....
  • Prefer read operations first (query/), then write operations (mutation/).
  • For write operations, always confirm user intent before execution.
  • If auth fails, check credential with uxc auth credential info linear-graphql.

References

相关技能

通过自带的 Node CLI 读取与修改 Linear 的 issue、项目和评论。

142 次安装6 星标

用原生 Node 直接读写 Linear 工作区,写操作默认关闭且不依赖任何第三方组件。

32 次安装

Linear流程CLI(专业版)面向使用Linear进行复杂项目管理的工程团队与AI Agent运行时,在免费版基础上解锁全部高级能力:批量操作、dry-run预览、自动化策略、Slack/Ticket上下文集成、Git/JJ工作流联动、高级GraphQL查询模板、Webhook管理、跨团队Initiative管理。让AI Agent成为真正的Linear自动化中枢. 核心能力:批量Issue创建/更新/删除(CSV/JSON驱动)、dry-run预览所有写入操作、自动化策略(suggest-only/preview-required/autonomous)、Slack/Ticket上下文文件解析(--context-file + --apply-triage)、Git/JJ工作流联动(提交关联Issue自动更新状态)、高级GraphQL查询模板库、Webhook管理与通知配置、跨团队Initiative与里程碑管理、项目状态更新(project-update)、通知管理、超时感知写入语义、源邻近任务摄入. 适用场景:AI Agent深度自动化任务管理、大规模任务批量迁移与重构、跨团队协作的Initiative管理、Slack驱动的任务分流、Git提交自动关联任务状态、项目管理仪表盘、企业级Linear工作流定制. 差异化:在免费版基础上新增八大高级能力,针对Agent原生运行时场景设计完整工作流。提供多角色场景指南(开发者/Scrum Master/DevOps/项目经理/技术负责人)、性能优化策略、多平台集成示例、版本升级迁移指南。专业版通过SkillHub SkillPay发布。保留原始MIT-0版权声明. 适用关键词:批量操作、dry-run预览、自动化策略、Slack集成、Git联动、Webhook、Initiative、Agent运行时

Discover and call remote schema-exposed interfaces with UXC. Use when an agent or skill needs to list operations, inspect operation schemas, and execute Open...

36 次安装

管理Linear任务与项目的免费命令行工具,支持任务列表、查看与基础创建。Use when 需要项目管理、任务规划、进度跟踪、团队协作时使用。不适用于实际人员绩效评估。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。提供结构化输出和错误处理机制。

1 次安装

Read and write Linear workspace data via Linear's hosted MCP server. Thin pass-through to the official Linear MCP; the live tool catalog is whatever that ser...

18 次安装