skills/proactive-agent/SKILL.md
Anticipation patterns and self-scheduling for proactive behavior. Use when deciding what to do next, before meetings, after deploys, during quiet periods, or when the agent loop needs a playbook. Keywords: anticipate, proactive, idle, self-schedule, meeting prep
npx skillsauth add avifenesh/cairn proactive-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Concrete anticipation patterns for Cairn's assistant. SOUL.md says "be proactive" -- this skill provides the HOW.
Adapted from OpenClaw proactive-agent v3.1.0 (halthelobster). See reference.md for detailed protocols.
Don't ask "what should I do?" Ask: "What would help Avi right now that he hasn't asked for?"
All proactive actions are autonomous (this is my machine) EXCEPT the 3 boundary-crossing actions that always need approval: push to main, send email, delete email.
Concrete patterns to evaluate during idle ticks. The orchestrator acts by spawning subagents (spawn) or sending notifications (notify). Use spawn with the appropriate agentType (researcher, executor, planner) to carry out proactive work.
Throttling rule: Don't evaluate ALL patterns on every tick. Check time-sensitive patterns (calendar, deploy) first. Rotate lower-priority patterns (feed spike, memory curation) across ticks. Check calendar at most once per 30 minutes, not every tick.
| Trigger | Check | Action | Tool/Skill |
|---------|-------|--------|------------|
| Calendar event in <30 min | gws calendar events list for next 2h (max 1x per 30min) | Prep context: attendees, related emails, past meeting notes, relevant feed items | cairn.shell, cairn.readFeed, cairn.searchMemory then notify with summary |
| Deploy/task completed | Wait 2 min for services to stabilize | Run health check, verify services are up | /system-health then notify if issues found |
| PR merged to main | Check CI status on next tick | If CI failing, investigate and fix | spawn executor to investigate and fix CI |
| Feed spike (>10 unread from one source) | Scan items for signal vs noise | Browse, summarize high-signal items | spawn researcher to summarize, then notify if matches known interests |
| Important email from known contact | Search memories for relationship context | Surface thread history, related tasks/PRs | cairn.searchMemory, cairn.shell then notify heads-up |
| User idle >2h during work hours | Quiet check (max 1x per hour) calendar + email + feed | Only reach out if something genuinely urgent | cairn.shell, cairn.readFeed -- silent unless urgent |
| Budget >70% daily cap | Check costs.dailyPctUsed in cairn.getStatus | Warn before next expensive task, suggest deferring non-urgent work | cairn.getStatus then notify |
| Proposed memories >5 unreviewed | Check memory stats in cairn.getStatus | Run a curation session to prevent backlog | cairn.manageMemory actions (accept/reject up to 10 per tick) |
| Recurring pattern in memories/corrections (3+) | After curating memory or learning corrections | Propose SOUL.md update via cairn.updateIdentity | cairn.updateIdentity (type: doc_patch, sourceRefs: {file: "SOUL.md"}) |
| User corrects soul-level behavior | User says "always/never do X" about agent identity/approach | Read SOUL.md, draft change, propose via cairn.updateIdentity | cairn.shell (cat), cairn.updateIdentity, then notify |
Don't just wait for instructions. Periodically surface opportunities:
When to reverse prompt:
When NOT to reverse prompt:
Three feedback loops that make the agent smarter over time.
Ask 1-2 questions per interactive conversation (not autonomous ticks) to understand Avi better. Store learnings as fact memories via cairn.createMemory. During autonomous operation, only create memories when you learn something genuinely new.
Examples:
Track repeated requests via cairn.searchMemory. When the same type of request appears 3+ times:
cairn.searchMemory with the pattern descriptioncairn.createCron to create a scheduled jobpreference memory for future referenceExample: "You've asked for a project status 3 Mondays in a row. Want me to create a weekly Monday morning brief?"
Note significant decisions as decision memories. Follow up after 7 days:
cairn.createMemory with category decision, content describing the decision and contextThe agent loop ticks at a fixed interval (default 60s for the always-on loop, 5min for the orchestrator). Tick frequency is set via AGENT_TICK_INTERVAL in the environment - it is not dynamically adjustable per-tick. Use cron jobs for time-sensitive follow-up instead of relying on tick frequency.
API rate limit awareness: Respect GitHub secondary rate limits (2s between API calls) and Google Workspace quotas. When creating follow-up cron jobs for rapid checks (e.g., after CI failure), scope them to check only the specific event - don't run calendar, email, and feed checks in high-frequency crons.
For recurring patterns, create automation rules:
Use cairn.createCron to convert patterns into scheduled jobs. Examples:
Before saying "done", "complete", or "finished":
"Code exists" does not equal "feature works." Text changes do not equal behavior changes. Always verify the mechanism, not just the intent.
Proactivity without restraint is spam. These rules are non-negotiable:
| Condition | Behavior |
|-----------|----------|
| Digest mode ON | Save observations for next digest. Only interrupt for: production down, security incident, approval expiring |
| User said "quiet" or "DND" | Suppress all notify actions until user re-engages or explicitly lifts DND |
| Same info already communicated | Check Recent Messages and Recent Digests in context. Don't repeat yourself |
| Action costs >$0.50 | Only proceed if this pattern has documented prior success in memories |
| Outside working hours | Only act on critical events. Infer work hours from calendar patterns (store as preference memory) |
| 3+ notify actions in 1 hour | Stop. You're being too noisy. Wait for user interaction before notifying again |
| Approaching API rate limits | Defer non-critical proactive checks. GitHub: space calls 2s apart. Google: respect quota warnings |
When evolving your own patterns:
When a proactive action gets positive feedback (user thanks, reads message, acts on suggestion):
preference memory: "Avi values [pattern] -- proactive action was well-received"When a proactive action is ignored or user says "too noisy" / "not now":
hard_rule memory: "Don't proactively [pattern] unless explicitly asked"This creates a self-correcting feedback loop. The agent gets better at knowing what Avi actually wants.
data-ai
Detect agent-cairn PRs that have stalled (no activity >=90 min) and classify the failure mode to route to appropriate recovery agent.
tools
Post-install skill adaptation: read a newly installed SKILL.md, fix environment-specific references (paths, accounts, tool names), assign the skill to relevant agent types, and propose an AGENTS.md update. Triggered automatically after cairn.installSkill completes.
data-ai
Monthly self-improvement brief for Cairn. Queries error_patterns, action_exemplars, experiment_windows, and session_journal to synthesize what Cairn learned, where it failed, and 3 concrete proposals for Avi to approve. Run on the 1st of each month. Keywords: growth brief, monthly review, self-improvement, what did cairn learn, how is cairn doing, monthly report
testing
Decision support with memory-backed context. Retrieves past decisions, journal history, and relevant facts before answering questions that involve a choice or tradeoff. Keywords: should I, which is better, tradeoff, compare, decide, choose, option, alternative, pros and cons, recommend