pwf-doc-capture

pwf-doc-capture is a command for Claude Code from J-Pster/Psters_AI_Workflow. It costs 91 tokens per session (581 once invoked), scanned A, original, MIT.

A command for recording solved bugs or reusable implementation patterns in a team’s documentation.

In plain words
What is it for?
Use it after fixing a bug or when documenting a pattern such as role-based visibility or a multi-step cloud pipeline. It writes the resulting documentation into the project’s solutions folders.
Why use it?
It keeps useful problem-solving knowledge from being lost in a conversation or rediscovered later. The notes connect a problem with its solution, prevention, or repeatable approach.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it after fixing a bug or when documenting a pattern such as role-based visibility or a multi-step cloud pipeline. It writes the resulting documentation into the project’s solutions folders.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/j-pster/psters_ai_workflow/pwf-doc-capture
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/J-Pster/Psters_AI_Workflow

Made for: Claude Code.

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 pwf-doc-capture

README.md
[![agentmods](https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-capture/github.svg)](https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-capture)
Your own site
<a href="https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-capture"><img src="https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-capture/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 pwf-doc-capture

Your own site · 80×15
<a href="https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-capture"><img src="https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 581 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.00091 $0.00581
Opus 5 $0.00046 $0.00291
Sonnet 5 $0.00018 $0.00116
Haiku 4.5 $0.00009 $0.00058

Measured 10d ago against content hash 368a6572c492, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pwf-doc-capture 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 10d 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/psters-ai-workflow/commands/pwf-doc-capture.md · 66 lines

What it actually says

Capture Reusable Learnings and Patterns

Use this command to explicitly register reusable learnings so future work can reuse them quickly. Detailed playbook: assets/docs-playbook.md.

Modes

  • /pwf-doc-capture — document the most recent fix from conversation (problem → solution)
  • /pwf-doc-capture [context] — e.g. "N+1 in list", "trigger timeout"
  • /pwf-doc-capture pattern — document a reusable implementation pattern (not a bug fix)
  • /pwf-doc-capture pattern [context] — e.g. "role-based visibility", "new SQS Lambda pipeline stage"

Mode 1: Problem/Solution (default)

Use when documenting a solved issue with root cause, fix, and prevention.

Run the playbook from assets/docs-playbook.md:

  1. Parallel analysis tracks
  2. Pattern extraction check
  3. Assemble and write solution doc
  4. Optional focused reviewer validation
  5. For reusable patterns, invoke pattern-extractor (agents/docs/pattern-extractor.md) explicitly.

Mode 2: Pattern (/pwf-doc-capture pattern)

Use when the outcome is a reusable implementation pattern.

Run the pattern workflow from assets/docs-playbook.md and write to:

  • docs/solutions/patterns/<category>/<name>.md

Preconditions

  • Problem is solved and verified (Mode 1).
  • Non-trivial (worth documenting for future lookup).

Categories

Choose a concrete, searchable category in docs/solutions/ (problem/solution) or docs/solutions/patterns/ (pattern mode). Keep names specific and stable.

Success

Confirm: "Documentation complete. File: docs/solutions/<category>/<filename>.md" (and pattern file if applicable). Suggest: link related docs, run /pwf-plan or continue workflow.

  • /pwf-doc update to propagate learned patterns across stale docs
  • /pwf-plan when the learning implies a broader architectural follow-up
  • /pwf-commit-changes when documentation updates are complete
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. 10d ago First seen · 66 lines · 91 tokens per session scan A 368a6572c492

Subscribe to this mod's changes

pwf-doc-capture is a command published in the GitHub repository J-Pster/Psters_AI_Workflow (289 stars, last pushed 5mo ago), licensed MIT. It adds 91 tokens to every session and 581 once invoked, about $0.0005 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.