linear-read-issue
Read a Linear issue through the direct Linear GraphQL API using a local LINEAR_API_KEY. Use only as a read-only fallback when the normal Linear connector is unavailable or cannot return required issue
SKILL.mdlinear-read-issue/SKILL.md
GitHubLinear Read Issue
Use this skill when the normal Linear connector cannot read a target issue, comments, or relations and a narrow read-only GraphQL fallback is needed.
Prefer the official Linear connector for normal issue reads. This skill is not a general Linear client and must not be used for updates.
Preconditions
LINEAR_API_KEYis available in the shell,LINEAR_ENV_FILE,--env-file, or a local.env.local.- The key belongs to a Linear user with access to the target issue.
- Network access to
https://api.linear.app/graphqlis allowed.
Non-Negotiable Rules
- Use
scripts/read_issue.py. - Never print the API key.
- Do not store the API key in the skill directory.
- Keep this helper read-only. It must not send GraphQL mutations.
- Prefer a stable issue key such as
LIN-123when available. A UUID or URL without an issue key may refer to another Linear entity. - Use
--include-commentsonly when comments are required. - Use
--include-relationsonly when blocker or related-issue context is required. - Do not use this skill to decide queue priority; use
linear-custom-viewfor Custom View order.
Codex Permission Rule
When Codex sandboxing asks for approval because the script needs network access, request a persistent command prefix:
sandbox_permissions:require_escalatedprefix_rule:["python3", "linear-read-issue/scripts/read_issue.py"]
Keep the command prefix stable by running from the linear-skills repository root. Pass the API key only through the environment or --env-file; never pass the key as a command argument.
Recommended Commands
python3 scripts/read_issue.py LIN-123 --env-file /path/to/.env.local
python3 scripts/read_issue.py "https://linear.app/example/issue/LIN-123/example-title" --json
python3 scripts/read_issue.py LIN-123 --json --include-comments --include-relations
Output Shape
- Text output: issue identifier, status, team, project, labels, and optional comment/relation counts.
--jsonoutput:schema_version,fetched_at, lookup input, and issue payload.- Failure categories are
missing_api_key,not_found,permission_denied, andnetwork. - Issue lookup failures use
error_category=not_foundanderror_code=issue_not_found, with safelookup,input_kind, andhintfields. issue_not_foundmeans Linear was reached but the target Issue was not found by the provided reference. Do not report it as a missing API key unless the error category ismissing_api_key.