refresh-agent-context
Audit this Turborepo for stale or missing agent-reference docs, then refresh repo and app-level `AGENTS.md` and related onboarding docs using the bundled workspace inventory script. Use when apps, packages, routes, ports, or shared tooling changed and the repo needs a fresh agent-oriented context pass.
Best use case
refresh-agent-context is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Audit this Turborepo for stale or missing agent-reference docs, then refresh repo and app-level `AGENTS.md` and related onboarding docs using the bundled workspace inventory script. Use when apps, packages, routes, ports, or shared tooling changed and the repo needs a fresh agent-oriented context pass.
Teams using refresh-agent-context should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/refresh-agent-context/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How refresh-agent-context Compares
| Feature / Agent | refresh-agent-context | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Audit this Turborepo for stale or missing agent-reference docs, then refresh repo and app-level `AGENTS.md` and related onboarding docs using the bundled workspace inventory script. Use when apps, packages, routes, ports, or shared tooling changed and the repo needs a fresh agent-oriented context pass.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Refresh Agent Context Use this skill to keep the repo understandable for coding agents as the Turborepo evolves. ## Goal Detect drift between the actual workspace structure and the agent-facing docs, then update the smallest set of docs that restore a fast path into the correct app or package. Prefer updating these files, in this order: 1. root `AGENTS.md` 2. root `README.md` 3. app-level `apps/*/AGENTS.md` 4. package docs only when they materially help route ownership or shared-code discovery ## Quick Start From the repo root, run: ```bash node skills/refresh-agent-context/scripts/workspace_inventory.mjs ``` This prints a current inventory of: - app and package workspaces - package names - dev ports inferred from `package.json` - asset prefixes and `NEXT_PUBLIC_APP_NAME` inferred from `next.config.ts` - whether `AGENTS.md`, `README.md`, and `CLAUDE.md` exist per app ## Workflow ### 1. Build the current repo inventory Run the inventory script first. Treat its output as the baseline snapshot of the current monorepo shape. ### 2. Audit doc coverage Check for: - missing root `AGENTS.md` - apps missing `AGENTS.md` - empty or stub-only `AGENTS.md` - stale README entries for app names, ports, package names, or CMS/framework ownership - missing references to important shared packages such as `packages/i18n`, `packages/ui-chrome`, or `packages/ecosystem-data` - route ownership that is not obvious from the current docs ### 3. Patch the minimal doc set Prefer concise guides that answer these questions quickly: - which workspace owns the requested feature - which commands validate only that workspace - which config files define routing, asset prefixes, or cross-app navigation - which shared packages are likely involved Do not turn the docs into a full architecture book. Keep them as jump-start guides. ### 4. Verify against source files Before finalizing: - verify package names from `package.json` - verify ports from workspace scripts - verify asset prefixes, rewrites, and `NEXT_PUBLIC_APP_NAME` from `next.config.ts` - verify content ownership from the actual `content/`, `src/`, or package layout ### 5. Report the audit Summarize: - what was stale or missing - what docs were updated - what could not be verified automatically ## Output Standards - keep docs short and operational - prefer tables for workspace maps and bullets for gotchas - preserve existing OpenSpec-managed blocks in app `AGENTS.md` - do not duplicate long app docs when a short pointer is enough - if no changes are needed, say so and include the audit findings ## Example Requests - "Refresh the repo's agent docs after adding a new app" - "Audit the Turborepo and update AGENTS.md files" - "Rebuild agent context after changing ports and route ownership" - "Run the periodic agent-reference refresh"
Related Skills
llms-txt-generator
Upgrade llmtxt-generator.py by scanning apps/ for doc structure changes, then regenerate llms.txt and llms-en.txt while only adding missing sections. Use when updating the generator, adding new doc sections, or refreshing LLM text files.
migrate-page
Migrate a legacy page from apps/web/src/pages/ (Pages Router) to apps/web/src/app/ (App Router). Use when moving any existing page from the pages directory to the app directory.
create-page
Scaffold a new page in apps/web/src/app following the project's established pattern. Use when creating any new page or route under the web app.
context-budget
审核Claude Code上下文窗口在代理、技能、MCP服务器和规则中的消耗情况。识别膨胀、冗余组件,并提供优先的令牌节省建议。
hig-project-context
Create or update a shared Apple design context document that other HIG skills use to tailor guidance.
filesystem-context
Use for file-based context management, dynamic context discovery, and reducing context window bloat. Offload context to files for just-in-time loading.
ddd-context-mapping
Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.
context7-auto-research
Automatically fetch latest library/framework documentation for Claude Code via Context7 API. Use when you need up-to-date documentation for libraries and frameworks or asking about React, Next.js, Prisma, or any other popular library.
context-window-management
Strategies for managing LLM context windows including summarization, trimming, routing, and avoiding context rot
context-optimization
Context optimization extends the effective capacity of limited context windows through strategic compression, masking, caching, and partitioning. The goal is not to magically increase context windows but to make better use of available capacity.
context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems.
context-management-context-save
Use when working with context management context save