Standardized inline markers for inter-agent communication. Use when creating handoff annotations for other agents, scanning for pending work from upstream agents, or when the user mentions handoff markers, agent coordination, or cross-agent communication.
/plugin marketplace add laurigates/claude-plugins/plugin install agent-patterns-plugin@lgates-claude-pluginsThis skill is limited to using the following tools:
Structured inline markers for asynchronous agent-to-agent communication.
Handoff markers are structured comments in code that:
// @AGENT-HANDOFF-MARKER(target-agent) {
// type: "category",
// context: "what this code does",
// needs: ["requirement 1", "requirement 2"],
// priority: "blocking|enhancement",
// refs: ["path/to/related/file"]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "form-validation",
// context: "User registration form with email/password",
// needs: [
// "error message placement strategy",
// "focus management on validation failure",
// "ARIA live region for error announcements",
// "inline vs summary validation decision"
// ],
// priority: "blocking",
// refs: [
// "src/components/FormField.tsx",
// "docs/design/registration-flow.md"
// ],
// constraints: [
// "must work with React Hook Form",
// "mobile-first responsive"
// ]
// }
async function handleRegistration(data: FormData) {
try {
await api.register(data);
} catch (errors) {
// @AGENT-PLACEHOLDER: implement error display
console.error(errors);
}
}
// @AGENT-HANDOFF-MARKER(ux-implementation)
// For: Accessibility, component UX, responsive patterns, design tokens
// @AGENT-HANDOFF-MARKER(service-design)
// For: User journey decisions, information architecture, high-level UX strategy
// @AGENT-HANDOFF-MARKER(typescript-development)
// For: Framework-specific implementation, type system, state management
// @AGENT-HANDOFF-MARKER(code-review)
// For: Quality review, security assessment, performance evaluation
// @AGENT-HANDOFF-MARKER(test-architecture)
// For: Test strategy, coverage requirements, test patterns
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "component-implementation",
// context: "Modal dialog for confirmation actions",
// needs: [
// "focus trap implementation",
// "keyboard handling (Escape to close)",
// "ARIA dialog pattern",
// "animation on open/close"
// ]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "accessibility",
// context: "Data table with sortable columns",
// needs: [
// "ARIA sort attributes",
// "keyboard navigation for column headers",
// "screen reader announcements for sort changes",
// "focus management after sort"
// ]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "form-validation",
// context: "Multi-step checkout form",
// needs: [
// "validation timing (blur vs submit)",
// "error message positioning",
// "progress indicator accessibility",
// "step navigation keyboard support"
// ]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "loading-states",
// context: "Dashboard data fetching",
// needs: [
// "skeleton screen design",
// "loading announcement for screen readers",
// "error recovery UI",
// "empty state handling"
// ]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "design-tokens",
// context: "Component library theming",
// needs: [
// "color token architecture",
// "dark mode support",
// "component-level token scoping",
// "responsive token overrides"
// ]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "responsive",
// context: "Navigation menu",
// needs: [
// "mobile menu pattern (drawer/bottom sheet)",
// "breakpoint strategy",
// "touch target sizing",
// "focus management across breakpoints"
// ]
// }
Work cannot proceed without this. Use for:
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "accessibility",
// priority: "blocking",
// context: "Form submit button",
// needs: ["keyboard activation", "disabled state handling"]
// }
Improves quality but not blocking. Use for:
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// type: "loading-states",
// priority: "enhancement",
// context: "Profile image upload",
// needs: ["optimistic UI", "progress indicator animation"]
// }
# Find all handoff markers
rg "@AGENT-HANDOFF-MARKER\(" --type ts --type tsx
# Find markers for specific agent
rg "@AGENT-HANDOFF-MARKER\(ux-implementation\)" --type ts
# Find blocking markers only
rg "@AGENT-HANDOFF-MARKER.*priority.*blocking" --type ts
# Count markers by agent
rg -o "@AGENT-HANDOFF-MARKER\([^)]+\)" | sort | uniq -c
When starting work, agents should:
Scan for incoming markers
rg "@AGENT-HANDOFF-MARKER\(ux-implementation\)" --type ts --type tsx -A 10
Process each marker
Mark completion
// @AGENT-HANDOFF-MARKER-COMPLETE(ux-implementation) {
// implemented: ["focus trap", "ARIA dialog", "Escape key"],
// notes: "Uses FocusTrap from @headlessui/react"
// }
Create downstream markers if needed
// @AGENT-HANDOFF-MARKER(typescript-development) {
// type: "component-implementation",
// context: "Modal with UX specs defined above",
// needs: ["React component implementation", "state management"]
// }
// @AGENT-PLACEHOLDER: error display implementation
console.error(errors);
// @AGENT-PLACEHOLDER {
// waiting-for: "ux-implementation",
// requirement: "accessible error announcements",
// current-behavior: "logs to console"
// }
setErrors(validationErrors);
function showValidationErrors(errors: ValidationError[]) {
// @AGENT-PLACEHOLDER: implement accessible error display
// Requirements from @AGENT-HANDOFF-MARKER above:
// - Focus first error field
// - Announce via ARIA live region
// - Display inline error messages
// Temporary implementation
errors.forEach(e => console.error(e.message));
}
// @AGENT-HANDOFF-MARKER-COMPLETE(ux-implementation)
// Implemented: focus trap, ARIA attributes, keyboard handling
// @AGENT-HANDOFF-MARKER-COMPLETE(ux-implementation) {
// resolved: "2024-01-15",
// implemented: [
// "WCAG 2.1 AA compliant",
// "Focus trap using @headlessui/react",
// "Escape key closes modal",
// "Focus returns to trigger on close"
// ],
// tests: "src/__tests__/Modal.a11y.test.tsx",
// notes: "Added to component library as BaseModal"
// }
Handoff markers complement the existing file-based system:
When completing markers, update the agent output:
<!-- ~/.claude/docs/ux-implementation-output.md -->
## Completed Handoffs
### Modal Dialog (src/components/Modal.tsx)
- Implemented focus trap
- Added ARIA attributes
- Keyboard navigation complete
- Tests added
### Registration Form (src/pages/Register.tsx)
- Error display pattern implemented
- Focus management on validation
- ARIA live regions for announcements
## Pending Downstream Work
- @AGENT-HANDOFF-MARKER(typescript-development) for Modal component wrapper
- @AGENT-HANDOFF-MARKER(test-architecture) for E2E accessibility tests
Update shared context with marker status:
{
"workflow": "ux-implementation",
"completed_handoffs": [
"src/components/Modal.tsx:42",
"src/pages/Register.tsx:156"
],
"pending_handoffs": [
{
"file": "src/components/DataTable.tsx",
"line": 89,
"type": "accessibility",
"priority": "blocking"
}
]
}
// Bad: Vague requirement
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// needs: ["make it accessible"]
// }
// Good: Specific requirements
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// needs: [
// "ARIA combobox pattern for autocomplete",
// "keyboard navigation (arrow keys, Enter, Escape)",
// "screen reader announcement on selection"
// ]
// }
// Bad: No context
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// needs: ["error handling"]
// }
// Good: Full context
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// context: "Payment form in checkout flow, high-stakes interaction",
// needs: ["error recovery UX", "clear error messaging"],
// constraints: ["PCI compliance", "real-time validation"]
// }
// @AGENT-HANDOFF-MARKER(ux-implementation) {
// context: "Notification system",
// refs: [
// "docs/design/notifications.md", // Design spec
// "src/hooks/useNotifications.ts", // Existing hook
// "src/components/Toast/Toast.tsx" // Related component
// ]
// }
After implementation, either:
@AGENT-HANDOFF-MARKER-COMPLETE markerUse the /handoffs command to manage markers:
# List all pending handoffs
/handoffs
# Filter by agent
/handoffs --agent ux-implementation
# Show stale markers (>7 days)
/handoffs --stale
# Output as JSON for scripting
/handoffs --json
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.