agentleFS
jalbarrangjalbarrang/skills/linear-cli/SKILL.md

linear-cli

Skill2 starsChanged 3 months agoMITView on GitHub

Run Linear operations the way MCP clients do — authenticate with the user's own Linear login (OAuth 2.1 + dynamic client registration, no OAuth app to create) and drive Linear's official hosted MCP tools to list/search/get/create/update issues, comment, and read teams, projects, users, cycles, workflow statuses, labels, and docs. Use when the user mentions Linear, a Linear issue or identifier (e.g. ENG-123), creating or updating a Linear issue, commenting on a Linear issue, listing Linear teams/projects/users/cycles/statuses/labels, calling a Linear MCP tool, or logging in to Linear.

  • Reads credentials

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No OAuth app, client id, or API key to create — authentication is fully dynamic.

    line 12

“Common” is measured: kept by at least 6 in 10 of the 7 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-cli

Talks to Linear's hosted MCP server (https://mcp.linear.app/mcp) the same way Claude, Cursor, and Codex do: the CLI self-registers (OAuth 2.1 dynamic client registration), runs a PKCE login, and calls Linear's official MCP tools. Dependency-free Node ≥ 20. Each command prints the tool's text output and spills the full JSON result to a temp file.

Setup

No OAuth app, client id, or API key to create — authentication is fully dynamic.

node <skill>/scripts/login.mjs

Open the printed URL, authorize, done. On first login the CLI registers itself and requests the read write scopes; tokens are stored at ~/.agents/linear-cli/credentials.json (mode 0600) and refresh automatically. The dynamic registration is cached at ~/.agents/linear-cli/client.json; logout.mjs revokes the token and clears credentials but keeps the registration.

Optional non-secret defaults in .agents/linear-cli.json (project) or ~/.agents/linear-cli.json:

{
  "redirectPort": 8848,
  "scopes": "read write",
  "defaultTeam": "ENG"
}

The loopback redirect is http://localhost:<redirectPort>/callback (default 8848). If that port is taken, set a different redirectPort and log in again (it re-registers automatically). For read-only access, set "scopes": "read".

Scripts

Resolve <skill> to this skill's directory; run with Node ≥ 20.

ScriptWraps / doesUsage
login.mjsOAuth 2.1 + DCR loginnode <skill>/scripts/login.mjs
logout.mjsrevoke + clear tokensnode <skill>/scripts/logout.mjs
status.mjsauth state + server infonode <skill>/scripts/status.mjs
tools.mjsdiscover MCP tools/schemasnode <skill>/scripts/tools.mjs [<tool>]
call.mjsinvoke any tool (power tool)node <skill>/scripts/call.mjs <tool> [--arg k=v ...] [--json '{…}']
issues.mjslist_issuesnode <skill>/scripts/issues.mjs [--assignee me] [--team KEY] [--query TEXT] …
issue.mjsget_issuenode <skill>/scripts/issue.mjs <issueId>
issue-save.mjssave_issue (create/update)node <skill>/scripts/issue-save.mjs --title "…" --team KEY · … --id ENG-123 --state Done
comments.mjslist_commentsnode <skill>/scripts/comments.mjs <issueId>
comment.mjssave_commentnode <skill>/scripts/comment.mjs <issueId> "<body>"
teams.mjslist_teamsnode <skill>/scripts/teams.mjs [--query TEXT]
projects.mjslist_projectsnode <skill>/scripts/projects.mjs
users.mjslist_usersnode <skill>/scripts/users.mjs [--query TEXT]
states.mjslist_issue_statusesnode <skill>/scripts/states.mjs --team KEY
labels.mjslist_issue_labelsnode <skill>/scripts/labels.mjs [--team KEY]
cycles.mjslist_cyclesnode <skill>/scripts/cycles.mjs --team KEY
docs.mjssearch_documentationnode <skill>/scripts/docs.mjs "<query>"

The convenience wrappers forward every --flag value straight through as the tool's argument (e.g. --assignee me → { assignee: "me" }). Arguments accept human values — assignee takes a name, email, or me; team takes a key/name; state takes a status name — so there is no id lookup step. Run tools.mjs <tool> to see any tool's exact input schema, and use call.mjs for the ~31 tools without a dedicated wrapper (attachments, documents, milestones, project/label creation, etc.).

Output contract

Each command prints the tool's human-readable text to stdout and writes the full JSON result to a temp file under os.tmpdir() (path printed) when it is large — read that path when you need every field.

Etiquette

issue-save.mjs, comment.mjs, and any writing call.mjs invocation change a shared workspace. Confirm content with the user before running unless they explicitly asked you to create/update/comment. For read-only sessions, log in with "scopes": "read".

When to load references

FileWhen
reference/auth.mdHow DCR + PKCE login works, scopes, token storage/refresh, revoke, troubleshooting
reference/operations.mdIssue/comment wrapper flags, save_issue create-vs-update, worked examples
reference/tools.mdFull 31-tool catalog and the tools.mjs / call.mjs power tools

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.