Agent skill
sync-linear-to-plan
Pull current state from Linear back into local ./plans/{slug}/ YAML files — updates status, assignee, priority, labels, and points. Also imports new issues created directly in Linear. Use when user says "pull from linear", "sync from linear", "update plan from linear", or wants local files to reflect Linear's current state.
Install this agent skill to your Project
npx add-skill https://github.com/jasonraimondi/dotfiles/tree/macos/config/skillshare/skills/sync-linear-to-plan
SKILL.md
Sync Linear to Plan
One-way sync: Linear is source of truth for workflow fields, local YAML is updated to match. Spec fields (outcome, scope, acceptance criteria) are never overwritten — those are owned locally.
Input
- Plan: project slug or path (e.g.,
author./plans/auth/) - Team (optional): Linear team key (e.g.,
RAL)
If plan is not provided, ask: "Which plan should I pull? (project slug or path)"
Field ownership
Fields are split by who owns them:
Linear owns (pulled back on sync):
| Linear field | Local YAML field |
|---|---|
| State name | status (normalized to lowercase kebab-case) |
| Assignee username | assignee |
| Priority (1-4) | priority (1=urgent, 2=high, 3=medium, 4=low) |
| Labels | labels[] |
| Estimate | points |
Local owns (never overwritten from Linear):
outcome,scope,acceptance_criteria,use_cases,notes— the specblocked_by,blocking— local dependency graphid,slug— local identifiersbranch,pr— set by implementation workflow
Process
1. Read local state
Read ./plans/{slug}/prd.yaml and all ./plans/{slug}/issues/*.yaml.
Verify prd.yaml has linear.project_id. If not, tell the user: "This plan hasn't been synced to Linear yet. Run /sync-plan-to-linear first."
Resolve the team in priority order:
- User-provided team argument (highest priority)
linear.team_keyinprd.yamlteam_idfrom.linear.toml(checked at repo root and standard config paths)linear team list— use directly if one team, ask the user if multiple
Write the resolved team_key back to prd.yaml if it changed or was missing.
Build a lookup map: linear_id → local file path.
2. Fetch linked issues from Linear
For each local issue that has linear_id:
linear issue view {issue_id} --json
Parse the JSON to extract: state name, assignee, priority, labels, estimate.
3. Discover new Linear issues
List all issues in the Linear project to find ones created directly in Linear that have no local YAML:
linear issue list --project "{project_name}" --all-states --all-assignees --limit 0 --no-pager
Or use linear issue view {id} --json on each. Any issue identifier not in the local lookup map is new.
4. Build the change report
For each existing local issue, compare Linear state against local YAML. Track changes per file:
issues/3-add-validation.yaml:
status: todo → done
assignee: null → jason
points: 3 → 5
For new issues found in Linear, note them separately.
5. Present changes and confirm
Show the full change report to the user. Ask for confirmation before writing.
If no changes detected, report "Local plan is up to date with Linear" and stop.
6. Update existing issue files
For each changed issue, update only the Linear-owned fields in the YAML. Always update the updated date.
7. Create local files for new Linear issues
For each new issue discovered in Linear:
- Assign the next sequential local
id(max existing id + 1) - Generate a
slugfrom the issue title (kebab-case) - Create
{id}-{slug}.yamlwith all fields populated from Linear - Set
outcomeandscopefrom the Linear issue description (parse the markdown sections if they follow the standard format, otherwise put the full description inoutcome) - Set
acceptance_criteriafrom parsed checkbox items, or leave empty - Write
linear_idandlinear_url
8. Sync PRD project status
Fetch the project status from Linear. Map to local PRD status:
| Linear project status | Local status |
|---|---|
| planned / backlog | draft |
| started / paused | active |
| completed | complete |
| canceled | archived |
Update prd.yaml if changed.
9. Report
Plan: {project name}
Issues updated: {count} ({list of changes})
New issues imported: {count} ({list of new file paths})
PRD status: {old} → {new} (or "unchanged")
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tools-image-manipulation-image-magick
Process and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with images, creating thumbnails, resizing wallpapers, or performing batch image operations.
frontend-react-doctor
Run after making React changes to catch issues early. Use when reviewing code, finishing a feature, or fixing bugs in a React project.
typescript-advanced-types
Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.
typescript-better-auth-best-practices
Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.
testing-tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
planning-interview-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "interview me".
Didn't find tool you were looking for?