skills/always-on-agent-inputs/SKILL.md
How to design contextual inputs for an always-on AI agent with episodic memory. Covers what data to feed the agent, how to structure observations and triggers, ambient context capture (screen, audio, calendar), context window budgeting, and retrieval strategies that keep the agent grounded in what's actually happening. Activate on: "what should the agent observe", "context inputs for agent", "ambient context capture", "agent triggers", "agent input design", "screenpipe integration", "context window budget", "what data to feed my agent", "/always-on-agent-inputs". NOT for: memory architecture and storage (use always-on-agent-architecture), application ideas (use always-on-agent-applications), safety concerns (use always-on-agent-safety).
npx skillsauth add curiositech/windags-skills always-on-agent-inputsInstall 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.
You are designing what an always-on agent sees, hears, and knows. The architecture skill handles where memory lives. This skill handles what goes into it — the raw signals, how they're structured, when the agent wakes up, and how to keep the context window honest.
RETRIEVAL STRATEGY SELECTION
Agent Task Type → Retrieval Strategy
IF conversational/chat:
├─ Use recency-first (70% temporal, 30% semantic)
├─ Budget: 15K conversation history + 4K recent recall
└─ Skip archival unless user asks "remember when..."
IF problem-solving/debugging:
├─ Use relevance-first (60% semantic, 40% temporal)
├─ Budget: 8K archival + 4K recall + 2K ambient
└─ Include error patterns from past solutions
IF context-switch detected:
├─ Use frequency-based (what does user work on most?)
├─ Budget: 6K project context + 2K recent + 4K goals
└─ Pull entity history for active files/people
IF scheduled trigger (morning briefing):
├─ Use structured agenda (calendar + tasks + updates)
├─ Budget: 4K calendar + 4K unfinished tasks + 2K changes
└─ No conversation history needed
IF reactive trigger (CI failure, meeting starting):
├─ Use event-specific context loading
├─ Budget: 8K event context + 4K related history
└─ Skip general conversation unless relevant
AMBIENT DATA FILTERING
Screen/Audio Observation → Filter Decision
IF same app + same text for >5 minutes:
└─ DISCARD (no change, noise)
IF app switch detected:
├─ KEEP transition record
└─ Score relevance of new app content
IF high-signal keywords found:
├─ Check against active projects/goals
├─ IF match score >0.6 → STORE to archival + recall
├─ IF match score 0.3-0.6 → STORE to recall only
└─ IF match score <0.3 → DISCARD
IF technical error/exception visible:
├─ ALWAYS STORE (debugging context)
└─ Tag with urgency level
IF calendar event mentioned:
├─ ALWAYS STORE (temporal anchor)
└─ Cross-reference with actual calendar
TRIGGER URGENCY ASSIGNMENT
Event Type + Context → Urgency Level
IF CI failure:
├─ Production branch → ACTIVE (notify user)
├─ Feature branch + user currently coding → PASSIVE (mention when user next engages)
└─ Old branch/PR → SILENT (log only)
IF meeting starting:
├─ <5 minutes → ACTIVE (interrupt with prep)
├─ 5-15 minutes → BADGE (show prep available)
└─ >15 minutes → SILENT (prep in background)
IF code change detected:
├─ First commit on new branch → PASSIVE (note new work)
├─ Commit fixes previous error → PASSIVE (note resolution)
└─ Regular commits → SILENT (track progress)
IF mentioned in Slack:
├─ Direct message → ACTIVE (respond needed)
├─ Channel mention + urgent keywords → ACTIVE
└─ Channel mention, normal → BADGE (review when convenient)
Schema Bloat
Retrieval Thrashing
Trigger Spam
Context Staleness
Ambient Noise Flooding
Scenario: Billing Bug Investigation with Token Budget Constraints
User reports: "The billing calculation is wrong for enterprise customers."
Step 1: Context Budget Allocation (40K total)
System + Identity: 4K tokens (fixed)
Core Memory: 2K tokens (user preferences, active projects)
DECISION: Problem-solving task → use relevance-first retrieval
Allocated: 8K archival + 4K recall + 2K ambient + 15K conversation + 5K output buffer
Step 2: Retrieval Strategy Execution
# Broad semantic search for billing-related memories
archival_candidates = vector_search(
query="billing calculation enterprise customer error bug",
top_k=20,
filters={"project": ["billing", "payments"]}
)
# Rerank by true relevance (not just embedding similarity)
reranked = rerank_results(archival_candidates, query, top_k=5)
# Result: Gets "enterprise discount logic bug from 3 weeks ago"
# that pure vector search ranked #12
# Temporal search for recent billing work
recent_work = temporal_search(
time_range="last_7_days",
entity_filters=["billing", "enterprise"],
max_results=3
)
# Result: User was debugging pricing tiers yesterday
Step 3: Ambient Context Integration
# Check what user is currently doing
screen_summary = get_ambient_summary(last_30_minutes)
# Result: "User has billing_calculator.py open, looking at
# calculate_enterprise_discount() function"
# Budget check: 8K archival + 4K recent + 2K ambient = 14K (under budget)
Step 4: Fast vs Complete Trade-off Agent has two options:
Decision: Stay with fast retrieval for initial response. If user asks for deeper investigation, trigger a follow-up with expanded context budget.
Agent Response Quality:
Use /always-on-agent-inputs for:
Do NOT use for:
/always-on-agent-architecture/always-on-agent-applications/always-on-agent-safety/prompt-engineer/agentic-patternstools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.