Find and fix the docs and agent guidance that a branch makes stale - agent skills and their reference files, AGENTS.md and .agents/*.md prompts, READMEs, docs/ folders, and code-adjacent docs that name a changed path, command, symbol, env var, setting, endpoint or behaviour. Use before opening a PR, before pushing new commits to an open PR, and when asked to update docs or skills after a change. The open-pr skill runs it every time.
79
99%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
A change that renames a script or removes a function leaves every doc that names it wrong, and the next agent follows the wrong doc. Run this before you open a PR and before each push to an open PR. It finds what changed, finds the docs that mention it, and fixes them in the same PR.
Run every command from the repo root. Shell variables do not carry over between commands: run each code block as one command.
BASE=$(gh pr view --json baseRefName --jq .baseRefName 2>/dev/null) || BASE=<the base from open-pr Step 2, else main> # no PR yet
git fetch -q origin "$BASE"; B="origin/$BASE"
git diff --name-status -M "$B"...HEAD # A/M/D/R per file
git log --format='%h %s%n%b' "$B"..HEAD # intent, new conventions
git diff -U0 "$B"...HEAD | grep -E '^[-+](\s*(async )?def |\s*class |export (async )?(function|const|class|type|interface|enum) |\s*@app\.(get|post|put|patch|delete)\()|os\.(environ|getenv)|env_var=|process\.env|import\.meta\.env'
git diff -U0 "$B"...HEAD | grep -E '^@@' | sed -E 's/^@@ [^@]* @@ ?//' | sort -u # functions and classes whose bodies changed
git diff --stat "$B"...HEAD -- '*.sh' '*pyproject.toml' '*package.json' .github/workflows .agentsTurn that output into a list of search terms. Use the old name; for a rename, the new name is the replacement.
app.desktop.desktop_server; under libs/, start at the package: kiln_ai.adapters.ml_model_list). Do not use bare stems such as utils or config.@@ hunk headers (a header names the nearest earlier top-level line, not always the changed one), and the key nouns of the commit subjects. These find the docs that describe the changed behaviour, not only the docs that name the file.def, class or export on a - line with no matching + line.TERMS=(-e app/desktop/old_script.sh -e old_script.sh -e old_function) # one -e per term from step 1
DOCS=(AGENTS.md .agents '*.md' '*.mdx' .github .config)
NOT_DOCS=(':!AGENTS.md' ':!.agents' ':!*.md' ':!*.mdx' ':!.github' ':!.config')
SKIP=(':!specs/projects' ':!.agents/playwright_project' ':!*kiln_ai_server_client*' ':!app/web_ui/src/lib/api_schema.d.ts')
git grep -n -F "${TERMS[@]}" -- "${DOCS[@]}" "${SKIP[@]}" # docs, skills, prompts, configs
git grep -n -F "${TERMS[@]}" -- . "${NOT_DOCS[@]}" "${SKIP[@]}" # code-adjacent mentionsAGENTS.md, .agents/*.md prompts, every README, docs/, app/*/docs/, the PR template, CI workflows and .config/.--help and usage text, the Makefile, pyproject.toml scripts, and the scripts that skills link to.specs/projects/<project> to both greps.-w for short symbol names that match inside longer names. Add -i for terms that docs write in prose.git grep -n -l -i '<area word>' -- AGENTS.md .agents '*.md' '*.mdx' .github .config, and read the description lines in .agents/skills/*/SKILL.md.Read each hit. Judge whether the text describes the changed behaviour, not only whether the name matches. Each hit gets a decision in step 3.
open-pr and other files written in Simplified Technical English stay in it.CLAUDE.md, .claude/, .cursor/, .mcp.json, .worktreeinclude, the generated API client under kiln_ai_server_client/, app/web_ui/src/lib/api_schema.d.ts. Edit their sources (AGENTS.md, .agents/, .config/wt/)..github/pull_request_template.md (everything above # Agentic PR Summary). If it holds stale text, tell the user in your end-of-task summary.specs/projects/** except the active project's own files.Commit the doc updates in the same PR, as their own commit:
git add <doc files>
git commit -m "docs: <what the docs now say>"Re-run your agent setup script if you changed .agents/.
When the PR has an Agentic PR Summary, add one line to it, or update the line that is there. List every doc file that the PR changes:
**Docs and skills updated:** <files>, <one-line reason>., or**Docs and skills updated:** none needed, <one-line reason>.git grep -n -F -e <removed path> -e <removed symbol> -- . ':!specs/projects' ':!.agents/playwright_project' ':!*kiln_ai_server_client*' ':!app/web_ui/src/lib/api_schema.d.ts'Add the active spec project back to that check if you work on one.
Kiln-AI/Kiln
c66200f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.