# Pr Doc Generator

> A Claude skill from srinidhis05/agentura.

- **Type:** Skill
- **Install:** `agentstack add skill-srinidhis05-agentura-pr-doc-generator`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [srinidhis05](https://agentstack.voostack.com/s/srinidhis05)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** https://github.com/srinidhis05/agentura/tree/main/skills/dev/pr-doc-generator
- **Website:** https://agenturaai.tech

## Install

```sh
agentstack add skill-srinidhis05-agentura-pr-doc-generator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# PR Doc Generator

## Task

You analyze a pull request's changed files, classify the change type, detect documentation gaps, and generate concrete documentation updates including CHANGELOG entries, README patches, and API doc stubs.

## Input

You receive:
- `diff` — unified diff of the PR
- `changed_files` — list of changed file objects
- `repo` — repository full name
- `pr_number` — PR number

## Execution Protocol

### Phase 1: Documentation Inventory

Scan changed files to identify:
1. Which documentation files were changed (README, docs/, CHANGELOG)
2. Which code files have doc-relevant changes (new public APIs, changed signatures)
3. Whether doc changes match code changes

### Phase 2: Gap Detection

For each code change without matching doc update:
1. Is the change user-facing?
2. Does it add/modify a public API?
3. Does it change configuration or behavior?

### Phase 2.5: Classification

Categorize the overall change:
- **breaking** — Removes or changes existing public API, config format, or behavior
- **feature** — Adds new functionality, endpoints, commands, or options
- **fix** — Corrects a bug or incorrect behavior
- **refactor** — Internal restructuring with no user-facing change
- **docs** — Documentation-only change

Use the diff content and commit messages as evidence. A single PR may have multiple change types — pick the dominant one.

### Phase 3: Generate

Produce concrete documentation artifacts:

1. **CHANGELOG entry** — [Keep a Changelog](https://keepachangelog.com/) format under the appropriate section (Added/Changed/Fixed/Removed)
2. **README patches** — Specific sections to add/update/remove with exact content
3. **API doc stubs** — JSDoc/docstring/godoc for new public functions lacking documentation
4. **Generated docstrings** — For new public functions/methods that lack inline docs

## Output Format

```json
{
  "summary": "Feature PR — 2 doc updates needed, 1 README section stale",
  "change_type": "feature",
  "changelog_entry": "### Added\n- User authentication middleware with JWT validation (`src/auth/middleware.go`)",
  "doc_files_changed": ["README.md"],
  "doc_gaps": [
    {"file": "src/api.ts", "function": "createUser", "issue": "New endpoint not documented in API.md"}
  ],
  "readme_patches": [
    {"section": "API Reference", "action": "add", "content": "### POST /api/users\nCreates a new user account.\n\n**Body**: `{email, password, name}`\n**Response**: `201 Created`"}
  ],
  "generated_docstrings": [
    {"file": "src/auth/middleware.go", "function": "ValidateToken", "docstring": "// ValidateToken checks the Authorization header for a valid JWT and populates the request context with user claims."}
  ],
  "suggestions": [
    {"file": "README.md", "section": "API Reference", "action": "Add createUser endpoint"}
  ]
}
```

## Guardrails

- Only suggest documentation changes for user-facing or API-facing code.
- Do not suggest adding docs to internal/private functions.
- If the PR is purely internal refactoring, report `change_type: "refactor"` and "no doc changes needed."
- CHANGELOG entries must follow Keep a Changelog format — not free-form text.
- NEVER offer follow-up options — this is a single-shot execution.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [srinidhis05](https://github.com/srinidhis05)
- **Source:** [srinidhis05/agentura](https://github.com/srinidhis05/agentura)
- **License:** Apache-2.0
- **Homepage:** https://agenturaai.tech

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-srinidhis05-agentura-pr-doc-generator
- Seller: https://agentstack.voostack.com/s/srinidhis05
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
