Agent Skills › UniClipboard/UniClipboard › refresh-agents

refresh-agents

GitHub

同步 crates/AGENTS.md 中的结构、路径、复杂度热点及已知故障等事实信息,确保文档与代码库状态一致。

.agents/skills/refresh-agents/SKILL.md UniClipboard/UniClipboard

Trigger Scenarios

重构或重命名文件后 发现文档引用过时路径时

Install

npx skills add UniClipboard/UniClipboard --skill refresh-agents -g -y
More Options

Non-standard path

npx skills add https://github.com/UniClipboard/UniClipboard/tree/v1/.agents/skills/refresh-agents -g -y

Use without installing

npx skills use UniClipboard/UniClipboard@refresh-agents

指定 Agent (Claude Code)

npx skills add UniClipboard/UniClipboard --skill refresh-agents -a claude-code -g -y

安装 repo 全部 skill

npx skills add UniClipboard/UniClipboard --all -g -y

预览 repo 内 skill

npx skills add UniClipboard/UniClipboard --list

SKILL.md

Frontmatter
{
    "name": "refresh-agents",
    "description": "Refresh fact-based sections of crates\/AGENTS.md (STRUCTURE, WHERE TO LOOK, COMPLEXITY HOTSPOTS, KNOWN BROKEN) from current codebase state. Use after refactoring, renaming files, adding crates, or when the agent notices AGENTS.md info is stale."
}

Refresh AGENTS.md

Bring the fact-based sections of crates/AGENTS.md up to date with the current codebase.

When to Use

  • After adding/removing/renaming crates (STRUCTURE — also handled by pre-commit hook)
  • After moving or renaming key files (WHERE TO LOOK)
  • Periodically or before a milestone (COMPLEXITY HOTSPOTS)
  • After discovering tests that are broken on HEAD (KNOWN BROKEN)
  • When you notice AGENTS.md references stale paths during a session

Procedure

Step 1 — Refresh STRUCTURE

Run the pre-commit script to sync crate inventory:

node scripts$refresh-agents-structure.mjs

Step 2 — Refresh WHERE TO LOOK

Verify each entry in the ## WHERE TO LOOK table still points to an existing file:

For each row in the table:

  1. Check if the file path still exists (e.g., crates/uc-bootstrap/src/wiring/mod.rs)
  2. If moved/renamed, update the Location column
  3. If deleted with no replacement, remove the row
  4. If a new major entry point was added (e.g., new daemon binary, new CLI subcommand), add a row

Do NOT add every file — only keep entries for the ~10 most common "where do I start?" lookups.

Step 3 — Refresh COMPLEXITY HOTSPOTS

Compute current hotspots using git churn + file size:

# Top 10 files by recent change frequency (last 30 commits)
git log --oneline -30 --name-only --pretty=format: -- 'crates/' | sort | uniq -c | sort -rn | head -10

# Files over 400 lines
find crates/ -name '*.rs' -exec wc -l {} + | sort -rn | head -15

Update ## COMPLEXITY HOTSPOTS with files that are BOTH large (>300 lines) AND frequently changed. Keep to 4-6 entries max. Format:

- `path/to/file.rs`: one-sentence description of why it's complex.

Step 4 — Refresh KNOWN BROKEN (optional)

Only update this if you know of currently-broken tests on HEAD:

cargo test --workspace --lib --no-fail-fast 2>&1 | grep "FAILED\|error\[" | head -10

If failures exist that are known/accepted (not regressions), list them:

## KNOWN BROKEN
- `uc-daemon-local` auth.rs doctests: 7 tests, known broken since ADR-008 migration
- `uc-platform` effective_mime doctest: fixture issue, skip with --lib

If all tests pass, either remove the section or write "None currently known."

Step 5 — Update datestamp

Change the "Last refreshed" line at the top:

**Last refreshed:** YYYY-MM-DD (manual; <reason>)

Step 6 — Commit

Stage and commit the updated file:

git add crates/AGENTS.md
git commit -m "docs(agents): refresh AGENTS.md fact sections"

What NOT to change

  • ## OVERVIEW — rarely changes; only update on major architecture shifts
  • ## CONVENTIONS — updated by /learn skill, not here
  • ## ANTI-PATTERNS — updated by /learn skill, not here
  • ## COMMANDS — only update if build system actually changed
  • ## NOTES — historical notes, leave as-is unless clearly wrong

Output

Report what changed:

  • Which sections were updated
  • How many entries were added/removed/modified
  • Any stale entries that were removed

Version History

  • c6483d7 Current 2026-11-13 18:21

Same Skill Collection

.agents/skills/babysit-pr/SKILL.md
.agents/skills/beui/SKILL.md
.agents/skills/continue-task/SKILL.md
.agents/skills/create-formal-verification-skill/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/cross-device-diagnose/SKILL.md
.agents/skills/design-audit/SKILL.md
.agents/skills/dual-side-debug/SKILL.md
.agents/skills/dual-side-sync/SKILL.md
.agents/skills/e2e-test-thinker/SKILL.md
.agents/skills/error-diagnose-fix/SKILL.md
.agents/skills/gen-changelog/SKILL.md
.agents/skills/learn/SKILL.md
.agents/skills/plan-reviewer/SKILL.md
.agents/skills/pr-evidence/SKILL.md
.agents/skills/pr-greenlight/SKILL.md
.agents/skills/react-doctor/SKILL.md
.agents/skills/research-then-implement/SKILL.md
.agents/skills/review-strict/SKILL.md
.agents/skills/skill-evolve/SKILL.md
.agents/skills/statechart/SKILL.md
.agents/skills/systematic-debugging/SKILL.md
.agents/skills/tracing-best-practices/SKILL.md
.agents/skills/trigger-prepare-release/SKILL.md
.agents/skills/ui-iteration/SKILL.md
.agents/skills/verify-receive-reply-fence/SKILL.md
.agents/skills/wrap/SKILL.md
.claude/skills/gui-user-review/SKILL.md
.agents/skills/ios-log-diagnose/SKILL.md
.agents/skills/local-log-debug/SKILL.md

Metadata

Files
0
Version
c6483d7
Hash
0ec1cb5d
Indexed
2026-11-13 18:21

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-14 02:33
浙ICP备14020137号-1