linear-custom-view
Read Linear Custom Views through the direct Linear GraphQL API using a local LINEAR_API_KEY. Use when the user asks to inspect a Linear view URL, extract the live issue queue, preserve manual order, o
SKILL.mdlinear-custom-view/SKILL.md
GitHubLinear Custom View
Use this skill when the user gives a Linear Custom View URL, slug, ID, or view name and wants the live ordered issue list.
This skill is useful when Linear MCP cannot read custom views or when the view's manual order is the source of implementation priority.
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 workspace and the Custom View.
- Network access to
https://api.linear.app/graphqlis allowed.
Non-Negotiable Rules
- Use
scripts/custom_view.py. - Use the shared GraphQL client from this repository; it resolves
LINEAR_API_KEY, usescertififor TLS when available, and redacts the token from API errors. - Preserve manual order with
sort: [{ manual: { order: Ascending } }]unless the user asks otherwise. - Never print the API key.
- Treat the Custom View filter as the source of truth. Do not add hidden filters unless the user asks.
- If a completed issue disappears from the view, explain that the view filter controls visibility.
- Use this skill only to read the ordered Custom View queue. Read full issue details, comments, and blocking links through the normal Linear connector or the caller's project workflow.
- When another agent will consume the result, prefer
--json --firstand readfirst_issueinstead of reinterpreting issue order. - When the user gives an expected workstream, use
--expect-label,--exclude-label,--expect-title-regex, or--skip-title-regexso the output includesfirst_matching_issueandskipped_issues.
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-custom-view/scripts/custom_view.py"]
Tell the user to choose the option like "Yes, and don't ask again for commands that start with this prefix". After that, the same Custom View script can run without repeated prompts.
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.
For full setup details and a ready-to-copy rules snippet, see docs/codex-approvals.md in the repository root.
Default Flow
- Pass the Linear view URL, slug, ID, or exact name to the script.
- Use
--jsonwhen the result will drive automation. - Use
--firstwhen the workflow needs the first actionable issue from the manual queue. - Use
--explain-filterwhen reporting why completed or filtered issues are missing. - Use
--include-relations-summaryonly for a light read-only overview; do not treat it as a replacement for fulllinear:linearissue reads. - If the queue is expected to contain a specific workstream, pass explicit selection filters and read
first_matching_issue, not justfirst_issue. - Read the returned
filterData, issue count, ordered issues, optionalfirst_issue, and optionalskipped_issues. - Use the returned order as the queue order.
Recommended Commands
python3 scripts/custom_view.py "https://linear.app/example/view/team-queue-123abc" --env-file /path/to/.env.local
python3 scripts/custom_view.py 123abc --json
python3 scripts/custom_view.py 123abc --json --first --explain-filter
python3 scripts/custom_view.py 123abc --json --first --expect-label Platform --exclude-label Blocked --skip-title-regex '^\[Blocked\]'
python3 scripts/custom_view.py 123abc --json --include-relations-summary --limit 20
python3 scripts/custom_view.py "Team Queue" --limit 50
Output Shape
- Text output: view name, slug, issue count, then one issue per line in manual order.
--jsonoutput:schema_version,fetched_at,queue_order, view metadata, issue count, and ordered issue objects.--firstoutput:first_issuewithrow_index,identifier,status,status_type,manual_order,view_slug, and the original issue row. Completed/canceled rows are skipped when looking for the first actionable issue.- Selection filter output: when any of
--expect-label,--exclude-label,--expect-title-regex, or--skip-title-regexis used, JSON includesselection_filters,first_matching_issue, andskipped_issues. --explain-filteroutput:filter_explanationwith rawfilterDataand a note that visibility is controlled by the Custom View.--include-relations-summaryoutput: labels plus lightrelations_summaryandcomments_summarycounts from Linear connections.- On ambiguity, the script lists matching views and exits without guessing.
Project Workflow Boundary
For larger project workflows, this skill covers only the queue-read step:
- Read the live manual queue from Linear Custom View.
- Select the first actionable issue when requested.
- Read full issue context through the normal Linear connector or project-specific workflow.
- Change statuses outside this queue reader after the caller has completed its own readiness checks.