Official agent skill

Docs Edit

by langchain-ai in langchain-ai/docs

Edit a docs page that already has an open pull request, or revise a page in place.

OfficialMITAuto-check passedDevelopment

Install Docs Edit

skills CLI
$ npx skills add langchain-ai/docs --skill docs-edit -a claude-code

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

GitHub CLI
$ gh skill install langchain-ai/docs docs-edit --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/langchain-ai/docs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/docs-edit .claude/skills/docs-edit && 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
docs-edit
GitHub stars
425
Token cost
~1.9k tokens
SKILL.md length
998 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Edit a docs page that already has an open pull request, or revise a page in place.

  • Works in 5 steps: Check out the PR's own branch → Read the real diff → Edit → …
  • Review changes on a named PR
  • SKILL.md covers Step 1. Check out the PR's own…, Step 2. Read the real diff, Step 3. Edit and Step 4. Verify before handing…, plus 1 more section
  • Calls git, gh and make; needs LANGSMITH_API_KEY

What it does

Docs Edit is an agent skill from langchain-ai/docs, published by the product's own GitHub organization. Edit a docs page that already has an open pull request, or revise a page in place. Covers checking out the PR's own branch instead of cutting a new one, forked cross-repository PRs, reading the real diff, checking the edit against related pages, and the verification to run before handing off. Use when asked to edit, revise, fix, or review changes on a named PR, branch, or existing page.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with Git. The repository describes itself as: Unified LangChain documentation. The licence is MIT.

When your agent uses it

  • Review changes on a named PR
  • Tasks that involve Pull requests

Example prompts

  • “/docs-edit”

Requirements

  • Python 3
  • A credential in LANGSMITH_API_KEY

Workflow steps

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

  1. Check out the PR's own branch
  2. Read the real diff
  3. Edit
  4. Verify before handing off
  5. Report

What it can do on your machine

Read from SKILL.md and the folder at commit dcfc8b4. 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:

    • git
    • gh
    • make

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

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LANGSMITH_API_KEY

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

Context cost

Docs Edit loads about 1.9k tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 998 words of instructions outside code blocks.

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

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 langchain-ai/docs at commit dcfc8b4, republished under its MIT licence (© langchain-ai). 998 words, ~1,923 tokens.

Download SKILL.mdSave it as .claude/skills/docs-edit/SKILL.md (or your agent's skills folder).
name
docs-edit
description
Edit a docs page that already has an open pull request, or revise a page in place. Covers checking out the PR's own branch instead of cutting a new one, forked cross-repository PRs, reading the real diff, checking the edit against related pages, and the verification to run before handing off. Use when asked to edit, revise, fix, or review changes on a named PR, branch, or existing page.

Edit an existing docs page or PR

The failure this skill prevents: an agent asked to "fix the wording on PR 1234" cuts a fresh branch, commits there, and opens a second pull request against a teammate's work. Land edits on the branch that already exists.

Step 1. Check out the PR's own branch

When the request names a PR, by number or URL, work on that PR's head branch.

bash
gh pr view <n> --json number,title,headRefName,baseRefName,author,isCrossRepository,files
git status --porcelain          # must be clean; stop and ask if it is not
git fetch origin <headRefName>
git checkout <headRefName>      # tracks origin/<headRefName>

Use plain git checkout <branch>. Do not use git checkout -b, --no-track, or a worktree: each produces a net-new branch, and committing there opens a second PR against someone else's work.

A local branch whose name merely mentions the PR is not the same branch. Confirm that git rev-parse HEAD matches the headRefOid from gh pr view before editing, and that the branch has an upstream:

bash
git rev-parse --abbrev-ref @{upstream}   # fails when the branch tracks nothing

Cut a new branch only when the edits are your own and no open PR exists to land them on, or when the user asks for one. Branch from the latest origin/main, never from a stale local main.

Cross-repository PRs

When isCrossRepository is true, the branch lives on a fork. Use gh pr checkout <n>, which configures the fork remote, and confirm push access before committing. Without it, the edits are stranded locally.

Step 2. Read the real diff

bash
gh pr diff <n>

Prefer this over git diff main...HEAD. A stale local main silently inflates that diff with unrelated commits, and a branch that already merged main once inflates it further. To compare against the live base instead, fetch first and use git diff origin/main...HEAD.

Step 3. Edit

AGENTS.md holds the rules that apply to every edit: the style guide, frontmatter, syntax, and the navigation map. Two that matter most here:

  • Match the conventions of the file you are editing. Do not restructure, combine, or split pages unless asked.
  • Never fabricate examples, field names, UI labels, or policy details. Verify each factual claim against the source it describes, and state plainly what you could not verify.

For voice and sentence rhythm while drafting, use the docs-team-voice skill. For adding, moving, renaming, or deleting a page, including navigation and redirects, use add-docs-page. When the edit is really a question of which page the content belongs on, use docs-restructure.

Verify claims against source, not against other docs

A sibling docs page is not a source. It is another claim, written by someone who may have been guessing too, and two docs pages that agree can both be wrong. Check the implementation:

bash
gh api -X GET search/code -f q='LANGSMITH_GATEWAY repo:langchain-ai/langchain' \
    --jq '.total_count, (.items[]?|.path)'
gh api repos/langchain-ai/langchain/contents/<path> --jq .content | base64 -d

Python and TypeScript live in separate repositories and drift apart, so a table with a Python column and a TypeScript column needs both checked: langchain-ai/langchain, langchain-ai/langchainjs, and for some providers a dedicated repository such as langchain-ai/langchain-google. A package's CHANGELOG.md gives the version a feature landed in, which is what a minimum version column needs.

State plainly what you could not verify. "I could not confirm the Baseten row; no gateway references in either candidate repository" is a useful review note. Silently keeping an unverified claim is not.

Show full SKILL.md (500 more words)Show less
Read the pages around the one you are editing

A page is one of several that cover the same feature. Others reach it from another angle: a CLI reference, a permissions table, a list of Chat surfaces, a setup guide, the pages that link to it. An edit made to one page in isolation leaves the set contradicting itself.

Before editing, find the related pages:

bash
grep -rliE "<feature name>|<page-slug>" src --include='*.mdx'
grep -n "<page-slug>" src/docs.json

Read each one, then check for:

  • Contradictions. The edited page and a related one give different setup steps, defaults, or requirements. For example, a feature page that sets LANGSMITH_API_KEY while the CLI page recommends langsmith auth login. Settle it against source, then fix whichever page is wrong.
  • Duplication. A procedure the edited page restates from the page that owns it. Link to the owner instead. When choosing the owner is the real question, use docs-restructure.
  • Missing entry points. A page that lists every surface, command group, or permission area of a product should mention the feature and link to it.
  • Navigation placement. A page filed in a group that does not match its subject. Report it; do not move the page unless asked.

A related page tells you what to check, not what is true. When two pages disagree, the source decides, as described in the section above.

Keep edits to related pages small: a cross-link, a corrected fact, or a short entry that points at the owner page. Anything larger is a restructure, so ask first.

Never hand-edit generated files

These are written by a generator. Editing them looks like it works, then a scheduled run reverts it, and for the changelogs the edit has already gone out over RSS:

FileGenerated by
src/langsmith/changelog.mdxchangelog-weekly skill, from langchainplus fragments
src/langsmith/self-hosted-changelog.mdxthe helm changelog bot
src/langsmith/langsmith-platform-openapi.json.github/workflows/refresh-langsmith-openapi.yml
src/langsmith/agent-server-openapi.jsonPRs from the langgraph-api repository
src/snippets/deepagents-eval-category-matrix.mdxscripts/refresh_deepagents_category_matrix.py
src/snippets/langsmith/mda-oauth-catalog.mdxscripts/refresh_mda_oauth_catalog.py
build/make build

When one of these carries the problem you were asked to fix, fix the generator or the upstream source and say so. Do not edit the output.

When an instruction reverses an earlier one

Reviewers change their minds, and on a long thread they will ask for a format they previously rejected. Converting a table to a list and then back wastes a round and loses the reasoning both times.

When an instruction contradicts one you already applied, say so before applying it: name the earlier instruction, the change you made for it, and ask which to keep. Two reversals on the same element mean the requirement is unclear, not that the format is wrong.

Step 4. Verify before handing off

bash
make lint_prose FILES="<changed files>"

Run make broken-links as well when links, page names, or navigation entries changed. For a prose review against the style guide, use the docs-review skill.

Step 5. Report

Say which branch the edits are on and whether it is the PR's own branch. Name the related pages you changed, and the ones you read and left alone. If anything could not be verified, list it. Do not push or force-push unless the user asks.

© langchain-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/docs-edit of langchain-ai/docs.

Open the folder on GitHubat commit dcfc8b4

Compare with similar skills

Docs Edit 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.

Docs Edit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs Edit this skilllangchain-ai/docs425—~1.9kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed

More from langchain-ai/docs

All 17 skills in this repo
  • Add Docs Page

    langchain-ai/docs

    Official

    Add, move, rename, or delete a page on the LangChain docs site.

    425 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Deep Agents

    langchain-ai/docs

    Official

    Build batteries-included agents with planning, context management, subagent delegation, and sandboxed execution.

    425 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Docs Code Samples

    langchain-ai/docs

    Official

    A skill your agent uses when migrating inline code samples from LangChain docs (MDX files) into external, testable code files that are extracted by this repo’s snippet scripts and used as Mintlify…

    425 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Docs Restructure

    langchain-ai/docs

    Official

    Restructure documentation that spans several pages. An agent skill from langchain-ai/docs.

    425 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Docs Team Voice

    langchain-ai/docs

    Official

    Write or revise documentation prose so it reads like the rest of this site, in the docs team's shared voice.

    425 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Langchain

    langchain-ai/docs

    Official

    Build agents with a prebuilt architecture and integrations for any model or tool.

    425 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Docs Edit

What does Docs Edit do?

Edit a docs page that already has an open pull request, or revise a page in place. Docs Edit is an agent skill from langchain-ai/docs, published by the product's own GitHub organization. Edit a docs page that already has an open pull request, or revise a page in place.

When should I use Docs Edit?

Docs Edit fits situations like: review changes on a named PR; tasks that involve Pull requests.

How do I install Docs Edit in Claude Code?

Run `npx skills add langchain-ai/docs --skill docs-edit -a claude-code`. Or copy the skill folder (.agents/skills/docs-edit in langchain-ai/docs) into .claude/skills/docs-edit in your project. Claude Code loads it when a task matches its description.

How do I install Docs Edit in Codex?

Run `npx skills add langchain-ai/docs --skill docs-edit -a codex`. Or copy the skill folder (.agents/skills/docs-edit in langchain-ai/docs) into .agents/skills/docs-edit in your project. Codex loads it when a task matches its description.

Can I use Docs Edit 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 langchain-ai/docs --skill docs-edit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs-edit, .gemini/skills/docs-edit, .github/skills/docs-edit and .opencode/skills/docs-edit in your project.

What does Docs Edit need to run?

Going by SKILL.md and its folder, Docs Edit needs the command-line tools its instructions call (git, gh and make) and credentials named LANGSMITH_API_KEY. Our summary lists: Python 3; A credential in LANGSMITH_API_KEY.

Does Docs Edit access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docs Edit 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 Docs Edit use?

Docs Edit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docs Edit use?

About 1.9k tokens (SKILL.md is roughly 7.7k 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 Docs Edit?

Skills that share tags, products or a category with Docs Edit: Finishing a Development Branch (obra/superpowers, 296k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Open Code Review CLI (alibaba/open-code-review, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs Edit?

langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/docs, which has 425 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

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