agentleFS
jholhewresjholhewres/devclaw-skills/skills/linear/SKILL.md

linear

Skill4 starsChanged 9 months agoMITView on GitHub

Linear API — issues, projects, and workflow management

  • Reads credentials
  • Sends data out

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 76 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a Personal API Key

    line 25
  2. Very specific:

    Use identifier (e.g., "ENG-123") for human-readable IDs

    line 126
  3. Very specific:

    Use filter for complex queries

    line 128

“Common” is measured: kept by at least 6 in 10 of the 76 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Linear

Interact with Linear using their GraphQL API.

Setup

  1. Check existing credentials:
    vault_get linear_api_key
  2. If not configured:The key is auto-injected as $LINEAR_API_KEY.

GraphQL Endpoint

LINEAR_API="https://api.linear.app/graphql"
AUTH_HEADER="Authorization: Bearer $LINEAR_API_KEY"

List Issues

# Get my issues
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { assignee: { isMe: { eq: true } } }) { nodes { id identifier title priority state { name } } } }"}' | jq '.data.issues.nodes'

# Get issues by team
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { team: { key: { eq: \"ENG\" } } }) { nodes { id identifier title state { name } } } }"}' | jq '.data.issues.nodes'

# Search issues
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { search: { eq: \"bug\" } }) { nodes { identifier title } } }"}' | jq '.data.issues.nodes'

Create Issue

curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { issueCreate(input: { title: \"New bug report\", description: \"Description here\", teamId: \"TEAM_ID\", priority: 2 }) { success issue { id identifier } } }"
  }' | jq '.data.issueCreate'

Update Issue

# Update status
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { issueUpdate(id: \"ISSUE_ID\", input: { stateId: \"STATE_ID\" }) { success } }"
  }'

# Add comment
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { commentCreate(input: { issueId: \"ISSUE_ID\", body: \"Progress update\" }) { success } }"
  }'

Get Teams & Projects

# List teams
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ teams { nodes { id key name } } }"}' | jq '.data.teams.nodes'

# List projects
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ projects { nodes { id name status { name } } } }"}' | jq '.data.projects.nodes'

# Get workflow states
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ team(key: \"ENG\") { states { nodes { id name type } } } }"}' | jq '.data.team.states.nodes'

Get Viewer Info

curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ viewer { id name email } }"}' | jq '.data.viewer'

Tips

  • Priority: 0=No priority, 1=Urgent, 2=High, 3=Normal, 4=Low
  • Use identifier (e.g., "ENG-123") for human-readable IDs
  • GraphQL allows fetching exactly the fields you need
  • Use filter for complex queries

Triggers

linear, linear issue, create linear issue, linear ticket, linear api

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.