pr-lens
WHAT: Draws a code change or part of a codebase as an animated architecture or data-flow diagram, on its own or in a pull request. WHEN: asked to diagram, visualise or explain a change or a system, or when a pull request should carry a diagram. KEYWORDS: PR Lens, diagram, archite
Install
npx skills add https://github.com/coldteadotai/pr-lens/tree/main/packages/agent-skill
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install coldteadotai-pr-lens@llmmart
git clone https://github.com/coldteadotai/pr-lens.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole coldteadotai/pr-lens collection as a plugin from our marketplace. Git is the plain clone.
README
@coldtea/pr-lens-agent-skill
The PR Lens skill for coding agents. It teaches an agent to draw the change it just made: author a graph document from the diff, validate it against the contract, render it, attach it to the pull request, and to fix a repository's map by writing corrections rather than editing generated output.
MIT © Coldtea AI.
Install it
npm install --save-dev @coldtea/pr-lens-agent-skill
Claude Code: copy it where skills live, per project or per user:
mkdir -p .claude/skills/pr-lens
cp node_modules/@coldtea/pr-lens-agent-skill/SKILL.md .claude/skills/pr-lens/
Cursor: the same file works as a rule:
mkdir -p .cursor/rules
cp node_modules/@coldtea/pr-lens-agent-skill/SKILL.md .cursor/rules/pr-lens.mdc
Anything else: point your agent's instructions file at SKILL.md. It is plain markdown with YAML frontmatter, and it assumes nothing beyond a shell and npx.
What is in it
SKILL.md is short. It tells the agent when to use PR Lens, then sends it to the CLI for the full instructions:
npx @coldtea/pr-lens-cli@latest skill # the write, validate, fix, render loop
npx @coldtea/pr-lens-cli@latest skill references # the graph document, the config format, and an example
The CLI prints the instructions for its own version, so an old copy of SKILL.md never sends the agent to commands that have changed. Their source is manual.md and references/, in this folder of the repository.
The agent is usually the model. Rather than spending a provider key to describe a diff it already understands, it writes the document itself and lets pr-lens validate hold it to the contract. Every failure is a path into the document, so the loop closes without a human in it.
Why this exists
A coding agent that opens a pull request is asking a person to review code the person did not write. A diagram of what moved is the cheapest thing the agent can add to make that review possible.
Part of PR Lens. Review what actually matters.
Skill manifest
PR Lens
Animated architecture, data-flow and data-model diagrams for code changes and codebases. The agent writes one JSON document, and PR Lens draws it.
Run: npx @coldtea/pr-lens-cli@latest <command>. Nothing to install first.
Start here
This file is a discovery stub, not the usage guide. Before running any PR Lens command, load the actual workflow content from the CLI:
npx @coldtea/pr-lens-cli@latest skill # start here: write, validate, render, share
npx @coldtea/pr-lens-cli@latest skill references # the graph document field by field, the config format, a full example
The CLI serves skill content that always matches the installed version, so instructions never go stale. The content in this stub cannot change between releases, which is why it just points at skill.
Why PR Lens
- Works with any coding agent (Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Copilot)
- Draws one self-contained animated SVG that GitHub shows in a comment, with no scripts
validatenames the exact field that is wrong, so the agent can fix its own document- Opens as a live canvas you can step through and ask questions on
- Needs no model key when the agent writes the document itself
Files (pr-lens)
-
references
-
config.md 3.8 KB
Loading… -
example.graph.json 17.3 KB
Loading… -
graph-document.md 21.5 KB
Loading…
-
-
scripts
-
mirror.ts 1.5 KB
Loading… -
sync.ts 1.9 KB
Loading…
-
-
test
-
mirror.test.ts 1.1 KB
Loading… -
skill.test.ts 4.9 KB
Loading…
-
-
LICENSE 1 KB · in bundle
-
manual.md 33.8 KB
Loading… -
package.json 1.1 KB
Loading… -
README.md 2 KB
# @coldtea/pr-lens-agent-skill The PR Lens skill for coding agents. It teaches an agent to draw the change it just made: author a graph document from the diff, validate it against the contract, render it, attach it to the pull request, and to fix a repository's map by writing corrections rather than editing generated output. MIT © Coldtea AI. ## Install it ```bash npm install --save-dev @coldtea/pr-lens-agent-skill ``` **Claude Code**: copy it where skills live, per project or per user: ```bash mkdir -p .claude/skills/pr-lens cp node_modules/@coldtea/pr-lens-agent-skill/SKILL.md .claude/skills/pr-lens/ ``` **Cursor**: the same file works as a rule: ```bash mkdir -p .cursor/rules cp node_modules/@coldtea/pr-lens-agent-skill/SKILL.md .cursor/rules/pr-lens.mdc ``` **Anything else**: point your agent's instructions file at `SKILL.md`. It is plain markdown with YAML frontmatter, and it assumes nothing beyond a shell and `npx`. ## What is in it `SKILL.md` is short. It tells the agent when to use PR Lens, then sends it to the CLI for the full instructions: ```bash npx @coldtea/pr-lens-cli@latest skill # the write, validate, fix, render loop npx @coldtea/pr-lens-cli@latest skill references # the graph document, the config format, and an example ``` The CLI prints the instructions for its own version, so an old copy of `SKILL.md` never sends the agent to commands that have changed. Their source is `manual.md` and `references/`, in this folder of the repository. The agent is usually the model. Rather than spending a provider key to describe a diff it already understands, it writes the document itself and lets `pr-lens validate` hold it to the contract. Every failure is a path into the document, so the loop closes without a human in it. ## Why this exists A coding agent that opens a pull request is asking a person to review code the person did not write. A diagram of what moved is the cheapest thing the agent can add to make that review possible. --- Part of [PR Lens](https://prlens.dev). Review what actually matters. -
SKILL.md 1.6 KB
--- name: pr-lens description: "WHAT: Draws a code change or part of a codebase as an animated architecture, data-flow or data-model diagram, on its own or in a pull request. WHEN: asked to diagram, visualise or explain a change, a system or a schema change, or when a pull request should carry a diagram. KEYWORDS: PR Lens, diagram, architecture, data flow, data model, schema, ERD, visualise, visualize, pull request" --- # PR Lens Animated architecture, data-flow and data-model diagrams for code changes and codebases. The agent writes one JSON document, and PR Lens draws it. Run: `npx @coldtea/pr-lens-cli@latest <command>`. Nothing to install first. ## Start here This file is a discovery stub, not the usage guide. Before running any PR Lens command, load the actual workflow content from the CLI: ```bash npx @coldtea/pr-lens-cli@latest skill # start here: write, validate, render, share npx @coldtea/pr-lens-cli@latest skill references # the graph document field by field, the config format, a full example ``` The CLI serves skill content that always matches the installed version, so instructions never go stale. The content in this stub cannot change between releases, which is why it just points at `skill`. ## Why PR Lens - Works with any coding agent (Claude Code, Codex, Gemini CLI, Cursor, OpenCode, Copilot) - Draws one self-contained animated SVG that GitHub shows in a comment, with no scripts - `validate` names the exact field that is wrong, so the agent can fix its own document - Opens as a live canvas you can step through and ask questions on - Needs no model key when the agent writes the document itself -
tsconfig.json 148 B
Loading… -
vitest.config.ts 132 B
Loading…
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.