sqlew-pr-adr

sqlew-pr-adr is a skill for Claude Code from sqlew-io/sqlew-plugin. It costs 85 tokens per session (1,016 once invoked), scanned A, original, Apache-2.0.

A required guide for creating pull requests that adds the reasons behind code changes. It uses Architecture Decision Records, which document important technical choices.

In plain words
What is it for?
Use it when preparing a pull request to find related decisions and organize the pull request description around them.
Why use it?
It helps reviewers understand why a change was made, not only what files the change modifies.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event.

Part of the sqlew plugin — 3 skills, 6 hooks, 1 MCP server shipped together

Good fit Use it when preparing a pull request to find related decisions and organize the pull request description around them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sqlew-io/sqlew-plugin/sqlew-pr-adr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sqlew-io/sqlew-plugin --skill sqlew-pr-adr
Clone the repo
git clone --depth 1 https://github.com/sqlew-io/sqlew-plugin

Made for: Claude Code.

Or install sqlew, the plugin that ships this one along with the rest of its 3 skills, 6 hooks, 1 MCP server.

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 sqlew-pr-adr

README.md
[![agentmods](https://agentmods.dev/badge/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr/github.svg)](https://agentmods.dev/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr)
Your own site
<a href="https://agentmods.dev/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr"><img src="https://agentmods.dev/badge/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr/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 sqlew-pr-adr

Your own site · 80×15
<a href="https://agentmods.dev/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr"><img src="https://agentmods.dev/badge/skills/sqlew-io/sqlew-plugin/sqlew-pr-adr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,016 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.00085 $0.01016
Opus 5 $0.00043 $0.00508
Sonnet 5 $0.00017 $0.00203
Haiku 4.5 $0.00009 $0.00102

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

Security

Grade A, and why

sqlew-pr-adr 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 11d 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.

.hermes-plugin/skills/sqlew-pr-adr/SKILL.md · 140 lines

How it starts

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

REQUIRED: Enrich PRs with Decision Context

When creating a pull request, reviewers need WHY context, not just what changed. MUST query sqlew for decisions related to the actual code changes and group the PR description by decision.


Step 1: Get the Diff

# Get changed files and content vs base branch
git diff <base-branch>...HEAD --stat    # File list
git diff <base-branch>...HEAD           # Full diff

Extract keywords from the diff:

  • File paths: directory names, module names (e.g., auth, migration, database)
  • Function/struct names: key identifiers added or modified
  • Package/import changes: new dependencies or module references

Step 2: Reverse-Lookup Decisions via Suggest

For each extracted keyword, query sqlew to find related decisions:

suggest { action: "by_context", key: "<keyword>" }
suggest { action: "by_context", key: "<module-name>", tags: ["<relevant-tag>"] }

For each matched decision key, fetch full context:

decision { action: "get", key: "<matched-key>", include_context: true }

This retrieves: Rationale, Alternatives Considered, Tradeoffs.

Selection rules:

  • Include decisions with score >= 35 from suggest results
  • Deduplicate across keyword searches
  • Cap at 5 decisions (keep PR readable)
  • Skip deprecated decisions

Step 3: Group Files Under Decisions

Organize the PR body so each decision/constraint lists its related files directly.

REQUIRED markers (hook-enforced): The sqlew pr-adr PreToolUse hook blocks gh pr create unless the body contains the literal heading ## Architecture Decisions or ## Other Changes. Put every decision/constraint under ## Architecture Decisions as ### subsections, and unattributed changes under ## Other Changes. A PR whose changes are all tied to ADRs still needs the ## Architecture Decisions heading present.

## Summary

<!-- 1-3 bullet points: what this PR does overall -->

## Architecture Decisions

### Decision: <title> (<reason>)

- `path/to/file1.ts`: what changed and why
- `path/to/file2.ts`: what changed and why

### Decision: <another title> (<reason>)

- `path/to/file3.ts`: what changed and why

### Constraint: <rule description>

- `path/to/file4.ts`: what changed to comply

## Other Changes

<!-- Changes not tied to any Decision/Constraint -->
- `path/to/file5.ts`: minor cleanup

## Test Plan

- [ ] Test step 1
- [ ] Test step 2

Read the full file on GitHub · 140 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. 11d ago First seen · 140 lines · 85 tokens per session scan A d679d69c3fd9

Subscribe to this mod's changes

sqlew-pr-adr is a skill published in the GitHub repository sqlew-io/sqlew-plugin (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 85 tokens to every session and 1,016 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

repo-hygiene

Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.

QwenLM/qwen-code · 48 tokens

create-issue

Draft and submit a GitHub issue from a user idea or bug description, with bilingual body and correct labels.

QwenLM/qwen-code · 26 tokens

docs-update-from-diff

Review local code changes with git diff and update the official docs under docs/ to match. Use when the user asks to document current uncommitted work, sync docs with local changes, update docs after a feature or refactor, or when phrases like "git diff", "local changes", "update docs", or "official docs" appear.

QwenLM/qwen-code · 75 tokens

prepare-pr

Prepare GitHub pull request title and body files from the current branch diff, especially for non-interactive CI/autofix flows that must follow the repository PR template without pushing or creating the PR.

QwenLM/qwen-code · 42 tokens

triage

Gatekeep and review GitHub issues and pull requests for Qwen Code maintainers. Use for GitHub Action issue triage, PR admission checks, product-direction review, KISS-focused PR review, and staged bilingual GitHub comments.

QwenLM/qwen-code · 50 tokens

git-github-flow

Use for branch prep, clean commits, PR descriptions, GitHub issue triage, changelogs, release notes, review response, merge readiness, or publishing a branch safely.

DominikTobureto/awesome-grok-build · 41 tokens