context-engineering
Feed agents the right information at the right time. Use when starting a session, switching tasks, or when output quality drops due to missing or stale context.
What this skill does
# Context Engineering ## Overview Ensure that agents receive the right information at the right time. Context engineering is the practice of actively managing what an agent knows, rather than hoping it discovers what it needs. ## When to Use - Starting a new development session - Switching between unrelated tasks - When agent output quality degrades - When context window is approaching limits - Before delegating to a subagent ## Context Sources ### Rules Files - `CLAUDE.md`, `AGENTS.md`, `.claude/rules/`: persistent project-level guidance - Load automatically at session start - Keep concise and actionable ### Context Packing When starting a task, gather: - Relevant source files (not the entire codebase) - Related test files - Type definitions and interfaces - Recent git diff for the area of change - Any existing spec or plan ### MCP Integrations - Use documentation lookup tools for library-specific guidance - Use search tools for cross-repository patterns - Favor structured retrieval over dumping large files into context ## Process ### Step 1: Assess Current Context - What does the agent already know? - What files has it read? - What context was loaded at session start? ### Step 2: Identify Gaps - What information is needed for the current task? - What is missing from the current context? - What is stale or potentially outdated? ### Step 3: Pack Targeted Context - Load only the files relevant to the current task - Include type definitions for modified interfaces - Include test files that define expected behavior - Include recent changes to the affected area ### Step 4: Verify Context Quality - Can the agent describe the current state of the affected code? - Does it know the testing strategy for the area? - Does it know the relevant constraints and boundaries? ### Step 5: Manage Context Budget - Monitor context window usage - Compact or checkpoint when approaching limits - Drop stale context before loading new context ## Delegation Context When delegating to a subagent, include: - Goal: one sentence describing what to accomplish - Scope: what files and areas to focus on - Constraints: what must be preserved or avoided - Deliverable: what format the output should take - Known context: what has already been checked ## Common Rationalizations | Rationalization | Reality | |---|---| | "The agent can search the codebase itself" | Search is expensive and imprecise. Targeted context is faster and more accurate. | | "More context is always better" | Excess context wastes window space and increases noise. | | "I will load context once at the start" | Context needs change as tasks progress. | ## Verification - [ ] Agent has the specific files needed for the current task - [ ] Type definitions and interfaces are available - [ ] Test files are loaded for the affected area - [ ] Context window is not approaching limits ## Anti-Rationalization Table | Excuse | Counter | |--------|---------| | "The agent can search the codebase itself" | Search is expensive and imprecise. Targeted context is faster and more accurate. | | "More context is always better" | Excess context wastes window space and increases noise. Pack only what is needed. | | "I'll load context once at the start" | Context needs change as tasks progress. Reassess and repack as you go. | | "The agent already knows the project" | Agents do not retain knowledge across sessions. Pack context every time. | | "Context packing takes too much time" | Poor context causes more time wasted on wrong answers than packing ever costs. |
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.