Agent skill

Improve Documentation

by trickle-labs in trickle-labs/pg-trickle

Reviews and improves the pgtrickle documentation in docs/. An agent skill from trickle-labs/pg-trickle.

Apache-2.0Auto-check passedProduct & Project Management

Install Improve Documentation

skills CLI
$ npx skills add trickle-labs/pg-trickle --skill improve-documentation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trickle-labs/pg-trickle improve-documentation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trickle-labs/pg-trickle.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/improve-documentation .claude/skills/improve-documentation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
improve-documentation
GitHub stars
147
Token cost
~2.3k tokens
SKILL.md length
729 words
Files
2
Skills in repo
4
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reviews and improves the pgtrickle documentation in docs/. An agent skill from trickle-labs/pg-trickle.

  • Works in 8 steps: Inventory → Accuracy Check → Link Check → …
  • Auditing docs quality
  • SKILL.md covers When to Use, Procedure and Reference
  • Calls python3

What it does

Improve Documentation is an agent skill from trickle-labs/pg-trickle. Reviews and improves the pgtrickle documentation in docs/. Checks accuracy against source code, fixes broken links, removes duplication, identifies gaps, and enforces consistency. Use when auditing docs quality, preparing a release, or after significant code changes. Produces a prioritised proposal and optionally writes it to a file.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `REVIEW_CHECKLIST.md`).

It sits in Product & Project Management. It works with SQL. The repository describes itself as: A PostgreSQL 18+ extension for streaming tables with incremental view maintenance, powered by differential dataflow in Rust. The licence is Apache-2.0.

When your agent uses it

  • Auditing docs quality
  • Preparing a release
  • After significant code changes

Example prompts

  • “Use the improve-documentation skill to review and improves the pgtrickle documentation in docs/. An agent skill from trickle-labs/pg-trickle”
  • “/improve-documentation”

Requirements

  • Python 3
  • Docker

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Inventory
  2. Accuracy Check
  3. Link Check
  4. Gap Analysis
  5. Consistency & Duplication
  6. Readability Assessment
  7. 5 — Onboarding Path Audit
  8. Proposal

What it can do on your machine

Read from SKILL.md and the folder at commit 101c5d3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Improve Documentation loads about 2.3k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 729 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trickle-labs/pg-trickle at commit 101c5d3, republished under its Apache-2.0 licence (© trickle-labs). 729 words, ~2,278 tokens.

Download SKILL.mdSave it as .claude/skills/improve-documentation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
improve-documentation
description
Reviews and improves the pg_trickle documentation in docs/. Checks accuracy against source code, fixes broken links, removes duplication, identifies gaps, and enforces consistency. Use when auditing docs quality, preparing a release, or after significant code changes. Produces a prioritised proposal and optionally writes it to a file.
argument-hint
Optional scope: a single doc file name or topic (e.g. CDC_MODES.md, scheduler). Omit to review all docs.

Improve Documentation

Full-cycle documentation quality review for the docs/ directory. Covers accuracy, link integrity, consistency, duplication, gaps, and readability. Ends with a structured proposal that can be written to a file.

When to Use

  • Auditing docs before a release
  • After major feature changes (refresh engine, CDC, DVM, scheduling)
  • When users report confusing or incorrect docs
  • Periodic quality reviews

Procedure

Work through the phases below in order. Track progress with a checklist.

Documentation Review Progress:
- [ ] Phase 1: Inventory
- [ ] Phase 2: Accuracy check
- [ ] Phase 3: Link check
- [ ] Phase 4: Gap analysis
- [ ] Phase 5: Consistency & duplication
- [ ] Phase 6: Readability
- [ ] Phase 6.5: Onboarding path audit
- [ ] Phase 7: Proposal

Phase 1 — Inventory
bash
ls docs/
wc -l docs/*.md docs/**/*.md 2>/dev/null | sort -rn | head -40

Read docs/SUMMARY.md (table of contents) and docs/introduction.md to understand the intended structure and audience.

For a scoped review, restrict to the requested file or topic. For a full review, sample every file: read the first 60 lines of each.


Phase 2 — Accuracy Check

For each doc (or the scoped file), verify claims against the actual codebase.

Cross-reference these sources:

Claim typeWhere to verify
SQL function signaturessrc/api.rs, sql/
GUC names / defaultssrc/config.rs, docs/GUC_CATALOG.md
Schema namessrc/lib.rs, src/catalog.rs
CDC trigger behavioursrc/cdc.rs, src/wal_decoder.rs
Refresh modessrc/refresh.rs
DVM operators / rewritessrc/dvm/
Version numberspg_trickle.control, Cargo.toml
Limitationssrc/dvm/parser/validation.rs
bash
# Spot-check a GUC name
grep -n "pg_trickle\." src/config.rs | head -20

# Spot-check a SQL function name
grep -n "#\[pg_extern" src/api.rs | head -20

# Spot-check schema references
grep -rn 'schema = "pgtrickle"' src/ | head -10

Flag every factual discrepancy with:

  • File and line number in the doc
  • What it says
  • What the code actually shows

Check all inter-doc Markdown links and any links to source files.

bash
# Extract all relative links from docs
grep -roh '\[.*\](\([^)]*\))' docs/ | grep -v 'http' | head -60

# Check that linked files exist
python3 - <<'EOF'
import re, os, sys
docs_root = "docs"
errors = []
for root, _, files in os.walk(docs_root):
    for f in files:
        if not f.endswith(".md"):
            continue
        path = os.path.join(root, f)
        with open(path) as fh:
            for i, line in enumerate(fh, 1):
                for m in re.finditer(r'\[.*?\]\(([^)#?]+)', line):
                    target = m.group(1)
                    if target.startswith("http"):
                        continue
                    resolved = os.path.normpath(os.path.join(os.path.dirname(path), target))
                    if not os.path.exists(resolved):
                        errors.append(f"{path}:{i} -> {target}")
if errors:
    print(f"{len(errors)} broken link(s):")
    for e in errors:
        print(" ", e)
else:
    print("All relative links OK")
EOF

Flag every broken link with file, line, and the broken target.


Phase 4 — Gap Analysis

Compare what the code supports against what is documented.

Key areas to check for coverage:

  • Every GUC in src/config.rs has an entry in docs/GUC_CATALOG.md
  • Every SQL function in src/api.rs appears in docs/SQL_REFERENCE.md
  • Every error variant in src/error.rs appears in docs/ERRORS.md
  • CDC modes in src/cdc.rs / src/wal_decoder.rs match docs/CDC_MODES.md
  • DVM operators in src/dvm/operators/ are listed in docs/DVM_OPERATORS.md
  • DVM rewrite rules match docs/DVM_REWRITE_RULES.md
  • Limitations in src/dvm/parser/validation.rs match docs/LIMITATIONS.md
bash
# Count pg_extern functions
grep -c "#\[pg_extern" src/api.rs

# Count GUC definitions
grep -c "GucSetting\|GucSwitch\|GucString" src/config.rs

# Count error variants
grep -c "^\s*[A-Z][a-zA-Z]*(" src/error.rs

Note gaps where documented behaviour differs from or is absent from code.


Phase 5 — Consistency & Duplication

Terminology consistency — scan for mixed usage of key terms:

bash
# Check for mixed capitalisation / naming
grep -rni "stream table\|streamtable\|streaming table" docs/ | head -20
grep -rni "differential refresh\|diff refresh\|incremental refresh" docs/ | head -20
grep -rni "change buffer\|change-buffer\|changebuffer" docs/ | head -20
grep -rni "pg_trickle\|pgtrickle\|pg-trickle" docs/ | head -30

Identify which variant is authoritative (use docs/GLOSSARY.md and src/lib.rs as ground truth) and flag deviations.

Duplication detection — look for near-identical sections across files:

bash
# Find files with very similar opening paragraphs
head -5 docs/*.md | grep -v "^==>" | sort | uniq -d | head -20

Flag content that appears nearly verbatim in more than one place.


Phase 6 — Readability Assessment

For each doc (or the scoped file), note:

  • Missing context: Does it assume knowledge not linked or explained?
  • Undefined jargon: Terms used before they are defined (compare to docs/GLOSSARY.md)
  • Structural issues: No introduction, no examples, walls of text
  • Stale examples: Code snippets that reference functions or options that no longer exist
  • Audience mismatch: Is this for operators, developers, or both? Is it clear?

Do not rewrite yet — just note the issue and the location.


Show full SKILL.md (307 more words)Show less
Phase 6.5 — Onboarding Path Audit

Walk the new-user journey from zero to first working stream table. This is the highest-leverage UX review because it is the path every user takes exactly once and can never retry with fresh eyes.

Entry points to walk (in order):

  1. docs/QUICKSTART_5MIN.md — can a user copy-paste every block and succeed?
  2. docs/GETTING_STARTED.md — does it pick up where the quickstart left off?
  3. First tutorial in docs/tutorials/ — does it assume knowledge not yet introduced?

For each step, check:

  • Prerequisites listed upfront: PostgreSQL version, OS, required tools (psql, docker, just, extension version). Missing prereqs cause silent failures that users blame on the extension.
  • Steps are in the right order: No step depends on an action not yet taken.
  • Each SQL block is runnable as-is: No placeholder values left without clear callouts (e.g. <your_table> must be visually distinct).
  • Expected output is shown: After each command, does the doc show what success looks like? Users don't know if they're on track without it.
  • Error paths are acknowledged: At least one "if this fails, check X" callout per major step.
  • Time estimate is realistic: If the quickstart promises "5 minutes", walk it and time it. Flag if it is materially longer.
  • Links to next steps: After completing the quickstart, is it obvious where to go next?
bash
# Check that the extension version mentioned in quickstart matches reality
grep -i 'version\|0\.[0-9]' docs/QUICKSTART_5MIN.md | head -10
cat pg_trickle.control | grep default_version

Flag every onboarding friction point with the file, step number, and the exact user action that would fail or confuse.


Phase 7 — Proposal

Compile all findings into a structured proposal.

Format:

markdown
# Documentation Improvement Proposal
Generated: <date>
Scope: <all docs | specific file/topic>

## Summary
<2–3 sentences: how many issues, severity distribution>

## Critical (breaks user experience)
### C1 — <short title>
- File: docs/FILENAME.md, line N
- Issue: <what is wrong>
- Fix: <concrete action>

## Major (misleads or confuses)
### M1 — <short title>
...

## Minor (polish, consistency)
### m1 — <short title>
...

## Gaps (undocumented features)
### G1 — <feature or GUC name>
- Missing from: docs/FILENAME.md
- Source: src/...

## Recommendations (structural)
### R1 — <title>
- Rationale: ...
- Action: ...

After presenting the proposal, ask:

"Should I write this proposal to a file (e.g. docs/IMPROVEMENT_PLAN.md)?"

If the user says yes, write it using the create_file tool (not shell echo or heredoc, to avoid Unicode corruption).


Reference

See REVIEW_CHECKLIST.md for the per-file checklist used during phases 2–6.5.

See docs/GLOSSARY.md for authoritative terminology. See AGENTS.md for coding conventions that affect accuracy checks.

© trickle-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .github/skills/improve-documentation of trickle-labs/pg-trickle.

  • SKILL.md
  • REVIEW_CHECKLIST.md

Open the folder on GitHubat commit 101c5d3

Compare with similar skills

Improve Documentation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Improve Documentation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Improve Documentation this skilltrickle-labs/pg-trickle147—~2.3kAutomated safety check: PassApache-2.0
Prd Generatorricneves-ai/flowgrammers-skills115—~2kAutomated safety check: PassMIT
Prd V08 Marketing Ops Handoffmattgierhart/PRD-driven-context-engineering180—~2.7kAutomated safety check: PassMIT
Lens Metricsjeremylongshore/tons-of-skills-marketplace2.8k—~2.8kAutomated safety check: NotesMIT
Expert TeamReJeCtAll/ExpertTeam-Codex113—~667Automated safety check: PassMIT
Excel and CSV Data Analysisbytedance/deer-flow83k4 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Prd Generator

    ricneves-ai/flowgrammers-skills

    Gerador de PRD (Product Requirements Document) em portugues-BR a partir de um Product Brief.

    115 GitHub stars~2k tokensUpdated 13 days ago
    Product & Project ManagementAuto-check passed
  • Prd V08 Marketing Ops Handoff

    mattgierhart/PRD-driven-context-engineering

    Define lifecycle stages and marketing → sales / CSM handoff rules for leads captured by GTM channels during PRD v0.8 Deployment & Ops.

    180 GitHub stars~2.7k tokensUpdated 1 mo ago
    Product & Project ManagementAuto-check passed
  • Lens Metrics

    jeremylongshore/tons-of-skills-marketplace

    Produce a complete metrics definition doc — metric name, formula, data source, segmentation, SQL or event tracking spec, and what good/bad looks like.

    2.8k GitHub stars~2.8k tokensUpdated today
    Product & Project ManagementAuto-check: notes
  • Expert Team

    ReJeCtAll/ExpertTeam-Codex

    专家团总路由器。用于 Codex CLI 的 $expert-team 调用. An agent skill from ReJeCtAll/ExpertTeam-Codex.

    113 GitHub stars~667 tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • Excel and CSV Data Analysis

    bytedance/deer-flow

    Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.

    83k GitHub starsUsed in 4 repos~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated today
    DatabasesAuto-check passed

More from trickle-labs/pg-trickle

  • Create Pull Request

    trickle-labs/pg-trickle

    Create or update a pull request for pgtrickle. An agent skill from trickle-labs/pg-trickle.

    147 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Enrich Release Roadmap

    trickle-labs/pg-trickle

    Enrich a pgtrickle release roadmap with prioritised items across six quality pillars: correctness, stability, performance, scalability, ease-of-use, and test coverage.

    147 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Implement Roadmap Version

    trickle-labs/pg-trickle

    Implement all items for a specific version in the pgtrickle roadmap.

    147 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Improve Documentation

What does Improve Documentation do?

Reviews and improves the pgtrickle documentation in docs/. An agent skill from trickle-labs/pg-trickle. Improve Documentation is an agent skill from trickle-labs/pg-trickle. Reviews and improves the pgtrickle documentation in docs/.

When should I use Improve Documentation?

Improve Documentation fits situations like: auditing docs quality; preparing a release; after significant code changes.

How do I install Improve Documentation in Claude Code?

Run `npx skills add trickle-labs/pg-trickle --skill improve-documentation -a claude-code`. Or copy the skill folder (.github/skills/improve-documentation in trickle-labs/pg-trickle) into .claude/skills/improve-documentation in your project. Claude Code loads it when a task matches its description.

How do I install Improve Documentation in Codex?

Run `npx skills add trickle-labs/pg-trickle --skill improve-documentation -a codex`. Or copy the skill folder (.github/skills/improve-documentation in trickle-labs/pg-trickle) into .agents/skills/improve-documentation in your project. Codex loads it when a task matches its description.

Can I use Improve Documentation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trickle-labs/pg-trickle --skill improve-documentation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/improve-documentation, .gemini/skills/improve-documentation, .github/skills/improve-documentation and .opencode/skills/improve-documentation in your project.

What does Improve Documentation need to run?

Going by SKILL.md and its folder, Improve Documentation needs the command-line tools its instructions call (python3). Our summary lists: Python 3; Docker.

Does Improve Documentation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Improve Documentation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Improve Documentation use?

Improve Documentation is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Improve Documentation use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Improve Documentation?

Skills that share tags, products or a category with Improve Documentation: Prd Generator (ricneves-ai/flowgrammers-skills, 115 stars), Prd V08 Marketing Ops Handoff (mattgierhart/PRD-driven-context-engineering, 180 stars), Lens Metrics (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Expert Team (ReJeCtAll/ExpertTeam-Codex, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Improve Documentation?

trickle-labs (a GitHub organization) maintains it in trickle-labs/pg-trickle, which has 147 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 6, 2026.

Source: trickle-labs/pg-trickle on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.