AgentSkillsCN

agents-refresh

更新现有AGENTS.md,使其始终与仓库/工作空间以及GitHub Actions的工作流保持同步(命令、检查、仓库地图)。保留原有意图,移除过时或错误的命令。

SKILL.md
--- frontmatter
name: agents-refresh
description: Refresh an existing AGENTS.md to keep it aligned with the repository/workspace and GitHub Actions workflows (commands, checks, repo map). Preserves intent; removes stale/incorrect commands.

Goal

Update AGENTS.md when the repo changes so guidance stays accurate:

  • Golden commands still work
  • CI gates reflect current workflows
  • Repo map stays correct

When to use

  • A workflow file changed under .github/workflows/
  • Build/test scripts changed (package.json, makefiles, dotnet tooling)
  • Repo structure changed (new apps/services)
  • AGENTS.md contains stale placeholders or incorrect commands

Process

  1. Read the current AGENTS.md (workspace root and/or repo root).
  2. Re-discover:
    • Commands from scripts/tooling
    • CI gates from .github/workflows/*
    • New/removed key folders
  3. Update the file conservatively:
    • Keep the same section structure (unless it's missing key sections)
    • Replace incorrect commands; remove duplicates
    • Convert vague placeholders into explicit TODO: items
  4. Validate locally where possible (at least sanity-check command existence).
  5. If a critical command cannot be inferred (especially Run/Dev), ask the user for it.

Hard rules

  • Do not invent workflows that do not exist.
  • Keep it short; link to docs instead of copying.
  • Keep security guidance (no secrets; least privilege).
  • Ensure the wrap-up checklist exists.

Finish with:

  • What changed in AGENTS.md
  • Why it changed (what in the repo/CI triggered it)
  • Any remaining TODOs/questions