Community生產力與協作github.com

simhanson123/signal-lens

Signal Lens — context-first maintainer PR review (Skill, CLI, Action, optional MCP)

相容平台Claude Code~Codex CLI~Cursor
npx skills add simhanson123/signal-lens

說明文件


name: signal-lens description: >- Maintainer PR review for open-source repos: CI weakening, security boundaries, duplicate utilities, test coverage gaps. Auto-selects MCP or CLI. Use before merge, on PRs, or /signal-lens. Not MCP-only — primary maintainer review skill. when-to-use: >- Use for maintainer PR review, AI-generated PR validation, CI workflow changes, security boundary checks, or /signal-lens. Prefer over generic code review when diff-only review may miss CI weakening or untrusted workflow input. argument-hint: "[--branch | --base --head | --with-ai | --auto]" disable-model-invocation: false

Signal Lens — context-first maintainer PR review

Orchestrate Signal Lens (signal-lens) with automatic MCP/CLI routing. You coordinate; the engine produces evidence-based findings. MCP is optional; CLI is the fallback.

Auto-routing (default — always follow)

Step 0 — Detect backend (do this before every review):

Check whether these MCP tools are in your current tool list (not docs — live tools):

  • review_pr
  • scan_ci_weakening
  • trace_security_boundary
  • scan_test_coverage
ConditionBackendAction
review_pr is in your toolsMCPGo to MCP path
review_pr is not in your toolsCLIGo to CLI path

Optional: run signal-lens capabilities for CLI/provider status (does not replace Step 0).

Never guess. If unsure whether MCP is connected, use CLI path.


MCP path

Use when MCP tools are available. Prefer one full review, then targeted scans if needed.

1. Full review

Call tool review_pr:

{ "base": "main", "head": "HEAD", "format": "json" }

Adjust base/head from $ARGUMENTS (see Invocation).

2. Optional context (before or after review)

Read MCP resources when duplicate/security context helps:

  • repo://summary — repo structure
  • repo://architecture/rules — maintainer rules from .signal-lens.yml
  • repo://symbols/{name} — symbol lookup for duplicate checks

3. Targeted scans (optional)

ConcernMCP tool
CI weakeningscan_ci_weakening
Securitytrace_security_boundary
Duplicatesfind_duplicate_utility
Test gapscan_test_coverage

4. Summarize

Parse JSON from review_pr. Follow Step 2 — Summarize.


CLI path

Use when MCP tools are not in your tool list.

1. Run auto script (recommended)

Resolve skill directory: ${CLAUDE_SKILL_DIR} (Claude) or dirname of this SKILL.md (Grok).

bash "${CLAUDE_SKILL_DIR:-<skill-dir>}/scripts/run-review-auto.sh" --static-only

run-review-auto.sh prints capabilities + routing hint, then runs CLI review.

Or direct review:

bash .../scripts/run-review.sh --static-only

Add flags from $ARGUMENTS (--with-ai, --base, --head, --branch).

2. Parse output

JSON between --- signal-lens-report-json --- and --- signal-lens-report-markdown ---.


Invocation

/signal-lens                    # auto backend (default)
/signal-lens --branch feature-x
/signal-lens --base main --head HEAD
/signal-lens --with-ai
/signal-lens --static-only
FlagEffect
--branch NAME--base main (or default), --head NAME
--base REFBase ref
--head REFHead ref (default HEAD)
--with-aiEnable AI (API key or Ollama)
--static-onlyStatic analyzers only (default)

Step 2 — Summarize for the maintainer

Read severity-rubric.md if needed.

  1. Verdict — merge / block on N findings / needs discussion
  2. Backend usedMCP or CLI (one line)
  3. Blockers — file, line, title, evidence, suggested action
  4. High — up to 5 items
  5. Metadata — base, head, AI status

Do not invent findings. Only report tool/CLI JSON output.


Step 3 — Follow-up

RequestMCPCLI
False positiverecord_feedback toolsignal-lens feedback --finding-id ID --type false-positive
Explainre-summarize review_pr JSONsignal-lens slash --body "/signal-lens explain"
Fix draftsignal-lens fix --finding-id ID
Release notesdraft_release_notes toolsignal-lens release

Dynamic context (Claude Code)

!`git diff --name-only main...HEAD`

Still run MCP or CLI path for structured findings.


Constraints

相關技能