[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PF3M2R7MERV7QS9FECV458":3,"skill-same:01M6PF3M2R7MERV7QS9FECV458":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":5,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6PF3M2R7MERV7QS9FECV458","context-compression",null,"Compresses context to fit within model token limits while preserving the most critical information for the task at hand.","skytiger6724\u002Fqwen-skills","skytiger6724","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F132033509?v=4","01M6PEYPXF71YYBVHZVX61FG0F","01M6PEYQ1ER6EW7ZP30HV4R2R8",2,"MIT","https:\u002F\u002Fgithub.com\u002Fskytiger6724\u002Fqwen-skills\u002Fblob\u002Fmain\u002Fcontext-compression\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"compression","context compression","context","model","agent-skills","task","ai-agent","token","critical","fit","information","hand","at","for","limits","2026-11-10 10:12:30",false,"---\nname: context-compression\ndescription: \"Compresses context to fit within model token limits while preserving the most critical information for the task at hand.\"\nlicense: MIT\nmetadata:\n  author: awesome-ai-agent-skills\n  version: \"1.0.0\"\n---\n\n# Context Compression\n\nContext compression is the process of reducing the size of textual context provided to a language model while retaining the information most essential to the task. As conversations grow longer and retrieved documents grow larger, compression becomes critical for staying within token limits and keeping inference costs manageable without sacrificing answer quality.\n\n## Workflow\n\n1. **Measure the Token Budget**: Determine the model's total context window and subtract the tokens reserved for instructions and output.\n2. **Score Information Density**: Analyze raw context and assign density scores based on task-relevant facts.\n3. **Select a Compression Strategy**: Choose between extractive\u002Fabstractive summarization, key-point extraction, or selective pruning.\n4. **Apply Compression**: Execute the chosen strategy.\n5. **Validate Information Retention**: Ensure no critical facts (entities, numbers, conclusions) were lost.\n6. **Assemble the Final Context**: Insert the compressed text into the prompt.\n\n## Techniques\n\n- **Extractive Summarization**: Selects top-n important sentences verbatim. Best for precision.\n- **Abstractive Summarization**: Rewrites content concisely. Risks subtle inaccuracies.\n- **Key-Point Extraction**: Reduces text to facts\u002Fentities. High compression (>90%), loses narrative flow.\n- **Selective Pruning**: Removes filler, boilerplate, and repetitions.\n- **Token Budget Management**: Dynamically allocate budget across multiple context sources.\n\n## Best Practices\n\n- **Compress progressively**: Start with light pruning.\n- **Preserve numbers and names**: Quantitative data is critical.\n- **Tag compressed context**: Inform the model that context has been summarized.\n- **Prefer extractive for code**: Avoid paraphrasing technical snippets.\n- **Recency bias**: Keep the last 2-3 turns of conversation verbatim.\n","# Context Compression\n\nContext compression is the process of reducing the size of textual context provided to a language model while retaining the information most essential to the task. As conversations grow longer and retrieved documents grow larger, compression becomes critical for staying within token limits and keeping inference costs manageable without sacrificing answer quality.\n\n## Workflow\n\n1. **Measure the Token Budget**: Determine the model's total context window and subtract the tokens reserved for instructions and output.\n2. **Score Information Density**: Analyze raw context and assign density scores based on task-relevant facts.\n3. **Select a Compression Strategy**: Choose between extractive\u002Fabstractive summarization, key-point extraction, or selective pruning.\n4. **Apply Compression**: Execute the chosen strategy.\n5. **Validate Information Retention**: Ensure no critical facts (entities, numbers, conclusions) were lost.\n6. **Assemble the Final Context**: Insert the compressed text into the prompt.\n\n## Techniques\n\n- **Extractive Summarization**: Selects top-n important sentences verbatim. Best for precision.\n- **Abstractive Summarization**: Rewrites content concisely. Risks subtle inaccuracies.\n- **Key-Point Extraction**: Reduces text to facts\u002Fentities. High compression (>90%), loses narrative flow.\n- **Selective Pruning**: Removes filler, boilerplate, and repetitions.\n- **Token Budget Management**: Dynamically allocate budget across multiple context sources.\n\n## Best Practices\n\n- **Compress progressively**: Start with light pruning.\n- **Preserve numbers and names**: Quantitative data is critical.\n- **Tag compressed context**: Inform the model that context has been summarized.\n- **Prefer extractive for code**: Avoid paraphrasing technical snippets.\n- **Recency bias**: Keep the last 2-3 turns of conversation verbatim.\n",{"name":5,"license":14,"metadata":43,"description":7},{"author":44,"version":45},"awesome-ai-agent-skills","1.0.0","main","87d5b1ee70725cd1b61343526758084588ada55d",0,"https:\u002F\u002Fgithub.com\u002Fskytiger6724\u002Fqwen-skills","https:\u002F\u002Fgithub.com\u002Fskytiger6724","2026-04-09 16:34:41",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add skytiger6724\u002Fqwen-skills --skill context-compression",{"tool":58,"command":59},"bunx","bunx skills add skytiger6724\u002Fqwen-skills --skill context-compression",{"tool":61,"command":62},"pnpm","pnpm dlx skills add skytiger6724\u002Fqwen-skills --skill context-compression","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fskytiger6724\u002Fqwen-skills\u002Fblob\u002Fmain\u002Fcontext-compression\u002FSKILL.md",true,[],[67],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":81,"publishedAt":38},"01M6PFH78ECYDJ32D32ZK402Y4","pua","Forces high-agency exhaustive problem-solving with corporate PUA pressure. Triggers on user frustration, repeated failures (2+), passive behavior, or quality complaints. Common triggers across Reddit\u002FLinuxDo\u002FHN\u002FX: 'try harder', 'figure it out', 'stop giving up', 'you keep failing', '加油', '别偷懒', '你再试试', '为什么还不行', '你怎么又失败了', '你怎么搞的', '又错了', '能不能靠谱点', '认真点', '不行啊', '降智了', '你又在原地打转', '你把之前的改坏了', '别让我手动处理', '换个方法', 'stop spinning', 'you broke it', 'why does this still not work', 'this is the third time', '\u002Fpua', 'PUA模式'. Applies to ALL task types: code, config, debug, deploy, research.","https:\u002F\u002Fgithub.com\u002Fskytiger6724\u002Fqwen-skills\u002Fblob\u002Fmain\u002Fpua\u002FSKILL.md",[73,76],{"categoryNo":74,"categoryName":75,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[69,82,83,84,85,86,87,88,89,90,91,92,28,93,94,95,96,97,98,99],"high","research","you","with","types","keep","problem","triggers","across","time","problem-solving","reddit","up","work","common","figure it out","code","debug"]