document-app

document-app is a command for Claude Code from phuryn/pm-skills. It costs 61 tokens per session (1,326 once invoked), scanned A, original, MIT.

A command that reconstructs an AI-built app’s design and behavior from its code into documents about its architecture, user flows, permissions, variables, and applicable features.

In plain words
What is it for?
Use it on a whole repository or a selected backend or folder to create the review documents, including conditional documents for features such as email, scheduled tasks, search-engine visibility, or automation.
Why use it?
Reviewers need to know what the app is, who may do what, and where sensitive behavior occurs. The documents also provide the intended behavior that later security, performance, and testing reviews compare against.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Part of the pm-ai-shipping plugin — 3 skills, 5 commands shipped together

Good fit Use it on a whole repository or a selected backend or folder to create the review documents, including conditional documents for features such as email, scheduled tasks, search-engine visibility, or automation.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/phuryn/pm-skills/document-app
About the project

phuryn/pm-skills is a marketplace of reusable skills, commands, and plugins that guide AI assistants through product-management work such as discovery, strategy, planning, metrics, launches, and growth. It is for product managers and teams using Claude Code, Cowork, or compatible assistants. The catalogue entries are the project's own workflows and extensions.

phuryn/pm-skills · 27,175 stars · on GitHub · productcompass.pm

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.

Clone the repo
git clone --depth 1 https://github.com/phuryn/pm-skills

Made for: Claude Code.

Or install pm-ai-shipping, the plugin that ships this one along with the rest of its 3 skills, 5 commands.

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 document-app

README.md
[![agentmods](https://agentmods.dev/badge/commands/phuryn/pm-skills/document-app/github.svg)](https://agentmods.dev/commands/phuryn/pm-skills/document-app)
Your own site
<a href="https://agentmods.dev/commands/phuryn/pm-skills/document-app"><img src="https://agentmods.dev/badge/commands/phuryn/pm-skills/document-app/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for document-app

Your own site · 80×15
<a href="https://agentmods.dev/commands/phuryn/pm-skills/document-app"><img src="https://agentmods.dev/badge/commands/phuryn/pm-skills/document-app.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,326 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00061 $0.01326
Opus 5.5 $0.00024 $0.00530
Sonnet 5.5 $0.00012 $0.00265
Haiku 4.5 $0.00006 $0.00133

Measured 8d ago against content hash 6ad71fe173dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

document-app 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 8d 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.

pm-ai-shipping/commands/document-app.md · 97 lines

How it starts

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

/document-app -- Make the System Reviewable

Produce the durable documentation an AI-built app is missing: an honest map of what the system is, who can do what, and where the risk lives. These docs are the foundation every later audit compares the code against.

Invocation

/document-app
/document-app supabase/functions
/document-app the backend
/document-app check
/document-app check supabase/functions

A first argument of check runs check-only mode (below) on the scope that follows it.

Workflow

Step 1: Scope

Audit $ARGUMENTS. If it starts with check, skip to Check-only mode with the rest as the scope. If empty, document the whole repository, prioritizing backend code, auth, data access, background jobs, and anything that sends, schedules, or exposes data.

Step 2: Reverse-Engineer the Docs

Apply the shipping-artifacts skill. Reading the code as the source of truth, produce the applicable documents. Where they go and what they are called follow its Locations and names rule: the repo's own docs location and existing equivalents first, the names below (in documentation/ at the repo root) only where the repo has none. For large scopes, fan out with parallel subagents — one per core document, each reading the code slice its doc describes — then reconcile the cross-references yourself.

Core (always):

  • architecture.md — system overview, stack, auth flow, trust boundaries
  • flows.md — the permission-relevant journeys: each protected step's authz check, the trust-boundary crossings, and the side effects each flow causes
  • permissions.md — roles, scope derivation, resource × operation × role matrix, RLS vs. code-enforced checks
  • variables.md — config & secrets mapped to risk and rotation

Conditional (only if the capability exists — otherwise note its absence in one line):

  • emails.md — notification path, templates, retry/backoff, failure visibility
  • cron.md — scheduled-work inventory, idempotency, internal-call auth
  • seo.md — SPA preview approach, route coverage, metadata sanitization
  • automation.md — embedded agents/automations: trigger, tool surface, steering vs. hard guardrails, output contract, app-owned side effects, approval gates

Read the full file on GitHub · 97 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. 8d ago Changed · +35 lines · +17 tokens per session 6ad71fe173dc
  2. 1mo ago First seen · 62 lines · 44 tokens per session scan A f1940d24a4f2

Subscribe to this mod's changes

document-app is a command published in the GitHub repository phuryn/pm-skills (27,175 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 1,326 once invoked, about $0.0002 per session on Opus 5.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.