본문으로 건너뛰기
Skillpedia
일반 코딩260k · #573

pr-lens

하는 일

이 스킬은 코드 변경이나 코드베이스를 부분들이 어떻게 연결되고 데이터가 어떻게 움직이는지 보여 주는 시각 다이어그램으로 바꿉니다. 풀 리퀘스트나 시스템을 다른 사람에게 설명하려는 개발자를 위한 것입니다.

사용하는 경우

  • ✓코드 변경이 무엇을 하는지 설명하는 다이어그램을 원할 때.
  • ✓풀 리퀘스트를 위한 시스템의 아키텍처나 데이터 흐름 그림이 필요할 때.
  • ✓AI에게 코드베이스의 구조를 시각화하거나 설명해 달라고 할 때.

스킬 링크

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/pr-lens/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/software-development/pr-lens/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“리뷰어들이 데이터가 어떻게 흐르는지 볼 수 있도록 이 풀 리퀘스트의 아키텍처 다이어그램을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 AI가 레인, 노드, 엣지를 설명하는 JSON을 쓰게 한 뒤, PR Lens 명령줄 도구를 실행해 애니메이션 SVG 다이어그램을 렌더링합니다. 버그를 찾지는 않습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

PR Lens Skill

PR Lens draws code as visually rich animated diagrams: diffs, architecture, data flows. You describe the diff or codebase as one JSON document (lanes, nodes, edges, ordered flows) and the CLI renders it as animated SVGs. There is no findings lens — PR Lens is a comprehension layer, not a review bot. There is no field for a bug, risk, or security note, and a document that invents one is rejected.

When to Use

  • Asked to diagram, visualise, or explain a code change or a system.
  • A pull request should carry an architecture or data-flow diagram.
  • Keywords: PR Lens, diagram, architecture, data flow, visualise, pull request.

Prerequisites

  • Node.js with npx (the CLI runs via npx @coldtea/pr-lens-cli@latest; no install step).
  • gh (GitHub CLI) — optional, only for attaching diagrams to PRs.
  • Optional canvas publishing calls the third-party service prlens.dev (see step 4b).

How to Run

Run all commands with the terminal tool from the repository root.

  1. Read the diff. When representing a code change: git diff --find-renames <base>...<head>. The base is the merge base, not the tip of the base branch. If not expressing a diff, read the code to be visualised.

  2. Write the document to .pr-lens/graph.json, following references/graph-document.md. references/example.graph.json is a valid reference with three lanes, all four delta states, a hero edge, a seven-step flow, a nested drill-down tree and a six-step walkthrough. Read it before writing your first document — quicker than reading the reference.

  3. Validate, and fix.

    npx @coldtea/pr-lens-cli@latest validate .pr-lens/graph.json
    

    Fix every failure and run it again. Do not render an invalid document; do not "work around" a failure by deleting the element it names.

  4. Render.

    npx @coldtea/pr-lens-cli@latest render .pr-lens/graph.json --theme light
    

    Render light by default unless the user requests another theme. The SVGs, the manifest and drawn.graph.json land in .pr-lens/, which the CLI adds to the repository's .gitignore. Do not commit any of it — these files are rebuilt from the diff on demand. Each SVG is named after its view, theme and content hash; manifest.json lists them by lens and view.

4b. Canvas push — OPTIONAL, opt-in. Only when the user explicitly asks for a shareable link. This publishes .pr-lens/drawn.graph.json to the third-party service prlens.dev:

npx @coldtea/pr-lens-cli@latest canvas push

It prints three links. Give the user the view link (https://prlens.dev/c/{id}): the full-screen diagram, every view on one page, no login. The edit link (ending in #w=…) lets its holder overwrite the canvas — it is a secret: leave it out of the reply unless asked, never paste it anywhere public. The embed link serves the top view as an SVG for a README. Pushing the same file again updates the same canvas, so "rename that node" is: edit, validate, render, push — the link stays the same. If the push fails, say so and tell the user where the local SVGs are and which is the top view.

  1. Attach to a PR, when there is one. Upstream documents gh pr create/edit/comment --attach <path>, but --attach arrived in GitHub CLI 2.99 — check gh --version first (e.g. gh 2.97 does NOT have it). With gh ≥ 2.99: write the body with a Markdown image ![alt](.pr-lens/<view>.svg) (an HTML <img> is left as written and the file appended at the bottom instead; alt text is the one-line caption a reader without images gets), then repeat --attach <path> per referenced diagram:

    gh pr create --title "…" --body-file .pr-lens/body.md --attach .pr-lens/overview-light-<hash>.svg
    

    Without --attach, use a commit-free path:

    • Upload the SVGs to a gist: gh gist create .pr-lens/<view>.svg, then reference the raw gist URL in the PR body/comment, or
    • Publish via the canvas link (step 4b, with user consent) and link the view URL, or
    • Note the local .pr-lens/ path in the PR body so reviewers can rebuild.

    Once published somewhere durable, let the CLI compose the comment markdown:

    npx @coldtea/pr-lens-cli@latest comment \
      --graph .pr-lens/drawn.graph.json \
      --manifest .pr-lens/manifest.json \
      --asset-base-url <where you published the SVGs>
    

    --graph takes drawn.graph.json, not the document you wrote — the CLI refuses a document its manifest does not descr

자주 묻는 질문

버그나 보안 문제를 찾나요?

아니요. 스킬은 PR Lens가 이해를 돕는 도구이며, 버그나 위험을 담는 항목이 없다고 말합니다.

설치가 필요한가요?

스킬은 npx로 도구를 실행하므로 별도 설치 단계는 없지만 Node.js는 필요합니다.

다이어그램을 풀 리퀘스트에 올릴 수 있나요?

네. 스킬은 GitHub CLI로 다이어그램을 PR에 첨부할 수 있다고 말하며, 이 단계는 선택 사항입니다.

상세 정보

작성자의 원본 설명

Draw code changes as animated architecture/data-flow SVGs.

repo: NousResearch/hermes-agent

인기도

GitHub 스타
260k
순위
#573
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬