sygaldry: Command for Claude Code

.claude/commands/linear-retroactive-git.md

linear-retroactive-git is a command for Claude Code from greyhaven-ai/sygaldry. It costs 0 tokens per session (3,369 once invoked), scanned A, original, MIT.

A command that examines the current Git changes and turns them into organised Linear issues. Git records code changes, while Linear is a tool for tracking software work.

In plain words
What is it for?
Use it to review modified files, group changes by component, classify them as bugs or features, find related Linear work, and create or update issues.
Why use it?
It helps teams turn untracked code changes into documented work and connect them with the right projects, labels, and existing issues.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is greyhaven-ai/sygaldry's own configuration. It tells Claude Code how to work on sygaldry itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sygaldry configures →

Reuse

Borrowing it

Nothing to install: this file belongs to greyhaven-ai/sygaldry. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/greyhaven-ai/sygaldry/main/.claude/commands/linear-retroactive-git.md
Clone the repo
git clone --depth 1 https://github.com/greyhaven-ai/sygaldry

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for linear-retroactive-git

README.md
[![agentmods](https://agentmods.dev/badge/commands/greyhaven-ai/sygaldry/linear-retroactive-git.svg)](https://agentmods.dev/commands/greyhaven-ai/sygaldry/linear-retroactive-git)
Your own site
<a href="https://agentmods.dev/commands/greyhaven-ai/sygaldry/linear-retroactive-git"><img src="https://agentmods.dev/badge/commands/greyhaven-ai/sygaldry/linear-retroactive-git.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03369
Opus 5 $0.00000 $0.01684
Sonnet 5 $0.00000 $0.00674
Haiku 4.5 $0.00000 $0.00337

Measured 7d ago against content hash c4929003e5df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

linear-retroactive-git scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/linear-retroactive-git.md · 441 lines

How it starts

The opening of the file, as written. The whole thing — 441 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyze git working state and create comprehensive Linear issues using the Linear MCP

  1. Check Linear Context:

    • Use mcp__linear__get_team to get team info
    • Use mcp__linear__list_issue_statuses to get available statuses
    • Use mcp__linear__list_issue_labels to get available labels
    • Use mcp__linear__list_projects to identify relevant project
  2. Search for Related Existing Issues and Projects:

    • Use mcp__linear__list_projects to find active projects that could organize this work
    • Check for projects with status != "completed" or "cancelled"
    • Use mcp__linear__list_issues to find related open issues
    • Check issue titles and descriptions for relevance
    • Determine if changes should be attached to existing issues or projects
  3. Categorize Changes:

    • Group by component/module
    • Identify change types and map to Linear labels:
      • Feature (new functionality)
      • Bug (fixes)
      • Refactor (code improvements)
      • Documentation (docs updates)
      • Improvement (enhancements)
      • Testing (test additions/updates)
      • Technical Debt (cleanup)
      • Performance (optimizations)
      • Security (security improvements)
      • Maintenance (dependency updates, etc.)
  4. Create Project and Issue Structure:

    For major groups of related changes:

    a) Find or Create a Project to organize related work:

    // First, check for existing applicable projects
    const existingProjects = await mcp__linear__list_projects({ 
      teamId: team.id,
      includeArchived: false 
    });
    
    // Look for active projects that match our work
    let project = existingProjects.find(p => {
      const isActive = !p.completedAt && !p.canceledAt && !p.archivedAt;
      const isRelevant = p.name.includes("Refactor") || 
                        p.name.includes("AI Agent") ||
                        p.description?.includes("agent") ||
                        p.description?.includes("refactor");
      return isActive && isRelevant;
    });
    
    // Only create new project if no suitable one exists
    if (!project) {
      project = await mcp__linear__create_project({
        name: "Refactor: AI Agent Architecture",
        teamId: team.id,
        summary: "Consolidate AI agent system and remove redundant code",
        description: `## Overview
        Major refactoring effort to improve the AI agent system by removing redundant code and implementing cleaner patterns.
      
      ## Scope
      - Remove duplicate response models across all agents
      - Consolidate tool imports
      - Fix import issues and circular dependencies
      - Implement proper factory pattern
      - Clean up unused evaluation files
      
      ## Affected Components
      - Healthcare Agent
      - Education Agent  
      - Exa Agent
      - Agent Registry and Factory
      - Test Suite
      
      ## Technical Approach
      1. Audit current agent implementations
      2. Remove duplicate files
      3. Update imports to use centralized tools
      4. Ensure all tests pass
        5. Update documentation`,
        targetDate: "2025-07-01"
      });
    } else {
      console.log(`Using existing project: ${project.name} (${project.id})`);
    }
    

Read the full file on GitHub · 441 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 441 lines · 0 tokens per session scan A c4929003e5df

Subscribe to this mod's changes

linear-retroactive-git is a command published in the GitHub repository greyhaven-ai/sygaldry (11 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,369 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.