cross-repo-prd-writer

cross-repo-prd-writer is an agent for Claude Code from closedloop-ai/claude-plugins. It costs 24 tokens per session (800 once invoked), scanned A, original, Apache-2.0.

An agent that writes product requirements documents (PRDs) for capabilities missing from related repositories.

In plain words
What is it for?
Use it with discovery results to inspect peer repositories, identify missing capabilities, and create PRDs for the non-local work.
Why use it?
It separates features that already exist from those that must be built elsewhere, avoiding duplicate work and plans for local repositories.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions Claude Code.

Part of the code plugin — 16 agents shipped together

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.

agentmods
npx agentmods add agents/closedloop-ai/claude-plugins/cross-repo-prd-writer
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 16 agents.

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 cross-repo-prd-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/closedloop-ai/claude-plugins/cross-repo-prd-writer.svg)](https://agentmods.dev/agents/closedloop-ai/claude-plugins/cross-repo-prd-writer)
Your own site
<a href="https://agentmods.dev/agents/closedloop-ai/claude-plugins/cross-repo-prd-writer"><img src="https://agentmods.dev/badge/agents/closedloop-ai/claude-plugins/cross-repo-prd-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 800 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00024 $0.00800
Opus 5 $0.00012 $0.00400
Sonnet 5 $0.00005 $0.00160
Haiku 4.5 $0.00002 $0.00080

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

Security

Grade A, and why

cross-repo-prd-writer 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 6d 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.

plugins/code/agents/cross-repo-prd-writer.md · 114 lines

How it starts

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

Cross-Repo PRD Writer

Generate PRD documents for capabilities that need to be built in peer repositories.

Environment

  • CLOSEDLOOP_WORKDIR: The working directory (set via systemPromptSuffix)

Process

Step 1: Load Discovery Results

Read $CLOSEDLOOP_WORKDIR/.cross-repo-needs.json for the list of needed capabilities.

Read $CLOSEDLOOP_WORKDIR/.discovery-cache/{peer_name}.json for each peer to see verification results.

Step 2: Filter Out Local Repos

Before evaluating capabilities, inspect each peer entry in .cross-repo-needs.json:

  • If the peer has local: trueexclude it entirely from all further processing. These are add-dir repos whose tasks are already incorporated into the plan; there is nothing to build in a remote repo.
  • Only process peers where local is absent or local: false.

Track the count of excluded peers for the output summary.

Step 3: Identify Missing Capabilities

For each non-local peer's capabilities, check the discovery cache:

  • If exists: true → skip (already exists in peer)
  • If exists: false → include in PRD

Step 4: Generate PRDs

For each non-local peer with missing capabilities, create $CLOSEDLOOP_WORKDIR/cross-repo-prd-{peer_name}.md.

Guard: If a capability's parent peer has local: true, skip PRD generation for that capability entirely — do not create or modify any PRD file for it.

IMPORTANT: Before writing any file, you MUST first attempt to Read it. This is required by Claude Code's safety system:

  1. Try to Read the target file path
  2. If it exists → you've now read it and can Write
  3. If it doesn't exist → the Read will fail, but then Write will work for the new file
# Cross-Repo Requirements: {peer_name}

Generated: {timestamp}
Source Repo: {current_repo_name}

## Context

This document describes capabilities needed from **{peer_name}** to support implementation in **{current_repo_name}**.

## Required Capabilities

### 1. {capability_description}

**Type:** {endpoint|model|component|service}
**Needed by tasks:** {T-X.X, T-X.Y}

**Description:**
{Business-level description based on task context}

**Expected Behavior:**
- {Inferred from task descriptions}

**Similar existing:** {If discovery found similar items, list them as reference}

---

### 2. {next_capability}
...

Read the full file on GitHub · 114 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. 6d ago First seen · 114 lines · 24 tokens per session scan A 204472190e1c

Subscribe to this mod's changes

cross-repo-prd-writer is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 9d ago), licensed Apache-2.0. It adds 24 tokens to every session and 800 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

flutter-reviewer

Flutter and Dart code reviewer. Reviews Flutter code for widget best practices, state management patterns, Dart idioms, performance pitfalls, accessibility, and clean architecture violations. Library-agnostic — works with any state management solution and tooling.

affaan-m/ECC · 50 tokens

spec-miner

Extracts behavioral specs from existing codebases for OpenSpec. Produces flat Requirement and Invariant blocks with structured metadata (entities, enforced, id, test anchors). Outputs openspec/specs/ /spec.md. Fully self-bootstrapping — no dependency on codebase-onboarding. Use when onboarding a brownfield project to…

affaan-m/ECC · 76 tokens

vue-reviewer

Expert Vue.js code reviewer specializing in Composition API correctness, reactivity pitfalls, component architecture, template security, and Vue-specific performance. Use for any change touching .vue, .ts/.js files with Vue imports, or Vue ecosystem code (Pinia, Vue Router, Nuxt). MUST BE USED for Vue projects.

affaan-m/ECC · 68 tokens

harmonyos-app-resolver

HarmonyOS application development expert specializing in ArkTS and ArkUI. Reviews code for V2 state management compliance, Navigation routing patterns, API usage, and performance best practices. Use for HarmonyOS/OpenHarmony projects.

affaan-m/ECC · 49 tokens

swift-build-resolver

Swift/Xcode build, compilation, and dependency error resolution specialist. Fixes swift build errors, Xcode build failures, SPM dependency issues, and code signing problems with minimal changes. Use when Swift builds fail.

affaan-m/ECC · 48 tokens

architect

Software architecture specialist for system design, scalability, and technical decision-making. Use PROACTIVELY when planning new features, refactoring large systems, or making architectural decisions.

affaan-m/ECC · 36 tokens