mcp-ahrefs: Command for Claude Code

.claude/commands/merge-issue.md

merge-issue is a command for Claude Code from SAGAAIDEV/mcp-ahrefs. It costs 13 tokens per session (583 once invoked), scanned A, original, MIT.

A command that checks the current work, runs Ruff and pytest, commits the changes, merges the issue branch into the local main branch, and marks the JIRA issue as done. A branch is a separate line of development in Git.

In plain words
What is it for?
Finishing a feature, bug fix, or task locally and continuing development from the updated main branch.
Why use it?
It packages the local completion steps for work that should be merged directly, without opening a pull request.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

This is SAGAAIDEV/mcp-ahrefs's own configuration. It tells Claude Code how to work on mcp-ahrefs 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 mcp-ahrefs configures →

Reuse

Borrowing it

Nothing to install: this file belongs to SAGAAIDEV/mcp-ahrefs. 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/SAGAAIDEV/mcp-ahrefs/main/.claude/commands/merge-issue.md
Clone the repo
git clone --depth 1 https://github.com/SAGAAIDEV/mcp-ahrefs

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 merge-issue

README.md
[![agentmods](https://agentmods.dev/badge/commands/sagaaidev/mcp-ahrefs/merge-issue/github.svg)](https://agentmods.dev/commands/sagaaidev/mcp-ahrefs/merge-issue)
Your own site
<a href="https://agentmods.dev/commands/sagaaidev/mcp-ahrefs/merge-issue"><img src="https://agentmods.dev/badge/commands/sagaaidev/mcp-ahrefs/merge-issue/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for merge-issue

Your own site · 80×15
<a href="https://agentmods.dev/commands/sagaaidev/mcp-ahrefs/merge-issue"><img src="https://agentmods.dev/badge/commands/sagaaidev/mcp-ahrefs/merge-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 583 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.00013 $0.00583
Opus 5 $0.00006 $0.00292
Sonnet 5 $0.00003 $0.00117
Haiku 4.5 $0.00001 $0.00058

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

Security

Grade A, and why

merge-issue 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 8d 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/merge-issue.md · 83 lines

How it starts

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

I'll help you merge the current issue to main locally and update JIRA without creating a PR.

Parse Arguments

  • Site alias provided: $ARGUMENTS (e.g., "saaga")
  • I'll extract the JIRA issue key from the current branch name

Step 1: Review Changes

First, let me check the current status:

!git status !git diff --stat

Step 2: Run Quality Checks

Running linting and tests before merging:

!ruff check . !pytest

Step 3: Commit Changes

I'll stage all changes and create a detailed commit message:

!git add -A

The commit message will follow conventional commits format based on issue type:

  • Feature/Story: feat: [Description]
  • Bug: fix: [Description]
  • Task: task: [Description]
  • Other: chore: [Description]

The commit will include:

  • Brief description
  • Detailed changes
  • Reference to JIRA issue
  • Claude Code attribution

Step 4: Merge to Main

Switch to main and merge the issue branch:

!git checkout main !git merge $(git rev-parse --abbrev-ref @{-1})

Step 5: Update JIRA to Done

After the merge, I'll:

  1. Extract the JIRA issue key from the branch name (e.g., fix/ASEP-40-description → ASEP-40)
  2. Update the issue status to 'Done' using mcp__Conduit__update_jira_status with the site alias
  3. Add a comment about local merge completion using mcp__mcp_jira__update_jira_issue

Step 6: Clean Up Issue Branch

Delete the merged issue branch:

!git branch -d $(git rev-parse --abbrev-ref @{-2})

Let's start by reviewing your changes...


🚀 Next Steps After Local Merge

Once your issue is merged locally:

  1. **Start your next issue immediately:

    /project:start-issue [NEW-ISSUE-KEY] [SITE-ALIAS]
    

    Continue rapid development on the same main branch

  2. When ready to sync with remote:

    !git push origin main
    

    Push all accumulated changes to remote

  3. If you need to create PRs later:

    • Use individual commits in main to create separate PRs
    • Or create a single PR with all accumulated changes

Read the full file on GitHub · 83 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. 8d ago First seen · 83 lines · 13 tokens per session scan A 019795df8a27

Subscribe to this mod's changes

merge-issue is a command published in the GitHub repository SAGAAIDEV/mcp-ahrefs (0 stars, last pushed 1y ago), licensed MIT. It adds 13 tokens to every session and 583 once invoked, about $0.0001 per session on Opus 5. 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-31.