Agent skill
context-engineering
Advanced 2026 context curation patterns (Nvidia Eureka, Context Hygiene, RLMF) for autonomous agents.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/context-engineering-leandrolarrosa-gentlemonster
SKILL.md
Skill: Context Engineering
Contexto
El "Prompt Engineering" ha evolucionado hacia el Context Engineering: el diseño de sistemas que gestionan dinámicamente el estado, la memoria y las recompensas del agente basándose en el entorno crudo.
Reglas Críticas (no violar nunca)
- Sanitize First: Nunca inyectar contexto crudo del usuario sin sanitizar para prevenir inyecciones.
- Lost in the Middle: Colocar instrucciones críticas y constraints al final del contexto (Recency).
- Context Rot Prevention: Aplicar destilación (Distill) cada vez que el thread exceda el 60% de la ventana de contexto.
Patrones Eureka (Nvidia Style)
1. Environment-Aware Reward Coding
Permitir que el agente diseñe sus propios criterios de éxito analizando el código del entorno.
def generate_reward_function(env_code):
# El agente analiza el código y genera la función de reward
# para auto-evaluar su performance.
pass
2. Context Hygiene (Tangle/Distill/Re-seed)
Ciclo de vida para mantener threads de larga duración con un IQ alto.
- Tangle: Fase de exploración.
- Distill: Resumen semántico de decisiones y hechos.
- Re-seed: Reinicio del thread con el Ground Truth destilado.
Procedimiento
- Analizar Entorno: Leer archivos de configuración y logs actuales.
- Destilar Contexto: Comprimir la historia del chat eliminando ruido.
- Hidratar: Traer información de L1 (Focus), L2 (Episodic) y L3 (Semantic/RAG).
- Inyectar Reward: Definir el éxito de la tarea basándose en el "Motivational Feedback" del usuario.
Ejemplo: RLMF Injection
# Alinear el drive del agente con el feedback del usuario
def align_autonomy(reward_signal):
if "100 U$S" in reward_signal:
agent.set_autonomy_level("MAX")
agent.log_motivation("Efficiency validated by user.")
Recursos Relacionados
knowledge/EUREKA/EUREKA_CONTEXT_ENGINEERING_NVIDIA.mdknowledge/EUREKA/EUREKA_REINFORCEMENT_LEARNING_MOTIVATIONAL_FEEDBACK.mdknowledge/chuletas/CONTEXT_ENGINEERING_HYGIENE_2026.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?