@ngxtm/devkit 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/init.js +23 -7
- package/cli/update.js +21 -6
- package/merged-commands/3d-web-experience.md +254 -0
- package/merged-commands/ab-test-setup.md +232 -0
- package/merged-commands/accessibility-compliance-accessibility-audit.md +42 -0
- package/merged-commands/active-directory-attacks.md +383 -0
- package/merged-commands/address-github-comments.md +55 -0
- package/merged-commands/aesthetic.md +134 -0
- package/merged-commands/agent-evaluation.md +64 -0
- package/merged-commands/agent-framework-azure-hosted-agents.md +332 -0
- package/merged-commands/agent-manager-skill.md +40 -0
- package/merged-commands/agent-memory-mcp.md +82 -0
- package/merged-commands/agent-memory-systems.md +67 -0
- package/merged-commands/agent-orchestration-improve-agent.md +349 -0
- package/merged-commands/agent-orchestration-multi-agent-optimize.md +239 -0
- package/merged-commands/agent-tool-builder.md +53 -0
- package/merged-commands/agile-product-owner.md +31 -0
- package/merged-commands/ai-agents-architect.md +90 -0
- package/merged-commands/ai-artist.md +75 -0
- package/merged-commands/ai-engineer.md +171 -0
- package/merged-commands/ai-multimodal.md +109 -0
- package/merged-commands/ai-product.md +54 -0
- package/merged-commands/ai-wrapper-product.md +273 -0
- package/merged-commands/airflow-dag-patterns.md +41 -0
- package/merged-commands/algolia-search.md +66 -0
- package/merged-commands/algorithmic-art.md +405 -0
- package/merged-commands/analytics-tracking.md +404 -0
- package/merged-commands/angular-architect.md +97 -0
- package/merged-commands/angular-migration.md +428 -0
- package/merged-commands/anti-reversing-techniques.md +42 -0
- package/merged-commands/api-design-principles.md +37 -0
- package/merged-commands/api-designer.md +101 -0
- package/merged-commands/api-documentation-generator.md +484 -0
- package/merged-commands/api-documenter.md +184 -0
- package/merged-commands/api-fuzzing-bug-bounty.md +433 -0
- package/merged-commands/api-patterns.md +81 -0
- package/merged-commands/api-security-best-practices.md +907 -0
- package/merged-commands/api-testing-observability-api-mock.md +46 -0
- package/merged-commands/app-builder.md +75 -0
- package/merged-commands/app-store-optimization.md +403 -0
- package/merged-commands/application-performance-performance-optimization.md +154 -0
- package/merged-commands/architect-review.md +174 -0
- package/merged-commands/architecture-decision-records.md +441 -0
- package/merged-commands/architecture-designer.md +89 -0
- package/merged-commands/architecture-patterns.md +37 -0
- package/merged-commands/architecture.md +55 -0
- package/merged-commands/arm-cortex-expert.md +306 -0
- package/merged-commands/artifacts-builder.md +74 -0
- package/merged-commands/ask-questions-if-underspecified.md +81 -0
- package/merged-commands/async-python-patterns.md +39 -0
- package/merged-commands/atlassian-mcp.md +100 -0
- package/merged-commands/attack-tree-construction.md +38 -0
- package/merged-commands/auth-implementation-patterns.md +39 -0
- package/merged-commands/automate-whatsapp.md +257 -0
- package/merged-commands/autonomous-agent-patterns.md +761 -0
- package/merged-commands/autonomous-agents.md +68 -0
- package/merged-commands/avalonia-layout-zafiro.md +59 -0
- package/merged-commands/avalonia-viewmodels-zafiro.md +29 -0
- package/merged-commands/avalonia-zafiro-development.md +29 -0
- package/merged-commands/aws-agentic-ai.md +117 -0
- package/merged-commands/aws-cdk-development.md +278 -0
- package/merged-commands/aws-cost-operations.md +317 -0
- package/merged-commands/aws-penetration-testing.md +405 -0
- package/merged-commands/aws-serverless-eda.md +757 -0
- package/merged-commands/aws-serverless.md +323 -0
- package/merged-commands/aws-skills.md +22 -0
- package/merged-commands/azd-deployment.md +296 -0
- package/merged-commands/azure-ai-agents-python.md +277 -0
- package/merged-commands/azure-ai-search-python.md +198 -0
- package/merged-commands/azure-ai-voicelive-skill.md +294 -0
- package/merged-commands/azure-functions.md +42 -0
- package/merged-commands/backend-architect.md +333 -0
- package/merged-commands/backend-dev-guidelines.md +342 -0
- package/merged-commands/backend-development-feature-development.md +180 -0
- package/merged-commands/backend-development.md +155 -0
- package/merged-commands/backend-security-coder.md +156 -0
- package/merged-commands/backtesting-frameworks.md +39 -0
- package/merged-commands/bash-defensive-patterns.md +43 -0
- package/merged-commands/bash-linux.md +199 -0
- package/merged-commands/bash-pro.md +310 -0
- package/merged-commands/bats-testing-patterns.md +34 -0
- package/merged-commands/bazel-build-optimization.md +397 -0
- package/merged-commands/beautiful-prose.md +22 -0
- package/merged-commands/behavioral-modes.md +242 -0
- package/merged-commands/best-practices.md +500 -0
- package/merged-commands/better-auth.md +204 -0
- package/merged-commands/billing-automation.md +42 -0
- package/merged-commands/binary-analysis-patterns.md +450 -0
- package/merged-commands/blockchain-developer.md +208 -0
- package/merged-commands/blockrun.md +292 -0
- package/merged-commands/brainstorming.md +230 -0
- package/merged-commands/brand-guidelines-anthropic.md +73 -0
- package/merged-commands/brand-guidelines-community.md +73 -0
- package/merged-commands/brand-guidelines.md +73 -0
- package/merged-commands/broken-authentication.md +476 -0
- package/merged-commands/browser-automation.md +70 -0
- package/merged-commands/browser-extension-builder.md +261 -0
- package/merged-commands/building-ai-agent-on-cloudflare.md +391 -0
- package/merged-commands/building-mcp-server-on-cloudflare.md +265 -0
- package/merged-commands/bullmq-specialist.md +57 -0
- package/merged-commands/bun-development.md +691 -0
- package/merged-commands/burp-suite-testing.md +380 -0
- package/merged-commands/business-analyst.md +182 -0
- package/merged-commands/busybox-on-windows.md +30 -0
- package/merged-commands/c-pro.md +56 -0
- package/merged-commands/c4-architecture-c4-architecture.md +389 -0
- package/merged-commands/c4-code.md +244 -0
- package/merged-commands/c4-component.md +153 -0
- package/merged-commands/c4-container.md +171 -0
- package/merged-commands/c4-context.md +150 -0
- package/merged-commands/canvas-design.md +130 -0
- package/merged-commands/cc-skill-backend-patterns.md +584 -0
- package/merged-commands/cc-skill-clickhouse-io.md +431 -0
- package/merged-commands/cc-skill-coding-standards.md +522 -0
- package/merged-commands/cc-skill-continuous-learning.md +10 -0
- package/merged-commands/cc-skill-frontend-patterns.md +633 -0
- package/merged-commands/cc-skill-project-guidelines-example.md +352 -0
- package/merged-commands/cc-skill-security-review.md +496 -0
- package/merged-commands/cc-skill-strategic-compact.md +10 -0
- package/merged-commands/changelog-automation.md +38 -0
- package/merged-commands/changelog-generator.md +104 -0
- package/merged-commands/chaos-engineer.md +98 -0
- package/merged-commands/chrome-devtools.md +407 -0
- package/merged-commands/cicd-automation-workflow-automate.md +51 -0
- package/merged-commands/clarity-gate.md +22 -0
- package/merged-commands/claude-ally-health.md +22 -0
- package/merged-commands/claude-code-guide.md +68 -0
- package/merged-commands/claude-d3js-skill.md +820 -0
- package/merged-commands/claude-scientific-skills.md +22 -0
- package/merged-commands/claude-speed-reader.md +22 -0
- package/merged-commands/claude-win11-speckit-update-skill.md +22 -0
- package/merged-commands/clean-code.md +201 -0
- package/merged-commands/clerk-auth.md +56 -0
- package/merged-commands/cli-developer.md +97 -0
- package/merged-commands/cloud-architect.md +135 -0
- package/merged-commands/cloud-penetration-testing.md +501 -0
- package/merged-commands/cloudflare-expert.md +227 -0
- package/merged-commands/code-documentation-code-explain.md +46 -0
- package/merged-commands/code-documentation-doc-generate.md +48 -0
- package/merged-commands/code-documentation.md +263 -0
- package/merged-commands/code-documenter.md +95 -0
- package/merged-commands/code-refactoring-context-restore.md +179 -0
- package/merged-commands/code-refactoring-refactor-clean.md +51 -0
- package/merged-commands/code-refactoring-tech-debt.md +386 -0
- package/merged-commands/code-refactoring.md +209 -0
- package/merged-commands/code-review-ai-ai-review.md +450 -0
- package/merged-commands/code-review-checklist.md +444 -0
- package/merged-commands/code-review-excellence.md +40 -0
- package/merged-commands/code-review.md +121 -0
- package/merged-commands/code-reviewer.md +178 -0
- package/merged-commands/codebase-cleanup-deps-audit.md +51 -0
- package/merged-commands/codebase-cleanup-refactor-clean.md +51 -0
- package/merged-commands/codebase-cleanup-tech-debt.md +386 -0
- package/merged-commands/codex-review.md +37 -0
- package/merged-commands/commit.md +171 -0
- package/merged-commands/competitive-ads-extractor.md +293 -0
- package/merged-commands/competitive-landscape.md +34 -0
- package/merged-commands/competitor-alternatives.md +750 -0
- package/merged-commands/comprehensive-review-full-review.md +146 -0
- package/merged-commands/comprehensive-review-pr-enhance.md +46 -0
- package/merged-commands/computer-use-agents.md +315 -0
- package/merged-commands/concise-planning.md +62 -0
- package/merged-commands/conductor-implement.md +388 -0
- package/merged-commands/conductor-manage.md +39 -0
- package/merged-commands/conductor-new-track.md +433 -0
- package/merged-commands/conductor-revert.md +372 -0
- package/merged-commands/conductor-setup.md +426 -0
- package/merged-commands/conductor-status.md +338 -0
- package/merged-commands/conductor-validator.md +62 -0
- package/merged-commands/content-creator.md +248 -0
- package/merged-commands/content-marketer.md +170 -0
- package/merged-commands/content-research-writer.md +538 -0
- package/merged-commands/context-compression.md +266 -0
- package/merged-commands/context-degradation.md +238 -0
- package/merged-commands/context-driven-development.md +400 -0
- package/merged-commands/context-engineering.md +107 -0
- package/merged-commands/context-fundamentals.md +192 -0
- package/merged-commands/context-management-context-restore.md +179 -0
- package/merged-commands/context-management-context-save.md +177 -0
- package/merged-commands/context-manager.md +185 -0
- package/merged-commands/context-optimization.md +186 -0
- package/merged-commands/context-window-management.md +53 -0
- package/merged-commands/context7-auto-research.md +36 -0
- package/merged-commands/conversation-memory.md +61 -0
- package/merged-commands/copy-editing.md +439 -0
- package/merged-commands/copywriting.md +225 -0
- package/merged-commands/core-components.md +264 -0
- package/merged-commands/cosmos-db-python-skill.md +198 -0
- package/merged-commands/cost-optimization.md +286 -0
- package/merged-commands/cpp-pro.md +59 -0
- package/merged-commands/cqrs-implementation.md +35 -0
- package/merged-commands/create-pr.md +192 -0
- package/merged-commands/crewai.md +243 -0
- package/merged-commands/csharp-developer.md +94 -0
- package/merged-commands/csharp-pro.md +59 -0
- package/merged-commands/culture-index.md +43 -0
- package/merged-commands/customer-support.md +170 -0
- package/merged-commands/daily-news-report.md +356 -0
- package/merged-commands/data-engineer.md +224 -0
- package/merged-commands/data-engineering-data-driven-feature.md +182 -0
- package/merged-commands/data-engineering-data-pipeline.md +201 -0
- package/merged-commands/data-quality-frameworks.md +40 -0
- package/merged-commands/data-scientist.md +199 -0
- package/merged-commands/data-storytelling.md +465 -0
- package/merged-commands/database-admin.md +165 -0
- package/merged-commands/database-architect.md +268 -0
- package/merged-commands/database-cloud-optimization-cost-optimize.md +44 -0
- package/merged-commands/database-design.md +52 -0
- package/merged-commands/database-migration.md +436 -0
- package/merged-commands/database-migrations-migration-observability.md +420 -0
- package/merged-commands/database-migrations-sql-migrations.md +53 -0
- package/merged-commands/database-optimizer.md +167 -0
- package/merged-commands/databases.md +232 -0
- package/merged-commands/dbt-transformation-patterns.md +34 -0
- package/merged-commands/debugger.md +49 -0
- package/merged-commands/debugging-strategies.md +34 -0
- package/merged-commands/debugging-toolkit-smart-debug.md +197 -0
- package/merged-commands/debugging-wizard.md +93 -0
- package/merged-commands/debugging.md +84 -0
- package/merged-commands/deep-research.md +114 -0
- package/merged-commands/defi-protocol-templates.md +466 -0
- package/merged-commands/dependency-management-deps-audit.md +44 -0
- package/merged-commands/dependency-upgrade.md +421 -0
- package/merged-commands/deployment-engineer.md +170 -0
- package/merged-commands/deployment-pipeline-design.md +371 -0
- package/merged-commands/deployment-procedures.md +241 -0
- package/merged-commands/deployment-validation-config-validate.md +496 -0
- package/merged-commands/design-md.md +178 -0
- package/merged-commands/design-orchestration.md +167 -0
- package/merged-commands/developer-growth-analysis.md +322 -0
- package/merged-commands/devops-engineer.md +92 -0
- package/merged-commands/devops-troubleshooter.md +161 -0
- package/merged-commands/devops.md +285 -0
- package/merged-commands/discord-bot-architect.md +277 -0
- package/merged-commands/dispatching-parallel-agents.md +180 -0
- package/merged-commands/distributed-debugging-debug-trace.md +44 -0
- package/merged-commands/distributed-tracing.md +450 -0
- package/merged-commands/django-expert.md +89 -0
- package/merged-commands/django-pro.md +180 -0
- package/merged-commands/doc-coauthoring.md +375 -0
- package/merged-commands/docker-expert.md +409 -0
- package/merged-commands/docs-architect.md +98 -0
- package/merged-commands/docs-seeker.md +102 -0
- package/merged-commands/documentation-generation-doc-generate.md +48 -0
- package/merged-commands/documentation-templates.md +194 -0
- package/merged-commands/docx-official.md +197 -0
- package/merged-commands/docx.md +197 -0
- package/merged-commands/domain-name-brainstormer.md +212 -0
- package/merged-commands/dotnet-architect.md +197 -0
- package/merged-commands/dotnet-backend-patterns.md +37 -0
- package/merged-commands/dotnet-core-expert.md +96 -0
- package/merged-commands/dx-optimizer.md +83 -0
- package/merged-commands/e2e-testing-patterns.md +41 -0
- package/merged-commands/elixir-pro.md +59 -0
- package/merged-commands/email-sequence.md +925 -0
- package/merged-commands/email-systems.md +54 -0
- package/merged-commands/embedded-systems.md +98 -0
- package/merged-commands/embedding-strategies.md +491 -0
- package/merged-commands/employment-contract-templates.md +39 -0
- package/merged-commands/environment-setup-guide.md +479 -0
- package/merged-commands/error-debugging-error-analysis.md +47 -0
- package/merged-commands/error-debugging-error-trace.md +43 -0
- package/merged-commands/error-debugging-multi-agent-review.md +216 -0
- package/merged-commands/error-detective.md +53 -0
- package/merged-commands/error-diagnostics-error-analysis.md +47 -0
- package/merged-commands/error-diagnostics-error-trace.md +48 -0
- package/merged-commands/error-diagnostics-smart-debug.md +197 -0
- package/merged-commands/error-handling-patterns.md +35 -0
- package/merged-commands/ethical-hacking-methodology.md +466 -0
- package/merged-commands/evaluation.md +238 -0
- package/merged-commands/event-sourcing-architect.md +58 -0
- package/merged-commands/event-store-design.md +449 -0
- package/merged-commands/exa-search.md +36 -0
- package/merged-commands/executing-plans.md +76 -0
- package/merged-commands/expo-app-design.md +22 -0
- package/merged-commands/expo-deployment.md +72 -0
- package/merged-commands/fal-audio.md +22 -0
- package/merged-commands/fal-generate.md +22 -0
- package/merged-commands/fal-image-edit.md +22 -0
- package/merged-commands/fal-platform.md +22 -0
- package/merged-commands/fal-upscale.md +22 -0
- package/merged-commands/fal-workflow.md +22 -0
- package/merged-commands/fastapi-expert.md +93 -0
- package/merged-commands/fastapi-pro.md +192 -0
- package/merged-commands/fastapi-router.md +52 -0
- package/merged-commands/fastapi-templates.md +32 -0
- package/merged-commands/feature-forge.md +90 -0
- package/merged-commands/ffuf-claude-skill.md +22 -0
- package/merged-commands/file-organizer.md +250 -0
- package/merged-commands/file-path-traversal.md +486 -0
- package/merged-commands/file-uploads.md +22 -0
- package/merged-commands/find-bugs.md +86 -0
- package/merged-commands/fine-tuning-expert.md +98 -0
- package/merged-commands/finishing-a-development-branch.md +200 -0
- package/merged-commands/firebase.md +56 -0
- package/merged-commands/firecrawl-scraper.md +37 -0
- package/merged-commands/firmware-analyst.md +320 -0
- package/merged-commands/fix-review.md +53 -0
- package/merged-commands/fixing.md +72 -0
- package/merged-commands/flutter-expert.md +200 -0
- package/merged-commands/form-cro.md +441 -0
- package/merged-commands/foundry-iq-agent.md +15 -0
- package/merged-commands/foundry-iq-python.md +275 -0
- package/merged-commands/foundry-nextgen-frontend.md +555 -0
- package/merged-commands/foundry-sdk-python.md +290 -0
- package/merged-commands/fp-ts-errors.md +856 -0
- package/merged-commands/fp-ts-pragmatic.md +598 -0
- package/merged-commands/fp-ts-react.md +796 -0
- package/merged-commands/framework-migration-code-migrate.md +48 -0
- package/merged-commands/framework-migration-deps-upgrade.md +48 -0
- package/merged-commands/framework-migration-legacy-modernize.md +132 -0
- package/merged-commands/free-tool-strategy.md +576 -0
- package/merged-commands/frontend-design.md +272 -0
- package/merged-commands/frontend-dev-guidelines.md +359 -0
- package/merged-commands/frontend-developer.md +171 -0
- package/merged-commands/frontend-development.md +399 -0
- package/merged-commands/frontend-mobile-development-component-scaffold.md +403 -0
- package/merged-commands/frontend-mobile-security-xss-scan.md +322 -0
- package/merged-commands/frontend-security-coder.md +170 -0
- package/merged-commands/frontend-slides.md +770 -0
- package/merged-commands/full-stack-orchestration-full-stack-feature.md +135 -0
- package/merged-commands/fullstack-guardian.md +99 -0
- package/merged-commands/game-developer.md +94 -0
- package/merged-commands/game-development.md +167 -0
- package/merged-commands/gcp-cloud-run.md +288 -0
- package/merged-commands/gdpr-data-handling.md +33 -0
- package/merged-commands/geo-fundamentals.md +156 -0
- package/merged-commands/git-advanced-workflows.md +412 -0
- package/merged-commands/git-pr-workflows-git-workflow.md +140 -0
- package/merged-commands/git-pr-workflows-onboard.md +416 -0
- package/merged-commands/git-pr-workflows-pr-enhance.md +48 -0
- package/merged-commands/git-pushing.md +33 -0
- package/merged-commands/github-actions-templates.md +345 -0
- package/merged-commands/github-workflow-automation.md +846 -0
- package/merged-commands/gitlab-ci-patterns.md +283 -0
- package/merged-commands/gitops-workflow.md +303 -0
- package/merged-commands/go-concurrency-patterns.md +33 -0
- package/merged-commands/godot-gdscript-patterns.md +33 -0
- package/merged-commands/golang-pro.md +179 -0
- package/merged-commands/google-adk-python.md +243 -0
- package/merged-commands/grafana-dashboards.md +381 -0
- package/merged-commands/graphql-architect.md +182 -0
- package/merged-commands/graphql.md +68 -0
- package/merged-commands/haskell-pro.md +56 -0
- package/merged-commands/helm-chart-scaffolding.md +34 -0
- package/merged-commands/hr-pro.md +126 -0
- package/merged-commands/html-injection-testing.md +498 -0
- package/merged-commands/hubspot-integration.md +42 -0
- package/merged-commands/hugging-face-cli.md +198 -0
- package/merged-commands/hugging-face-jobs.md +1038 -0
- package/merged-commands/hybrid-cloud-architect.md +168 -0
- package/merged-commands/hybrid-cloud-networking.md +238 -0
- package/merged-commands/hybrid-search-implementation.md +32 -0
- package/merged-commands/i18n-localization.md +154 -0
- package/merged-commands/idor-testing.md +442 -0
- package/merged-commands/image-enhancer.md +99 -0
- package/merged-commands/imagen.md +77 -0
- package/merged-commands/incident-responder.md +213 -0
- package/merged-commands/incident-response-incident-response.md +168 -0
- package/merged-commands/incident-response-smart-fix.md +29 -0
- package/merged-commands/incident-runbook-templates.md +395 -0
- package/merged-commands/infinite-gratitude.md +26 -0
- package/merged-commands/inngest.md +55 -0
- package/merged-commands/interactive-portfolio.md +223 -0
- package/merged-commands/internal-comms-anthropic.md +32 -0
- package/merged-commands/internal-comms-community.md +32 -0
- package/merged-commands/internal-comms.md +32 -0
- package/merged-commands/invoice-organizer.md +446 -0
- package/merged-commands/ios-developer.md +219 -0
- package/merged-commands/issue-creator.md +137 -0
- package/merged-commands/istio-traffic-management.md +337 -0
- package/merged-commands/iterate-pr.md +150 -0
- package/merged-commands/java-architect.md +95 -0
- package/merged-commands/java-pro.md +177 -0
- package/merged-commands/javascript-mastery.md +645 -0
- package/merged-commands/javascript-pro.md +57 -0
- package/merged-commands/javascript-testing-patterns.md +35 -0
- package/merged-commands/javascript-typescript-typescript-scaffold.md +361 -0
- package/merged-commands/javascript-typescript.md +142 -0
- package/merged-commands/jira-issues.md +181 -0
- package/merged-commands/job-application.md +90 -0
- package/merged-commands/julia-pro.md +209 -0
- package/merged-commands/k8s-manifest-generator.md +35 -0
- package/merged-commands/k8s-security-policies.md +346 -0
- package/merged-commands/kaizen.md +730 -0
- package/merged-commands/kotlin-specialist.md +94 -0
- package/merged-commands/kpi-dashboard-design.md +440 -0
- package/merged-commands/kubernetes-architect.md +170 -0
- package/merged-commands/kubernetes-specialist.md +117 -0
- package/merged-commands/langchain-architecture.md +350 -0
- package/merged-commands/langfuse.md +238 -0
- package/merged-commands/langgraph.md +287 -0
- package/merged-commands/laravel-specialist.md +101 -0
- package/merged-commands/last30days.md +421 -0
- package/merged-commands/launch-strategy.md +344 -0
- package/merged-commands/lead-research-assistant.md +199 -0
- package/merged-commands/learn.md +476 -0
- package/merged-commands/legacy-modernizer.md +53 -0
- package/merged-commands/legal-advisor.md +70 -0
- package/merged-commands/linear-claude-skill.md +543 -0
- package/merged-commands/linkerd-patterns.md +321 -0
- package/merged-commands/lint-and-validate.md +45 -0
- package/merged-commands/linux-privilege-escalation.md +504 -0
- package/merged-commands/linux-shell-scripting.md +504 -0
- package/merged-commands/llm-app-patterns.md +760 -0
- package/merged-commands/llm-application-dev-ai-assistant.md +35 -0
- package/merged-commands/llm-application-dev-langchain-agent.md +246 -0
- package/merged-commands/llm-application-dev-prompt-optimize.md +37 -0
- package/merged-commands/llm-application-dev.md +216 -0
- package/merged-commands/llm-evaluation.md +483 -0
- package/merged-commands/loki-mode.md +721 -0
- package/merged-commands/machine-learning-ops-ml-pipeline.md +314 -0
- package/merged-commands/makepad-skills.md +22 -0
- package/merged-commands/malware-analyst.md +247 -0
- package/merged-commands/markdown-novel-viewer.md +281 -0
- package/merged-commands/market-sizing-analysis.md +425 -0
- package/merged-commands/marketing-ideas.md +221 -0
- package/merged-commands/marketing-psychology.md +255 -0
- package/merged-commands/mcp-builder.md +236 -0
- package/merged-commands/mcp-developer.md +94 -0
- package/merged-commands/mcp-management.md +209 -0
- package/merged-commands/media-processing.md +358 -0
- package/merged-commands/meeting-insights-analyzer.md +327 -0
- package/merged-commands/memory-forensics.md +491 -0
- package/merged-commands/memory-safety-patterns.md +33 -0
- package/merged-commands/memory-systems.md +228 -0
- package/merged-commands/mermaid-expert.md +59 -0
- package/merged-commands/mermaidjs-v11.md +115 -0
- package/merged-commands/metasploit-framework.md +478 -0
- package/merged-commands/micro-saas-launcher.md +212 -0
- package/merged-commands/microservices-architect.md +102 -0
- package/merged-commands/microservices-patterns.md +35 -0
- package/merged-commands/minecraft-bukkit-pro.md +126 -0
- package/merged-commands/ml-engineer.md +168 -0
- package/merged-commands/ml-pipeline-workflow.md +257 -0
- package/merged-commands/ml-pipeline.md +111 -0
- package/merged-commands/mlops-engineer.md +219 -0
- package/merged-commands/mobile-design.md +284 -0
- package/merged-commands/mobile-developer.md +205 -0
- package/merged-commands/mobile-development.md +212 -0
- package/merged-commands/mobile-security-coder.md +184 -0
- package/merged-commands/modern-javascript-patterns.md +35 -0
- package/merged-commands/monitoring-expert.md +92 -0
- package/merged-commands/monorepo-architect.md +61 -0
- package/merged-commands/monorepo-management.md +35 -0
- package/merged-commands/moodle-external-api-development.md +597 -0
- package/merged-commands/mtls-configuration.md +359 -0
- package/merged-commands/multi-agent-brainstorming.md +256 -0
- package/merged-commands/multi-agent-patterns.md +262 -0
- package/merged-commands/multi-cloud-architecture.md +189 -0
- package/merged-commands/multi-platform-apps-multi-platform.md +203 -0
- package/merged-commands/n8n-code-python.md +750 -0
- package/merged-commands/n8n-mcp-tools-expert.md +654 -0
- package/merged-commands/n8n-node-configuration.md +796 -0
- package/merged-commands/nanobanana-ppt-skills.md +22 -0
- package/merged-commands/neon-postgres.md +56 -0
- package/merged-commands/nestjs-expert.md +552 -0
- package/merged-commands/network-101.md +342 -0
- package/merged-commands/network-engineer.md +169 -0
- package/merged-commands/nextjs-app-router-patterns.md +33 -0
- package/merged-commands/nextjs-best-practices.md +203 -0
- package/merged-commands/nextjs-developer.md +97 -0
- package/merged-commands/nextjs-supabase-auth.md +56 -0
- package/merged-commands/nft-standards.md +395 -0
- package/merged-commands/nodejs-backend-patterns.md +35 -0
- package/merged-commands/nodejs-best-practices.md +333 -0
- package/merged-commands/nosql-expert.md +111 -0
- package/merged-commands/notebooklm-skill.md +269 -0
- package/merged-commands/notebooklm.md +269 -0
- package/merged-commands/notion-template-business.md +216 -0
- package/merged-commands/nx-workspace-patterns.md +464 -0
- package/merged-commands/observability-engineer.md +237 -0
- package/merged-commands/observability-monitoring-monitor-setup.md +48 -0
- package/merged-commands/observability-monitoring-slo-implement.md +43 -0
- package/merged-commands/observe-whatsapp.md +109 -0
- package/merged-commands/obsidian-clipper-template-creator.md +64 -0
- package/merged-commands/on-call-handoff-patterns.md +453 -0
- package/merged-commands/onboarding-cro.md +433 -0
- package/merged-commands/openapi-spec-generation.md +33 -0
- package/merged-commands/page-cro.md +343 -0
- package/merged-commands/paid-ads.md +551 -0
- package/merged-commands/pandas-pro.md +96 -0
- package/merged-commands/parallel-agents.md +175 -0
- package/merged-commands/payment-integration.md +77 -0
- package/merged-commands/paypal-integration.md +479 -0
- package/merged-commands/paywall-upgrade-cro.md +570 -0
- package/merged-commands/pci-compliance.md +478 -0
- package/merged-commands/pdf-official.md +294 -0
- package/merged-commands/pdf.md +294 -0
- package/merged-commands/pentest-checklist.md +334 -0
- package/merged-commands/pentest-commands.md +438 -0
- package/merged-commands/performance-engineer.md +180 -0
- package/merged-commands/performance-profiling.md +143 -0
- package/merged-commands/performance-testing-review-ai-review.md +450 -0
- package/merged-commands/performance-testing-review-multi-agent-review.md +216 -0
- package/merged-commands/personal-tool-builder.md +289 -0
- package/merged-commands/php-pro.md +63 -0
- package/merged-commands/plaid-fintech.md +50 -0
- package/merged-commands/plan-writing.md +152 -0
- package/merged-commands/planning-with-files.md +211 -0
- package/merged-commands/planning.md +95 -0
- package/merged-commands/plans-kanban.md +166 -0
- package/merged-commands/playwright-expert.md +87 -0
- package/merged-commands/playwright-skill.md +453 -0
- package/merged-commands/podcast-generation.md +121 -0
- package/merged-commands/popup-cro.md +346 -0
- package/merged-commands/posix-shell-pro.md +304 -0
- package/merged-commands/postgres-best-practices.md +57 -0
- package/merged-commands/postgres-pro.md +98 -0
- package/merged-commands/postgresql.md +230 -0
- package/merged-commands/postmortem-writing.md +386 -0
- package/merged-commands/powershell-windows.md +167 -0
- package/merged-commands/pptx-official.md +484 -0
- package/merged-commands/pptx.md +484 -0
- package/merged-commands/pricing-strategy.md +356 -0
- package/merged-commands/prisma-expert.md +355 -0
- package/merged-commands/privilege-escalation-methods.md +333 -0
- package/merged-commands/problem-solving.md +96 -0
- package/merged-commands/product-manager-toolkit.md +351 -0
- package/merged-commands/product-strategist.md +26 -0
- package/merged-commands/production-code-audit.md +540 -0
- package/merged-commands/programmatic-seo.md +351 -0
- package/merged-commands/projection-patterns.md +33 -0
- package/merged-commands/prometheus-configuration.md +404 -0
- package/merged-commands/prompt-caching.md +61 -0
- package/merged-commands/prompt-engineer.md +272 -0
- package/merged-commands/prompt-engineering-patterns.md +213 -0
- package/merged-commands/prompt-engineering.md +171 -0
- package/merged-commands/prompt-library.md +322 -0
- package/merged-commands/protocol-reverse-engineering.md +29 -0
- package/merged-commands/pydantic-models.md +58 -0
- package/merged-commands/pypict-skill.md +22 -0
- package/merged-commands/python-development-python-scaffold.md +331 -0
- package/merged-commands/python-development.md +139 -0
- package/merged-commands/python-packaging.md +36 -0
- package/merged-commands/python-patterns.md +441 -0
- package/merged-commands/python-performance-optimization.md +36 -0
- package/merged-commands/python-pro.md +158 -0
- package/merged-commands/python-testing-patterns.md +37 -0
- package/merged-commands/qa-regression.md +337 -0
- package/merged-commands/quant-analyst.md +53 -0
- package/merged-commands/radix-ui-design-system.md +847 -0
- package/merged-commands/raffle-winner-picker.md +159 -0
- package/merged-commands/rag-architect.md +100 -0
- package/merged-commands/rag-engineer.md +90 -0
- package/merged-commands/rag-implementation.md +421 -0
- package/merged-commands/rails-expert.md +97 -0
- package/merged-commands/react-best-practices.md +121 -0
- package/merged-commands/react-expert.md +98 -0
- package/merged-commands/react-flow-node.md +66 -0
- package/merged-commands/react-modernization.md +34 -0
- package/merged-commands/react-native-architecture.md +33 -0
- package/merged-commands/react-native-expert.md +88 -0
- package/merged-commands/react-patterns.md +198 -0
- package/merged-commands/react-state-management.md +441 -0
- package/merged-commands/react-ui-patterns.md +289 -0
- package/merged-commands/readme.md +775 -0
- package/merged-commands/receiving-code-review.md +213 -0
- package/merged-commands/red-team-tactics.md +199 -0
- package/merged-commands/red-team-tools.md +310 -0
- package/merged-commands/reference-builder.md +188 -0
- package/merged-commands/referral-program.md +602 -0
- package/merged-commands/remotion-best-practices.md +45 -0
- package/merged-commands/repomix.md +275 -0
- package/merged-commands/requesting-code-review.md +105 -0
- package/merged-commands/research-engineer.md +135 -0
- package/merged-commands/research.md +191 -0
- package/merged-commands/reverse-engineer.md +173 -0
- package/merged-commands/risk-manager.md +61 -0
- package/merged-commands/risk-metrics-calculation.md +33 -0
- package/merged-commands/ruby-pro.md +56 -0
- package/merged-commands/rust-async-patterns.md +33 -0
- package/merged-commands/rust-engineer.md +96 -0
- package/merged-commands/rust-pro.md +178 -0
- package/merged-commands/saga-orchestration.md +496 -0
- package/merged-commands/sales-automator.md +55 -0
- package/merged-commands/salesforce-developer.md +105 -0
- package/merged-commands/salesforce-development.md +51 -0
- package/merged-commands/sast-configuration.md +212 -0
- package/merged-commands/scala-pro.md +82 -0
- package/merged-commands/scanning-tools.md +589 -0
- package/merged-commands/schema-markup.md +360 -0
- package/merged-commands/screen-reader-testing.md +33 -0
- package/merged-commands/screenshots.md +401 -0
- package/merged-commands/scroll-experience.md +263 -0
- package/merged-commands/search-specialist.md +80 -0
- package/merged-commands/secrets-management.md +364 -0
- package/merged-commands/secure-code-guardian.md +93 -0
- package/merged-commands/security-auditor.md +169 -0
- package/merged-commands/security-bluebook-builder.md +22 -0
- package/merged-commands/security-compliance-compliance-check.md +55 -0
- package/merged-commands/security-requirement-extraction.md +33 -0
- package/merged-commands/security-reviewer.md +94 -0
- package/merged-commands/security-scanning-security-dependencies.md +43 -0
- package/merged-commands/security-scanning-security-hardening.md +147 -0
- package/merged-commands/security-scanning-security-sast.md +495 -0
- package/merged-commands/segment-cdp.md +50 -0
- package/merged-commands/senior-architect.md +209 -0
- package/merged-commands/senior-backend.md +209 -0
- package/merged-commands/senior-computer-vision.md +226 -0
- package/merged-commands/senior-data-engineer.md +226 -0
- package/merged-commands/senior-data-scientist.md +226 -0
- package/merged-commands/senior-devops.md +209 -0
- package/merged-commands/senior-frontend.md +209 -0
- package/merged-commands/senior-fullstack.md +209 -0
- package/merged-commands/senior-ml-engineer.md +226 -0
- package/merged-commands/senior-prompt-engineer.md +226 -0
- package/merged-commands/senior-qa.md +209 -0
- package/merged-commands/senior-secops.md +209 -0
- package/merged-commands/senior-security.md +209 -0
- package/merged-commands/seo-audit.md +487 -0
- package/merged-commands/seo-authority-builder.md +136 -0
- package/merged-commands/seo-cannibalization-detector.md +123 -0
- package/merged-commands/seo-content-auditor.md +83 -0
- package/merged-commands/seo-content-planner.md +108 -0
- package/merged-commands/seo-content-refresher.md +118 -0
- package/merged-commands/seo-content-writer.md +96 -0
- package/merged-commands/seo-fundamentals.md +173 -0
- package/merged-commands/seo-keyword-strategist.md +95 -0
- package/merged-commands/seo-meta-optimizer.md +92 -0
- package/merged-commands/seo-snippet-hunter.md +114 -0
- package/merged-commands/seo-structure-architect.md +108 -0
- package/merged-commands/sequential-thinking.md +94 -0
- package/merged-commands/server-management.md +161 -0
- package/merged-commands/service-mesh-expert.md +58 -0
- package/merged-commands/service-mesh-observability.md +395 -0
- package/merged-commands/sharp-edges.md +70 -0
- package/merged-commands/shellcheck-configuration.md +466 -0
- package/merged-commands/shodan-reconnaissance.md +503 -0
- package/merged-commands/shopify-apps.md +42 -0
- package/merged-commands/shopify-development.md +366 -0
- package/merged-commands/shopify-expert.md +102 -0
- package/merged-commands/signup-flow-cro.md +355 -0
- package/merged-commands/similarity-search-patterns.md +33 -0
- package/merged-commands/skill-creator.md +356 -0
- package/merged-commands/skill-developer.md +426 -0
- package/merged-commands/skill-rails-upgrade.md +408 -0
- package/merged-commands/skill-seekers.md +22 -0
- package/merged-commands/skill-share.md +80 -0
- package/merged-commands/slack-bot-builder.md +264 -0
- package/merged-commands/slack-gif-creator.md +254 -0
- package/merged-commands/slo-implementation.md +341 -0
- package/merged-commands/smtp-penetration-testing.md +500 -0
- package/merged-commands/social-content.md +807 -0
- package/merged-commands/software-architecture.md +75 -0
- package/merged-commands/solidity-security.md +34 -0
- package/merged-commands/spark-engineer.md +100 -0
- package/merged-commands/spark-optimization.md +427 -0
- package/merged-commands/spec-miner.md +88 -0
- package/merged-commands/spring-boot-engineer.md +104 -0
- package/merged-commands/sql-injection-testing.md +448 -0
- package/merged-commands/sql-optimization-patterns.md +35 -0
- package/merged-commands/sql-pro.md +173 -0
- package/merged-commands/sqlmap-database-pentesting.md +400 -0
- package/merged-commands/sre-engineer.md +98 -0
- package/merged-commands/ssh-penetration-testing.md +488 -0
- package/merged-commands/startup-analyst.md +328 -0
- package/merged-commands/startup-business-analyst-business-case.md +487 -0
- package/merged-commands/startup-business-analyst-financial-projections.md +353 -0
- package/merged-commands/startup-business-analyst-market-opportunity.md +240 -0
- package/merged-commands/startup-financial-modeling.md +467 -0
- package/merged-commands/startup-metrics-framework.md +34 -0
- package/merged-commands/stitch-ui-design.md +378 -0
- package/merged-commands/stride-analysis-patterns.md +33 -0
- package/merged-commands/stripe-integration.md +454 -0
- package/merged-commands/subagent-driven-development.md +240 -0
- package/merged-commands/superpowers-lab.md +22 -0
- package/merged-commands/swift-expert.md +94 -0
- package/merged-commands/swiftui-expert-skill.md +275 -0
- package/merged-commands/systematic-debugging.md +296 -0
- package/merged-commands/systems-programming-rust-project.md +440 -0
- package/merged-commands/tailwind-design-system.md +33 -0
- package/merged-commands/tailwind-patterns.md +269 -0
- package/merged-commands/tavily-web.md +36 -0
- package/merged-commands/tdd-orchestrator.md +205 -0
- package/merged-commands/tdd-workflow.md +149 -0
- package/merged-commands/tdd-workflows-tdd-cycle.md +221 -0
- package/merged-commands/tdd-workflows-tdd-green.md +73 -0
- package/merged-commands/tdd-workflows-tdd-red.md +164 -0
- package/merged-commands/tdd-workflows-tdd-refactor.md +187 -0
- package/merged-commands/team-collaboration-issue.md +37 -0
- package/merged-commands/team-collaboration-standup-notes.md +44 -0
- package/merged-commands/team-composition-analysis.md +413 -0
- package/merged-commands/telegram-bot-builder.md +254 -0
- package/merged-commands/telegram-mini-app.md +279 -0
- package/merged-commands/template-skill.md +6 -0
- package/merged-commands/temporal-python-pro.md +370 -0
- package/merged-commands/temporal-python-testing.md +170 -0
- package/merged-commands/terraform-engineer.md +97 -0
- package/merged-commands/terraform-module-library.md +261 -0
- package/merged-commands/terraform-skill.md +517 -0
- package/merged-commands/terraform-specialist.md +166 -0
- package/merged-commands/test-automator.md +224 -0
- package/merged-commands/test-driven-development.md +371 -0
- package/merged-commands/test-fixing.md +119 -0
- package/merged-commands/test-master.md +104 -0
- package/merged-commands/testing-patterns.md +259 -0
- package/merged-commands/theme-factory.md +59 -0
- package/merged-commands/threat-mitigation-mapping.md +33 -0
- package/merged-commands/threat-modeling-expert.md +60 -0
- package/merged-commands/threejs-skills.md +22 -0
- package/merged-commands/threejs.md +89 -0
- package/merged-commands/tool-design.md +318 -0
- package/merged-commands/top-web-vulnerabilities.md +543 -0
- package/merged-commands/track-management.md +38 -0
- package/merged-commands/trigger-dev.md +67 -0
- package/merged-commands/turborepo-caching.md +419 -0
- package/merged-commands/tutorial-engineer.md +139 -0
- package/merged-commands/twilio-communications.md +295 -0
- package/merged-commands/typescript-advanced-types.md +35 -0
- package/merged-commands/typescript-expert.md +429 -0
- package/merged-commands/typescript-pro.md +55 -0
- package/merged-commands/ui-design-system.md +32 -0
- package/merged-commands/ui-skills.md +22 -0
- package/merged-commands/ui-styling.md +321 -0
- package/merged-commands/ui-ux-designer.md +209 -0
- package/merged-commands/ui-ux-pro-max.md +351 -0
- package/merged-commands/ui-visual-validator.md +214 -0
- package/merged-commands/unit-testing-test-generate.md +319 -0
- package/merged-commands/unity-developer.md +230 -0
- package/merged-commands/unity-ecs-patterns.md +33 -0
- package/merged-commands/unreal-engine-cpp-pro.md +114 -0
- package/merged-commands/upgrading-expo.md +118 -0
- package/merged-commands/upstash-qstash.md +68 -0
- package/merged-commands/using-git-worktrees.md +217 -0
- package/merged-commands/using-neon.md +84 -0
- package/merged-commands/using-superpowers.md +87 -0
- package/merged-commands/uv-package-manager.md +37 -0
- package/merged-commands/ux-researcher-designer.md +30 -0
- package/merged-commands/varlock-claude-skill.md +22 -0
- package/merged-commands/vector-database-engineer.md +60 -0
- package/merged-commands/vector-index-tuning.md +42 -0
- package/merged-commands/vercel-deploy-claimable.md +120 -0
- package/merged-commands/vercel-deploy.md +22 -0
- package/merged-commands/vercel-deployment.md +79 -0
- package/merged-commands/verification-before-completion.md +139 -0
- package/merged-commands/vexor.md +22 -0
- package/merged-commands/video-downloader.md +106 -0
- package/merged-commands/viral-generator-builder.md +199 -0
- package/merged-commands/voice-agents.md +68 -0
- package/merged-commands/voice-ai-development.md +302 -0
- package/merged-commands/voice-ai-engine-development.md +721 -0
- package/merged-commands/vue-expert-js.md +91 -0
- package/merged-commands/vue-expert.md +374 -0
- package/merged-commands/vulnerability-scanner.md +276 -0
- package/merged-commands/wcag-audit-patterns.md +41 -0
- package/merged-commands/web-artifacts-builder.md +74 -0
- package/merged-commands/web-design-guidelines.md +36 -0
- package/merged-commands/web-frameworks.md +324 -0
- package/merged-commands/web-performance-optimization.md +646 -0
- package/merged-commands/web3-testing.md +427 -0
- package/merged-commands/webapp-testing.md +96 -0
- package/merged-commands/websocket-engineer.md +96 -0
- package/merged-commands/windows-privilege-escalation.md +496 -0
- package/merged-commands/wireshark-analysis.md +497 -0
- package/merged-commands/wordpress-penetration-testing.md +485 -0
- package/merged-commands/wordpress-pro.md +105 -0
- package/merged-commands/workflow-automation.md +68 -0
- package/merged-commands/workflow-orchestration-patterns.md +333 -0
- package/merged-commands/workflow-patterns.md +38 -0
- package/merged-commands/writing-plans.md +116 -0
- package/merged-commands/writing-skills.md +125 -0
- package/merged-commands/x-article-publisher-skill.md +22 -0
- package/merged-commands/xlsx-official.md +289 -0
- package/merged-commands/xlsx.md +289 -0
- package/merged-commands/xss-html-injection.md +499 -0
- package/merged-commands/youtube-transcript.md +415 -0
- package/merged-commands/zapier-make-patterns.md +67 -0
- package/merged-commands/zustand-store.md +68 -0
- package/package.json +1 -1
- package/scripts/merge-commands.js +21 -0
- package/templates/base/rules/auto-skill.md +131 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-compression
|
|
3
|
+
description: "Design and evaluate compression strategies for long-running sessions"
|
|
4
|
+
source: "https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/skills/context-compression"
|
|
5
|
+
risk: safe
|
|
6
|
+
---
|
|
7
|
+
# Context Compression Strategies
|
|
8
|
+
|
|
9
|
+
When agent sessions generate millions of tokens of conversation history, compression becomes mandatory. The naive approach is aggressive compression to minimize tokens per request. The correct optimization target is tokens per task: total tokens consumed to complete a task, including re-fetching costs when compression loses critical information.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
Activate this skill when:
|
|
14
|
+
- Agent sessions exceed context window limits
|
|
15
|
+
- Codebases exceed context windows (5M+ token systems)
|
|
16
|
+
- Designing conversation summarization strategies
|
|
17
|
+
- Debugging cases where agents "forget" what files they modified
|
|
18
|
+
- Building evaluation frameworks for compression quality
|
|
19
|
+
|
|
20
|
+
## Core Concepts
|
|
21
|
+
|
|
22
|
+
Context compression trades token savings against information loss. Three production-ready approaches exist:
|
|
23
|
+
|
|
24
|
+
1. **Anchored Iterative Summarization**: Maintain structured, persistent summaries with explicit sections for session intent, file modifications, decisions, and next steps. When compression triggers, summarize only the newly-truncated span and merge with the existing summary. Structure forces preservation by dedicating sections to specific information types.
|
|
25
|
+
|
|
26
|
+
2. **Opaque Compression**: Produce compressed representations optimized for reconstruction fidelity. Achieves highest compression ratios (99%+) but sacrifices interpretability. Cannot verify what was preserved.
|
|
27
|
+
|
|
28
|
+
3. **Regenerative Full Summary**: Generate detailed structured summaries on each compression. Produces readable output but may lose details across repeated compression cycles due to full regeneration rather than incremental merging.
|
|
29
|
+
|
|
30
|
+
The critical insight: structure forces preservation. Dedicated sections act as checklists that the summarizer must populate, preventing silent information drift.
|
|
31
|
+
|
|
32
|
+
## Detailed Topics
|
|
33
|
+
|
|
34
|
+
### Why Tokens-Per-Task Matters
|
|
35
|
+
|
|
36
|
+
Traditional compression metrics target tokens-per-request. This is the wrong optimization. When compression loses critical details like file paths or error messages, the agent must re-fetch information, re-explore approaches, and waste tokens recovering context.
|
|
37
|
+
|
|
38
|
+
The right metric is tokens-per-task: total tokens consumed from task start to completion. A compression strategy saving 0.5% more tokens but causing 20% more re-fetching costs more overall.
|
|
39
|
+
|
|
40
|
+
### The Artifact Trail Problem
|
|
41
|
+
|
|
42
|
+
Artifact trail integrity is the weakest dimension across all compression methods, scoring 2.2-2.5 out of 5.0 in evaluations. Even structured summarization with explicit file sections struggles to maintain complete file tracking across long sessions.
|
|
43
|
+
|
|
44
|
+
Coding agents need to know:
|
|
45
|
+
- Which files were created
|
|
46
|
+
- Which files were modified and what changed
|
|
47
|
+
- Which files were read but not changed
|
|
48
|
+
- Function names, variable names, error messages
|
|
49
|
+
|
|
50
|
+
This problem likely requires specialized handling beyond general summarization: a separate artifact index or explicit file-state tracking in agent scaffolding.
|
|
51
|
+
|
|
52
|
+
### Structured Summary Sections
|
|
53
|
+
|
|
54
|
+
Effective structured summaries include explicit sections:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Session Intent
|
|
58
|
+
[What the user is trying to accomplish]
|
|
59
|
+
|
|
60
|
+
## Files Modified
|
|
61
|
+
- auth.controller.ts: Fixed JWT token generation
|
|
62
|
+
- config/redis.ts: Updated connection pooling
|
|
63
|
+
- tests/auth.test.ts: Added mock setup for new config
|
|
64
|
+
|
|
65
|
+
## Decisions Made
|
|
66
|
+
- Using Redis connection pool instead of per-request connections
|
|
67
|
+
- Retry logic with exponential backoff for transient failures
|
|
68
|
+
|
|
69
|
+
## Current State
|
|
70
|
+
- 14 tests passing, 2 failing
|
|
71
|
+
- Remaining: mock setup for session service tests
|
|
72
|
+
|
|
73
|
+
## Next Steps
|
|
74
|
+
1. Fix remaining test failures
|
|
75
|
+
2. Run full test suite
|
|
76
|
+
3. Update documentation
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This structure prevents silent loss of file paths or decisions because each section must be explicitly addressed.
|
|
80
|
+
|
|
81
|
+
### Compression Trigger Strategies
|
|
82
|
+
|
|
83
|
+
When to trigger compression matters as much as how to compress:
|
|
84
|
+
|
|
85
|
+
| Strategy | Trigger Point | Trade-off |
|
|
86
|
+
|----------|---------------|-----------|
|
|
87
|
+
| Fixed threshold | 70-80% context utilization | Simple but may compress too early |
|
|
88
|
+
| Sliding window | Keep last N turns + summary | Predictable context size |
|
|
89
|
+
| Importance-based | Compress low-relevance sections first | Complex but preserves signal |
|
|
90
|
+
| Task-boundary | Compress at logical task completions | Clean summaries but unpredictable timing |
|
|
91
|
+
|
|
92
|
+
The sliding window approach with structured summaries provides the best balance of predictability and quality for most coding agent use cases.
|
|
93
|
+
|
|
94
|
+
### Probe-Based Evaluation
|
|
95
|
+
|
|
96
|
+
Traditional metrics like ROUGE or embedding similarity fail to capture functional compression quality. A summary may score high on lexical overlap while missing the one file path the agent needs.
|
|
97
|
+
|
|
98
|
+
Probe-based evaluation directly measures functional quality by asking questions after compression:
|
|
99
|
+
|
|
100
|
+
| Probe Type | What It Tests | Example Question |
|
|
101
|
+
|------------|---------------|------------------|
|
|
102
|
+
| Recall | Factual retention | "What was the original error message?" |
|
|
103
|
+
| Artifact | File tracking | "Which files have we modified?" |
|
|
104
|
+
| Continuation | Task planning | "What should we do next?" |
|
|
105
|
+
| Decision | Reasoning chain | "What did we decide about the Redis issue?" |
|
|
106
|
+
|
|
107
|
+
If compression preserved the right information, the agent answers correctly. If not, it guesses or hallucinates.
|
|
108
|
+
|
|
109
|
+
### Evaluation Dimensions
|
|
110
|
+
|
|
111
|
+
Six dimensions capture compression quality for coding agents:
|
|
112
|
+
|
|
113
|
+
1. **Accuracy**: Are technical details correct? File paths, function names, error codes.
|
|
114
|
+
2. **Context Awareness**: Does the response reflect current conversation state?
|
|
115
|
+
3. **Artifact Trail**: Does the agent know which files were read or modified?
|
|
116
|
+
4. **Completeness**: Does the response address all parts of the question?
|
|
117
|
+
5. **Continuity**: Can work continue without re-fetching information?
|
|
118
|
+
6. **Instruction Following**: Does the response respect stated constraints?
|
|
119
|
+
|
|
120
|
+
Accuracy shows the largest variation between compression methods (0.6 point gap). Artifact trail is universally weak (2.2-2.5 range).
|
|
121
|
+
|
|
122
|
+
## Practical Guidance
|
|
123
|
+
|
|
124
|
+
### Three-Phase Compression Workflow
|
|
125
|
+
|
|
126
|
+
For large codebases or agent systems exceeding context windows, apply compression through three phases:
|
|
127
|
+
|
|
128
|
+
1. **Research Phase**: Produce a research document from architecture diagrams, documentation, and key interfaces. Compress exploration into a structured analysis of components and dependencies. Output: single research document.
|
|
129
|
+
|
|
130
|
+
2. **Planning Phase**: Convert research into implementation specification with function signatures, type definitions, and data flow. A 5M token codebase compresses to approximately 2,000 words of specification.
|
|
131
|
+
|
|
132
|
+
3. **Implementation Phase**: Execute against the specification. Context remains focused on the spec rather than raw codebase exploration.
|
|
133
|
+
|
|
134
|
+
### Using Example Artifacts as Seeds
|
|
135
|
+
|
|
136
|
+
When provided with a manual migration example or reference PR, use it as a template to understand the target pattern. The example reveals constraints that static analysis cannot surface: which invariants must hold, which services break on changes, and what a clean migration looks like.
|
|
137
|
+
|
|
138
|
+
This is particularly important when the agent cannot distinguish essential complexity (business requirements) from accidental complexity (legacy workarounds). The example artifact encodes that distinction.
|
|
139
|
+
|
|
140
|
+
### Implementing Anchored Iterative Summarization
|
|
141
|
+
|
|
142
|
+
1. Define explicit summary sections matching your agent's needs
|
|
143
|
+
2. On first compression trigger, summarize truncated history into sections
|
|
144
|
+
3. On subsequent compressions, summarize only new truncated content
|
|
145
|
+
4. Merge new summary into existing sections rather than regenerating
|
|
146
|
+
5. Track which information came from which compression cycle for debugging
|
|
147
|
+
|
|
148
|
+
### When to Use Each Approach
|
|
149
|
+
|
|
150
|
+
**Use anchored iterative summarization when:**
|
|
151
|
+
- Sessions are long-running (100+ messages)
|
|
152
|
+
- File tracking matters (coding, debugging)
|
|
153
|
+
- You need to verify what was preserved
|
|
154
|
+
|
|
155
|
+
**Use opaque compression when:**
|
|
156
|
+
- Maximum token savings required
|
|
157
|
+
- Sessions are relatively short
|
|
158
|
+
- Re-fetching costs are low
|
|
159
|
+
|
|
160
|
+
**Use regenerative summaries when:**
|
|
161
|
+
- Summary interpretability is critical
|
|
162
|
+
- Sessions have clear phase boundaries
|
|
163
|
+
- Full context review is acceptable on each compression
|
|
164
|
+
|
|
165
|
+
### Compression Ratio Considerations
|
|
166
|
+
|
|
167
|
+
| Method | Compression Ratio | Quality Score | Trade-off |
|
|
168
|
+
|--------|-------------------|---------------|-----------|
|
|
169
|
+
| Anchored Iterative | 98.6% | 3.70 | Best quality, slightly less compression |
|
|
170
|
+
| Regenerative | 98.7% | 3.44 | Good quality, moderate compression |
|
|
171
|
+
| Opaque | 99.3% | 3.35 | Best compression, quality loss |
|
|
172
|
+
|
|
173
|
+
The 0.7% additional tokens retained by structured summarization buys 0.35 quality points. For any task where re-fetching costs matter, this trade-off favors structured approaches.
|
|
174
|
+
|
|
175
|
+
## Examples
|
|
176
|
+
|
|
177
|
+
**Example 1: Debugging Session Compression**
|
|
178
|
+
|
|
179
|
+
Original context (89,000 tokens, 178 messages):
|
|
180
|
+
- 401 error on /api/auth/login endpoint
|
|
181
|
+
- Traced through auth controller, middleware, session store
|
|
182
|
+
- Found stale Redis connection
|
|
183
|
+
- Fixed connection pooling, added retry logic
|
|
184
|
+
- 14 tests passing, 2 failing
|
|
185
|
+
|
|
186
|
+
Structured summary after compression:
|
|
187
|
+
|
|
188
|
+
```markdown
|
|
189
|
+
## Session Intent
|
|
190
|
+
Debug 401 Unauthorized error on /api/auth/login despite valid credentials.
|
|
191
|
+
|
|
192
|
+
## Root Cause
|
|
193
|
+
Stale Redis connection in session store. JWT generated correctly but session could not be persisted.
|
|
194
|
+
|
|
195
|
+
## Files Modified
|
|
196
|
+
- auth.controller.ts: No changes (read only)
|
|
197
|
+
- middleware/cors.ts: No changes (examined)
|
|
198
|
+
- config/redis.ts: Fixed connection pooling configuration
|
|
199
|
+
- services/session.service.ts: Added retry logic for transient failures
|
|
200
|
+
- tests/auth.test.ts: Updated mock setup
|
|
201
|
+
|
|
202
|
+
## Test Status
|
|
203
|
+
14 passing, 2 failing (mock setup issues)
|
|
204
|
+
|
|
205
|
+
## Next Steps
|
|
206
|
+
1. Fix remaining test failures (mock session service)
|
|
207
|
+
2. Run full test suite
|
|
208
|
+
3. Deploy to staging
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Example 2: Probe Response Quality**
|
|
212
|
+
|
|
213
|
+
After compression, asking "What was the original error?":
|
|
214
|
+
|
|
215
|
+
Good response (structured summarization):
|
|
216
|
+
> "The original error was a 401 Unauthorized response from the /api/auth/login endpoint. Users received this error with valid credentials. Root cause was stale Redis connection in session store."
|
|
217
|
+
|
|
218
|
+
Poor response (aggressive compression):
|
|
219
|
+
> "We were debugging an authentication issue. The login was failing. We fixed some configuration problems."
|
|
220
|
+
|
|
221
|
+
The structured response preserves endpoint, error code, and root cause. The aggressive response loses all technical detail.
|
|
222
|
+
|
|
223
|
+
## Guidelines
|
|
224
|
+
|
|
225
|
+
1. Optimize for tokens-per-task, not tokens-per-request
|
|
226
|
+
2. Use structured summaries with explicit sections for file tracking
|
|
227
|
+
3. Trigger compression at 70-80% context utilization
|
|
228
|
+
4. Implement incremental merging rather than full regeneration
|
|
229
|
+
5. Test compression quality with probe-based evaluation
|
|
230
|
+
6. Track artifact trail separately if file tracking is critical
|
|
231
|
+
7. Accept slightly lower compression ratios for better quality retention
|
|
232
|
+
8. Monitor re-fetching frequency as a compression quality signal
|
|
233
|
+
|
|
234
|
+
## Integration
|
|
235
|
+
|
|
236
|
+
This skill connects to several others in the collection:
|
|
237
|
+
|
|
238
|
+
- context-degradation - Compression is a mitigation strategy for degradation
|
|
239
|
+
- context-optimization - Compression is one optimization technique among many
|
|
240
|
+
- evaluation - Probe-based evaluation applies to compression testing
|
|
241
|
+
- memory-systems - Compression relates to scratchpad and summary memory patterns
|
|
242
|
+
|
|
243
|
+
## References
|
|
244
|
+
|
|
245
|
+
Internal reference:
|
|
246
|
+
- [Evaluation Framework Reference](./references/evaluation-framework.md) - Detailed probe types and scoring rubrics
|
|
247
|
+
|
|
248
|
+
Related skills in this collection:
|
|
249
|
+
- context-degradation - Understanding what compression prevents
|
|
250
|
+
- context-optimization - Broader optimization strategies
|
|
251
|
+
- evaluation - Building evaluation frameworks
|
|
252
|
+
|
|
253
|
+
External resources:
|
|
254
|
+
- Factory Research: Evaluating Context Compression for AI Agents (December 2025)
|
|
255
|
+
- Research on LLM-as-judge evaluation methodology (Zheng et al., 2023)
|
|
256
|
+
- Netflix Engineering: "The Infinite Software Crisis" - Three-phase workflow and context compression at scale (AI Summit 2025)
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Skill Metadata
|
|
261
|
+
|
|
262
|
+
**Created**: 2025-12-22
|
|
263
|
+
**Last Updated**: 2025-12-26
|
|
264
|
+
**Author**: Agent Skills for Context Engineering Contributors
|
|
265
|
+
**Version**: 1.1.0
|
|
266
|
+
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-degradation
|
|
3
|
+
description: "Recognize patterns of context failure: lost-in-middle, poisoning, distraction, and clash"
|
|
4
|
+
source: "https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/skills/context-degradation"
|
|
5
|
+
risk: safe
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## When to Use This Skill
|
|
9
|
+
|
|
10
|
+
Recognize patterns of context failure: lost-in-middle, poisoning, distraction, and clash
|
|
11
|
+
|
|
12
|
+
Use this skill when working with recognize patterns of context failure: lost-in-middle, poisoning, distraction, and clash.
|
|
13
|
+
# Context Degradation Patterns
|
|
14
|
+
|
|
15
|
+
Language models exhibit predictable degradation patterns as context length increases. Understanding these patterns is essential for diagnosing failures and designing resilient systems. Context degradation is not a binary state but a continuum of performance degradation that manifests in several distinct ways.
|
|
16
|
+
|
|
17
|
+
## When to Activate
|
|
18
|
+
|
|
19
|
+
Activate this skill when:
|
|
20
|
+
- Agent performance degrades unexpectedly during long conversations
|
|
21
|
+
- Debugging cases where agents produce incorrect or irrelevant outputs
|
|
22
|
+
- Designing systems that must handle large contexts reliably
|
|
23
|
+
- Evaluating context engineering choices for production systems
|
|
24
|
+
- Investigating "lost in middle" phenomena in agent outputs
|
|
25
|
+
- Analyzing context-related failures in agent behavior
|
|
26
|
+
|
|
27
|
+
## Core Concepts
|
|
28
|
+
|
|
29
|
+
Context degradation manifests through several distinct patterns. The lost-in-middle phenomenon causes information in the center of context to receive less attention. Context poisoning occurs when errors compound through repeated reference. Context distraction happens when irrelevant information overwhelms relevant content. Context confusion arises when the model cannot determine which context applies. Context clash develops when accumulated information directly conflicts.
|
|
30
|
+
|
|
31
|
+
These patterns are predictable and can be mitigated through architectural patterns like compaction, masking, partitioning, and isolation.
|
|
32
|
+
|
|
33
|
+
## Detailed Topics
|
|
34
|
+
|
|
35
|
+
### The Lost-in-Middle Phenomenon
|
|
36
|
+
|
|
37
|
+
The most well-documented degradation pattern is the "lost-in-middle" effect, where models demonstrate U-shaped attention curves. Information at the beginning and end of context receives reliable attention, while information buried in the middle suffers from dramatically reduced recall accuracy.
|
|
38
|
+
|
|
39
|
+
**Empirical Evidence**
|
|
40
|
+
Research demonstrates that relevant information placed in the middle of context experiences 10-40% lower recall accuracy compared to the same information at the beginning or end. This is not a failure of the model but a consequence of attention mechanics and training data distributions.
|
|
41
|
+
|
|
42
|
+
Models allocate massive attention to the first token (often the BOS token) to stabilize internal states. This creates an "attention sink" that soaks up attention budget. As context grows, the limited budget is stretched thinner, and middle tokens fail to garner sufficient attention weight for reliable retrieval.
|
|
43
|
+
|
|
44
|
+
**Practical Implications**
|
|
45
|
+
Design context placement with attention patterns in mind. Place critical information at the beginning or end of context. Consider whether information will be queried directly or needs to support reasoning—if the latter, placement matters less but overall signal quality matters more.
|
|
46
|
+
|
|
47
|
+
For long documents or conversations, use summary structures that surface key information at attention-favored positions. Use explicit section headers and transitions to help models navigate structure.
|
|
48
|
+
|
|
49
|
+
### Context Poisoning
|
|
50
|
+
|
|
51
|
+
Context poisoning occurs when hallucinations, errors, or incorrect information enters context and compounds through repeated reference. Once poisoned, context creates feedback loops that reinforce incorrect beliefs.
|
|
52
|
+
|
|
53
|
+
**How Poisoning Occurs**
|
|
54
|
+
Poisoning typically enters through three pathways. First, tool outputs may contain errors or unexpected formats that models accept as ground truth. Second, retrieved documents may contain incorrect or outdated information that models incorporate into reasoning. Third, model-generated summaries or intermediate outputs may introduce hallucinations that persist in context.
|
|
55
|
+
|
|
56
|
+
The compounding effect is severe. If an agent's goals section becomes poisoned, it develops strategies that take substantial effort to undo. Each subsequent decision references the poisoned content, reinforcing incorrect assumptions.
|
|
57
|
+
|
|
58
|
+
**Detection and Recovery**
|
|
59
|
+
Watch for symptoms including degraded output quality on tasks that previously succeeded, tool misalignment where agents call wrong tools or parameters, and hallucinations that persist despite correction attempts. When these symptoms appear, consider context poisoning.
|
|
60
|
+
|
|
61
|
+
Recovery requires removing or replacing poisoned content. This may involve truncating context to before the poisoning point, explicitly noting the poisoning in context and asking for re-evaluation, or restarting with clean context and preserving only verified information.
|
|
62
|
+
|
|
63
|
+
### Context Distraction
|
|
64
|
+
|
|
65
|
+
Context distraction emerges when context grows so long that models over-focus on provided information at the expense of their training knowledge. The model attends to everything in context regardless of relevance, and this creates pressure to use provided information even when internal knowledge is more accurate.
|
|
66
|
+
|
|
67
|
+
**The Distractor Effect**
|
|
68
|
+
Research shows that even a single irrelevant document in context reduces performance on tasks involving relevant documents. Multiple distractors compound degradation. The effect is not about noise in absolute terms but about attention allocation—irrelevant information competes with relevant information for limited attention budget.
|
|
69
|
+
|
|
70
|
+
Models do not have a mechanism to "skip" irrelevant context. They must attend to everything provided, and this obligation creates distraction even when the irrelevant information is clearly not useful.
|
|
71
|
+
|
|
72
|
+
**Mitigation Strategies**
|
|
73
|
+
Mitigate distraction through careful curation of what enters context. Apply relevance filtering before loading retrieved documents. Use namespacing and organization to make irrelevant sections easy to ignore structurally. Consider whether information truly needs to be in context or can be accessed through tool calls instead.
|
|
74
|
+
|
|
75
|
+
### Context Confusion
|
|
76
|
+
|
|
77
|
+
Context confusion arises when irrelevant information influences responses in ways that degrade quality. This is related to distraction but distinct—confusion concerns the influence of context on model behavior rather than attention allocation.
|
|
78
|
+
|
|
79
|
+
If you put something in context, the model has to pay attention to it. The model may incorporate irrelevant information, use inappropriate tool definitions, or apply constraints that came from different contexts. Confusion is especially problematic when context contains multiple task types or when switching between tasks within a single session.
|
|
80
|
+
|
|
81
|
+
**Signs of Confusion**
|
|
82
|
+
Watch for responses that address the wrong aspect of a query, tool calls that seem appropriate for a different task, or outputs that mix requirements from multiple sources. These indicate confusion about what context applies to the current situation.
|
|
83
|
+
|
|
84
|
+
**Architectural Solutions**
|
|
85
|
+
Architectural solutions include explicit task segmentation where different tasks get different context windows, clear transitions between task contexts, and state management that isolates context for different objectives.
|
|
86
|
+
|
|
87
|
+
### Context Clash
|
|
88
|
+
|
|
89
|
+
Context clash develops when accumulated information directly conflicts, creating contradictory guidance that derails reasoning. This differs from poisoning where one piece of information is incorrect—in clash, multiple correct pieces of information contradict each other.
|
|
90
|
+
|
|
91
|
+
**Sources of Clash**
|
|
92
|
+
Clash commonly arises from multi-source retrieval where different sources have contradictory information, version conflicts where outdated and current information both appear in context, and perspective conflicts where different viewpoints are valid but incompatible.
|
|
93
|
+
|
|
94
|
+
**Resolution Approaches**
|
|
95
|
+
Resolution approaches include explicit conflict marking that identifies contradictions and requests clarification, priority rules that establish which source takes precedence, and version filtering that excludes outdated information from context.
|
|
96
|
+
|
|
97
|
+
### Empirical Benchmarks and Thresholds
|
|
98
|
+
|
|
99
|
+
Research provides concrete data on degradation patterns that inform design decisions.
|
|
100
|
+
|
|
101
|
+
**RULER Benchmark Findings**
|
|
102
|
+
The RULER benchmark delivers sobering findings: only 50% of models claiming 32K+ context maintain satisfactory performance at 32K tokens. GPT-5.2 shows the least degradation among current models, while many still drop 30+ points at extended contexts. Near-perfect scores on simple needle-in-haystack tests do not translate to real long-context understanding.
|
|
103
|
+
|
|
104
|
+
**Model-Specific Degradation Thresholds**
|
|
105
|
+
| Model | Degradation Onset | Severe Degradation | Notes |
|
|
106
|
+
|-------|-------------------|-------------------|-------|
|
|
107
|
+
| GPT-5.2 | ~64K tokens | ~200K tokens | Best overall degradation resistance with thinking mode |
|
|
108
|
+
| Claude Opus 4.5 | ~100K tokens | ~180K tokens | 200K context window, strong attention management |
|
|
109
|
+
| Claude Sonnet 4.5 | ~80K tokens | ~150K tokens | Optimized for agents and coding tasks |
|
|
110
|
+
| Gemini 3 Pro | ~500K tokens | ~800K tokens | 1M context window, native multimodality |
|
|
111
|
+
| Gemini 3 Flash | ~300K tokens | ~600K tokens | 3x speed of Gemini 2.5, 81.2% MMMU-Pro |
|
|
112
|
+
|
|
113
|
+
**Model-Specific Behavior Patterns**
|
|
114
|
+
Different models exhibit distinct failure modes under context pressure:
|
|
115
|
+
|
|
116
|
+
- **Claude 4.5 series**: Lowest hallucination rates with calibrated uncertainty. Claude Opus 4.5 achieves 80.9% on SWE-bench Verified. Tends to refuse or ask clarification rather than fabricate.
|
|
117
|
+
- **GPT-5.2**: Two modes available - instant (fast) and thinking (reasoning). Thinking mode reduces hallucination through step-by-step verification but increases latency.
|
|
118
|
+
- **Gemini 3 Pro/Flash**: Native multimodality with 1M context window. Gemini 3 Flash offers 3x speed improvement over previous generation. Strong at multi-modal reasoning across text, code, images, audio, and video.
|
|
119
|
+
|
|
120
|
+
These patterns inform model selection for different use cases. High-stakes tasks benefit from Claude 4.5's conservative approach or GPT-5.2's thinking mode; speed-critical tasks may use instant modes.
|
|
121
|
+
|
|
122
|
+
### Counterintuitive Findings
|
|
123
|
+
|
|
124
|
+
Research reveals several counterintuitive patterns that challenge assumptions about context management.
|
|
125
|
+
|
|
126
|
+
**Shuffled Haystacks Outperform Coherent Ones**
|
|
127
|
+
Studies found that shuffled (incoherent) haystacks produce better performance than logically coherent ones. This suggests that coherent context may create false associations that confuse retrieval, while incoherent context forces models to rely on exact matching.
|
|
128
|
+
|
|
129
|
+
**Single Distractors Have Outsized Impact**
|
|
130
|
+
Even a single irrelevant document reduces performance significantly. The effect is not proportional to the amount of noise but follows a step function where the presence of any distractor triggers degradation.
|
|
131
|
+
|
|
132
|
+
**Needle-Question Similarity Correlation**
|
|
133
|
+
Lower similarity between needle and question pairs shows faster degradation with context length. Tasks requiring inference across dissimilar content are particularly vulnerable.
|
|
134
|
+
|
|
135
|
+
### When Larger Contexts Hurt
|
|
136
|
+
|
|
137
|
+
Larger context windows do not uniformly improve performance. In many cases, larger contexts create new problems that outweigh benefits.
|
|
138
|
+
|
|
139
|
+
**Performance Degradation Curves**
|
|
140
|
+
Models exhibit non-linear degradation with context length. Performance remains stable up to a threshold, then degrades rapidly. The threshold varies by model and task complexity. For many models, meaningful degradation begins around 8,000-16,000 tokens even when context windows support much larger sizes.
|
|
141
|
+
|
|
142
|
+
**Cost Implications**
|
|
143
|
+
Processing cost grows disproportionately with context length. The cost to process a 400K token context is not double the cost of 200K—it increases exponentially in both time and computing resources. For many applications, this makes large-context processing economically impractical.
|
|
144
|
+
|
|
145
|
+
**Cognitive Load Metaphor**
|
|
146
|
+
Even with an infinite context, asking a single model to maintain consistent quality across dozens of independent tasks creates a cognitive bottleneck. The model must constantly switch context between items, maintain a comparative framework, and ensure stylistic consistency. This is not a problem that more context solves.
|
|
147
|
+
|
|
148
|
+
## Practical Guidance
|
|
149
|
+
|
|
150
|
+
### The Four-Bucket Approach
|
|
151
|
+
|
|
152
|
+
Four strategies address different aspects of context degradation:
|
|
153
|
+
|
|
154
|
+
**Write**: Save context outside the window using scratchpads, file systems, or external storage. This keeps active context lean while preserving information access.
|
|
155
|
+
|
|
156
|
+
**Select**: Pull relevant context into the window through retrieval, filtering, and prioritization. This addresses distraction by excluding irrelevant information.
|
|
157
|
+
|
|
158
|
+
**Compress**: Reduce tokens while preserving information through summarization, abstraction, and observation masking. This extends effective context capacity.
|
|
159
|
+
|
|
160
|
+
**Isolate**: Split context across sub-agents or sessions to prevent any single context from growing large enough to degrade. This is the most aggressive strategy but often the most effective.
|
|
161
|
+
|
|
162
|
+
### Architectural Patterns
|
|
163
|
+
|
|
164
|
+
Implement these strategies through specific architectural patterns. Use just-in-time context loading to retrieve information only when needed. Use observation masking to replace verbose tool outputs with compact references. Use sub-agent architectures to isolate context for different tasks. Use compaction to summarize growing context before it exceeds limits.
|
|
165
|
+
|
|
166
|
+
## Examples
|
|
167
|
+
|
|
168
|
+
**Example 1: Detecting Degradation**
|
|
169
|
+
```yaml
|
|
170
|
+
# Context grows during long conversation
|
|
171
|
+
turn_1: 1000 tokens
|
|
172
|
+
turn_5: 8000 tokens
|
|
173
|
+
turn_10: 25000 tokens
|
|
174
|
+
turn_20: 60000 tokens (degradation begins)
|
|
175
|
+
turn_30: 90000 tokens (significant degradation)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Example 2: Mitigating Lost-in-Middle**
|
|
179
|
+
```markdown
|
|
180
|
+
# Organize context with critical info at edges
|
|
181
|
+
|
|
182
|
+
[CURRENT TASK] # At start
|
|
183
|
+
- Goal: Generate quarterly report
|
|
184
|
+
- Deadline: End of week
|
|
185
|
+
|
|
186
|
+
[DETAILED CONTEXT] # Middle (less attention)
|
|
187
|
+
- 50 pages of data
|
|
188
|
+
- Multiple analysis sections
|
|
189
|
+
- Supporting evidence
|
|
190
|
+
|
|
191
|
+
[KEY FINDINGS] # At end
|
|
192
|
+
- Revenue up 15%
|
|
193
|
+
- Costs down 8%
|
|
194
|
+
- Growth in Region A
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Guidelines
|
|
198
|
+
|
|
199
|
+
1. Monitor context length and performance correlation during development
|
|
200
|
+
2. Place critical information at beginning or end of context
|
|
201
|
+
3. Implement compaction triggers before degradation becomes severe
|
|
202
|
+
4. Validate retrieved documents for accuracy before adding to context
|
|
203
|
+
5. Use versioning to prevent outdated information from causing clash
|
|
204
|
+
6. Segment tasks to prevent context confusion across different objectives
|
|
205
|
+
7. Design for graceful degradation rather than assuming perfect conditions
|
|
206
|
+
8. Test with progressively larger contexts to find degradation thresholds
|
|
207
|
+
|
|
208
|
+
## Integration
|
|
209
|
+
|
|
210
|
+
This skill builds on context-fundamentals and should be studied after understanding basic context concepts. It connects to:
|
|
211
|
+
|
|
212
|
+
- context-optimization - Techniques for mitigating degradation
|
|
213
|
+
- multi-agent-patterns - Using isolation to prevent degradation
|
|
214
|
+
- evaluation - Measuring and detecting degradation in production
|
|
215
|
+
|
|
216
|
+
## References
|
|
217
|
+
|
|
218
|
+
Internal reference:
|
|
219
|
+
- [Degradation Patterns Reference](./references/patterns.md) - Detailed technical reference
|
|
220
|
+
|
|
221
|
+
Related skills in this collection:
|
|
222
|
+
- context-fundamentals - Context basics
|
|
223
|
+
- context-optimization - Mitigation techniques
|
|
224
|
+
- evaluation - Detection and measurement
|
|
225
|
+
|
|
226
|
+
External resources:
|
|
227
|
+
- Research on attention mechanisms and context window limitations
|
|
228
|
+
- Studies on the "lost-in-middle" phenomenon
|
|
229
|
+
- Production engineering guides from AI labs
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Skill Metadata
|
|
234
|
+
|
|
235
|
+
**Created**: 2025-12-20
|
|
236
|
+
**Last Updated**: 2025-12-20
|
|
237
|
+
**Author**: Agent Skills for Context Engineering Contributors
|
|
238
|
+
**Version**: 1.0.0
|