Sync AGENTS.md files by extracting knowledge from completed work threads. Use after closing an epic or manually with doc-sync command.
/plugin marketplace add ReinaMacCredy/my-workflow/plugin install reinamaccredy-my-workflow@ReinaMacCredy/my-workflowThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Automatically sync AGENTS.md files by extracting knowledge from Amp threads linked in closed beads issues.
doc-sync/doc-syncsync docsupdate agents.md from threadsThread URLs must be saved in beads notes (via execution-workflow):
bd update <id> --notes "THREAD: <url>"bd update <id> --notes "COMPLETED: ... THREAD: <url>. Files changed: ..."bd list --status closed --json
Filter to relevant issues:
For each closed issue:
THREAD: https://ampcode.com/threads/T-xxxFallback if no threads in notes:
find_thread file:<changed-files-from-notes>
For each thread ID, use read_thread to extract:
read_thread(
threadID: "T-xxx",
goal: "Extract: API changes, patterns, gotchas, decisions, commands"
)
For each issue with extracted findings:
Priority:
skills/beads/AGENTS.md)For each target AGENTS.md:
git diff -- "**/AGENTS.md"
DOC-SYNC: <epic-or-scope>
THREADS FOUND: <count>
- T-xxx: <brief description>
- T-yyy: <brief description>
EXTRACTED:
- [commands] <new command discovered>
- [pattern] <new pattern established>
- [decision] <key decision made>
TARGETS:
- skills/beads/AGENTS.md → +2 commands, +1 pattern
- AGENTS.md → +1 architecture note
[Shows git diff]
REVIEW: Confirm changes? (y/n)
| Case | Handling |
|---|---|
| No threads in notes | Use find_thread file:<files> as fallback |
| AGENTS.md doesn't exist | Ask user if should create new file |
| Thread not accessible | Log warning, continue with remaining threads |
| Conflicting info between threads | Prefer most recent thread (by timestamp) |
| No changes to make | Report "No new documentation needed" |
User: doc-sync for the auth epic
Agent: [Finds closed issues under auth epic]
[Extracts 3 thread URLs from notes]
[Reads threads, finds 2 new patterns and 1 command]
[Updates skills/auth/AGENTS.md]
[Shows diff for review]
When closing an epic, agent automatically:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.