stock-scanner-mcp: Command for Claude Code

.claude/commands/learn-from-pr.md

learn-from-pr is a command for Claude Code from yyordanov-tradu/stock-scanner-mcp. It costs 0 tokens per session (855 once invoked), scanned A, original, MIT.

A command that reviews pull-request feedback and turns the findings into updates for a project’s development rules and checklists.

In plain words
What is it for?
Use it with a pull-request number, URL, or “last” to collect review findings, classify them, and update standards for architecture, testing, naming, and pre-merge checks.
Why use it?
It helps prevent the same review issues from recurring by recording lessons from completed code reviews.

Command for Claude Code

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

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

Part of the stock-scanner plugin — 19 skills, 3 commands, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to yyordanov-tradu/stock-scanner-mcp. 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/yyordanov-tradu/stock-scanner-mcp/main/.claude/commands/learn-from-pr.md
Clone the repo
git clone --depth 1 https://github.com/yyordanov-tradu/stock-scanner-mcp

Made for: Claude Code.

Or install stock-scanner, the plugin that ships this one along with the rest of its 19 skills, 3 commands, 2 MCP servers.

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 learn-from-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr/github.svg)](https://agentmods.dev/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr)
Your own site
<a href="https://agentmods.dev/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr"><img src="https://agentmods.dev/badge/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr/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 learn-from-pr

Your own site · 80×15
<a href="https://agentmods.dev/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr"><img src="https://agentmods.dev/badge/commands/yyordanov-tradu/stock-scanner-mcp/learn-from-pr.svg" alt="Reviewed on agentmods" width="80" 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 855 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.00855
Opus 5 $0.00000 $0.00428
Sonnet 5 $0.00000 $0.00171
Haiku 4.5 $0.00000 $0.00085

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

Security

Grade A, and why

learn-from-pr 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.

.claude/commands/learn-from-pr.md · 59 lines

What it actually says

Extract lessons from a PR review and improve project standards. Argument: $ARGUMENTS (PR number or URL, or "last" for most recent reviewed PR).

Steps

  1. Gather PR review findings

    • If a PR number/URL is provided, fetch the review comments: gh pr view <number> --comments
    • If "last" or no argument, check the current conversation for review findings
    • If no findings anywhere, ask the user to provide the PR or paste findings
  2. Categorize each finding For every issue raised in the review, classify it:

    • Pattern violation — existing standard was broken (→ strengthen the standard or add enforcement)
    • Missing standard — no rule existed to prevent this (→ add a new rule)
    • Missing checklist item — a pre-merge check would have caught it (→ add to checklist)
    • Test gap — a category of test was missing (→ add to testing standards)
    • Informational — good practice, no action needed
  3. Read current standards files

    • Read docs/development-standards.md — architecture, patterns, naming, testing, error handling
    • Read docs/pre-flight-checklist.md — pre-flight steps
    • Read CLAUDE.md — project overview and key rules
  4. Cross-reference with actual codebase Before drafting any rule change, verify it against the real code:

    • Read representative module implementations (e.g., src/modules/finnhub/client.ts, newest module) to confirm patterns
    • Check that examples in standards (header names, type names, file names) match real code
    • If a proposed rule would contradict existing merged code, adjust the rule — not the code
  5. Draft proposed changes For each non-informational finding, propose a specific edit:

    • Identify the exact section in the target file
    • Write the new/updated text
    • Explain why (link to the PR finding)

    Before presenting changes, self-check for these common mistakes:

    • Duplication — does the new rule repeat something already stated elsewhere in the same file? Search for keywords.
    • Contradiction — does the new rule conflict with an existing rule? If so, update the existing rule rather than adding a contradictory one.
    • Wrong specificity — does the rule use module-specific terms (e.g., ScanRow[], scanner.test.ts) where it should be generic? Use general terms unless the rule truly applies to only one module.
    • Stale references — does the rule reference file names, header names, or type names that don't exist in the codebase? Verify against actual code.
    • CLAUDE.md consistency — if a rule is added/changed in development-standards.md, does the corresponding summary in CLAUDE.md need updating? Always check. Also check if module counts, version numbers, env vars, or project structure in CLAUDE.md are affected.
    • Hard vs. soft rules — use MUST only for true invariants. If exceptions exist (even one merged module), use SHOULD with a documented deviation process.

    Present ALL proposed changes to the user for approval before editing.

  6. Apply approved changes

    • Edit the target files with the approved changes
    • Keep existing formatting and style consistent
    • Do NOT remove or weaken existing rules — only add or strengthen
  7. Verify consistency (post-edit)

    • Re-read edited files and confirm no duplication or contradiction was introduced
    • Check that CLAUDE.md summary rules still match the detailed standards
    • Check that CLAUDE.md project metadata (version, module count, tool count, env vars, structure) is current
    • If CLAUDE.md needs updating to reflect new rules or changed project state, update it
  8. Report

    • Summarize what was added/changed
    • List any findings that were skipped and why
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 · 59 lines · 0 tokens per session scan A 03104fb69dc1

Subscribe to this mod's changes

learn-from-pr is a command published in the GitHub repository yyordanov-tradu/stock-scanner-mcp (6 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 855 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-31.