Token导航 LogoToken导航

Agent Skill · 研究检索

skill-optimizer(技能优化器)

skill-optimizer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

skill-optimizer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 72,863。

总安装 186周安装 8GitHub Stars 18下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:skill-optimizer(技能优化器)
来源仓库:https://github.com/jnlei/claude-tools
仓库路径:skills/skill-optimizer
安装命令:
npx skills add https://github.com/jnlei/claude-tools --skill skill-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jnlei/claude-tools --skill skill-optimizer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

skill-optimizer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景进行信息检索与筛选的场景。通过 npx skills add 命令从 GitHub 仓库安装并使用该技能。

安装前建议确认权限范围、维护状态及是否触发联网或文件操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/skill-optimizer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jnlei/claude-tools --skill skill-optimizer;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

skill-optimizer 怎么安装?

在终端执行 npx skills add https://github.com/jnlei/claude-tools --skill skill-optimizer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

skill-optimizer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

skill-optimizer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

skill-optimizer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

skill-optimizer 用的人多吗?

公开数据是累计安装 186 次,近一周安装 8 次,下载 65 次,GitHub 18 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

skill-optimizer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
skill-optimizer

技能优化器 · 本页

18618需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Skill Optimizer

Purpose

Optimize existing Claude Code skills to minimize token consumption by leveraging the three-level content loading architecture and progressive disclosure patterns.

When to Use

Use this skill when:

  • Analyzing existing skills for optimization opportunities
  • Skills are too large (approaching or exceeding 500 lines)
  • Need to reduce context consumption
  • Restructuring skills for progressive disclosure
  • Converting monolithic skills to multi-file architecture
  • Optimizing YAML frontmatter for better discovery
  • Improving skill performance and load times
  • Auditing skills for token efficiency
  • Creating new skills with optimization in mind

Content Loading Architecture

Three-Level Loading System

Level 1: Metadata (Always Loaded - ~100 tokens/skill)

  • YAML frontmatter in SKILL.md
  • Loaded at startup into system prompt
  • Enables skill discovery without context overhead
  • Optimization Target: Description field (max 1024 chars)

Level 2: Instructions (Loaded When Triggered - <5,000 tokens)

  • Main SKILL.md content
  • Loads dynamically when skill is relevant
  • Contains workflows, best practices, guidance
  • Optimization Target: Keep under 500 lines

Level 3: Resources (Loaded As Needed - Variable)

  • Additional markdown files (REFERENCE.md, EXAMPLES.md, etc.)
  • Code scripts in scripts/ directory
  • Templates, schemas, documentation
  • Optimization Target: No penalty until accessed

Key Principle

"Files don't consume context until accessed" - Bundle comprehensive documentation in reference files without context penalty.


Quick Optimization Workflow

1. Analyze Current State

Check skill size:

wc -l .claude/skills/skill-name/SKILL.md

Identify optimization opportunities:

  • SKILL.md > 500 lines?
  • Detailed API docs in main file?
  • Extensive examples in main file?
  • Long reference tables or schemas?
  • Code snippets that could be scripts?
  • Multiple distinct topics/sections?

2. Apply 500-Line Rule

If SKILL.md > 500 lines:

✅ Keep in main file:

  • Purpose and when to use
  • Quick start / common workflows
  • Critical best practices
  • Brief examples (5-10 lines)
  • Cross-references to detailed files

❌ Move to reference files:

  • Comprehensive API documentation
  • Extensive code examples (>20 lines)
  • Detailed troubleshooting guides
  • Pattern libraries
  • Schema definitions
  • Long reference tables

3. Structure Reference Files

Create organized reference hierarchy:

skill-name/
├── SKILL.md              # <500 lines, workflows & quick ref
├── REFERENCE.md          # Comprehensive documentation
├── EXAMPLES.md           # Detailed code examples
├── PATTERNS.md           # Pattern library
├── TROUBLESHOOTING.md    # Debug guide
└── scripts/              # Executable utilities
    └── helper.sh

Add table of contents to files >100 lines

4. Optimize YAML Frontmatter

Description optimization (max 1024 chars):

✅ Include:

  • All trigger keywords and phrases
  • Use cases and scenarios
  • File types and technologies
  • Common action verbs
  • Related concepts

❌ Avoid:

  • Generic descriptions
  • Missing key terms
  • Overly verbose explanations

Example:

---
name: database-development
description: Database development guidance for PostgreSQL including schema design, migrations, RLS policies, indexing strategies, privacy-preserving patterns, query optimization, and Prisma ORM. Use when working with tables, columns, indexes, migrations, RLS, Row-Level Security, database schema, SQL queries, Prisma schema, database optimization, privacy architecture, or PostgreSQL best practices.
---

5. Implement Progressive Disclosure

Pattern:

## Topic Overview

Brief explanation (2-3 sentences).

**Key Points:**
- Important consideration 1
- Important consideration 2

**For detailed information**: [REFERENCE.md](REFERENCE.md#topic-details)

**Quick Example:**
\`\`\`typescript
// Minimal working example (5-10 lines)
\`\`\`

**For more examples**: [EXAMPLES.md](EXAMPLES.md#topic-examples)

Optimization Patterns Summary

Pattern 1: Extract API Documentation

Strategy: Move detailed API docs to REFERENCE.md

Before: 80+ lines of API documentation in SKILL.md After: 10-line summary with link to complete docs Savings: ~70 lines (~1,400 tokens)

For complete pattern details: REFERENCE.md

Pattern 2: Extract Pattern Libraries

Strategy: Move code patterns to PATTERNS.md

Before: 200+ lines of pattern code in SKILL.md After: 18-line summary with quick example Savings: ~182 lines (~3,640 tokens)

For complete pattern details: REFERENCE.md

Pattern 3: Extract Troubleshooting

Strategy: Move debug guides to TROUBLESHOOTING.md

Before: 300+ lines of troubleshooting in SKILL.md After: 18-line summary with quick diagnostics Savings: ~282 lines (~5,640 tokens)

For complete pattern details: REFERENCE.md

Pattern 4: Convert Code to Scripts

Strategy: Move executable code to scripts/ directory

Before: 55+ lines of bash script in SKILL.md After: 7-line reference to executable script Savings: ~48 lines (~960 tokens) + script code never enters context

For complete pattern details: REFERENCE.md


Common Anti-Patterns

Avoid these common mistakes when creating or optimizing skills:

❌ Anti-Pattern 1: Monolithic Skills

  • Single SKILL.md with 1000+ lines
  • Solution: Split into main + reference files

❌ Anti-Pattern 2: Incomplete References

  • Reference files exist but not linked
  • Solution: Link all reference files from SKILL.md

❌ Anti-Pattern 3: Nested References

  • References pointing to other references (>1 level)
  • Solution: Keep hierarchy flat (max 1 level)

❌ Anti-Pattern 4: Sparse Frontmatter

  • Minimal YAML description missing keywords
  • Solution: Rich description with all triggers

❌ Anti-Pattern 5: Code as Documentation

  • 100+ line scripts embedded in markdown
  • Solution: Move to scripts/ directory

For detailed anti-patterns and solutions: REFERENCE.md


Migration Workflow

Quick Migration Steps

Phase 1: Discovery

# Check skill size
wc -l .claude/skills/skill-name/SKILL.md

# Identify sections to extract
grep "^##" .claude/skills/skill-name/SKILL.md

Phase 2: Planning

  • Design file hierarchy (SKILL.md + reference files)
  • Plan content distribution
  • Identify scripts to extract

Phase 3: Implementation

# Create reference files
touch REFERENCE.md EXAMPLES.md
mkdir -p scripts

# Extract content systematically
# 1. Copy section to reference file
# 2. Replace in SKILL.md with summary + link
# 3. Verify link works
# 4. Remove detailed content from SKILL.md

Phase 4: Optimization

  • Trim remaining content
  • Optimize frontmatter with trigger keywords
  • Add navigation aids (table of contents)

Phase 5: Validation

# Verify under 500 lines
wc -l .claude/skills/skill-name/SKILL.md

# Test links work
grep -o '\[.*\](.*\.md#.*)' SKILL.md

For complete migration workflow: REFERENCE.md


Advanced Techniques

Quick reference to advanced optimization strategies:

Technique 1: Conditional Content Loading

  • Structure content so advanced sections load only when needed
  • Benefits: Most users don't load advanced content

Technique 2: Layered Examples

  • Progressive complexity: minimal → production → enterprise
  • Benefits: Beginners see simple examples, advanced users access complex ones

Technique 3: Executable Documentation

  • Scripts that both execute and document
  • Benefits: Zero token cost, self-documenting output

Technique 4: Tabular Compression

  • Use tables to compress structured data
  • Benefits: 60%+ space reduction for configurations/options

Technique 5: Smart Chunking

  • Group related small sections instead of individual extraction
  • Benefits: Better narrative flow, fewer cross-references

For detailed advanced techniques: REFERENCE.md


Optimization Checklist

When optimizing a skill, verify:

Content Structure

  • SKILL.md is under 500 lines
  • Main file contains quick reference only
  • Detailed docs moved to reference files
  • Reference files have table of contents (if >100 lines)
  • Cross-references use relative links
  • No deeply nested references (max 1 level)

YAML Frontmatter

  • Description includes all trigger keywords
  • Description is under 1024 characters
  • Description covers use cases and scenarios
  • Description mentions file types/technologies
  • Name follows kebab-case convention

Progressive Disclosure

  • Overview → Details pattern used
  • Quick examples in main file (5-10 lines)
  • Extensive examples in EXAMPLES.md
  • Brief summaries with references to details
  • Common workflows highlighted in main file

File Organization

  • Reference files named clearly
  • Scripts in scripts/ directory
  • Scripts are executable (chmod +x)
  • No redundant content across files
  • Each file has single, clear purpose

Token Efficiency

  • Eliminated verbose explanations
  • Removed duplicate information
  • Used bullet points vs paragraphs
  • Moved large code blocks to reference files
  • Converted reusable code to scripts

Measurement & Validation

Token Estimation

Quick estimate:

lines=$(wc -l < SKILL.md)
tokens=$((lines * 20))  # Conservative: 20 tokens/line
echo "Estimated tokens: ~$tokens"

Target: Keep SKILL.md under 10,000 tokens (~500 lines)

Before/After Comparison

# Calculate savings
BEFORE=850  # lines before optimization
AFTER=420   # lines after optimization
SAVINGS=$((BEFORE - AFTER))
TOKEN_SAVINGS=$((SAVINGS * 20))

echo "Reduced by $SAVINGS lines"
echo "Estimated token savings: ~$TOKEN_SAVINGS tokens"

Quality Checks

  • All original information preserved
  • Links work correctly
  • Main file comprehensive for common cases
  • Reference files well-organized
  • Navigation intuitive

For detailed measurement methods: REFERENCE.md


Best Practices Summary

✅ DO:

  • Keep SKILL.md minimum but use other reference files to keep the full and detailed knowledge base
  • Use progressive disclosure (overview → details)
  • Include all trigger keywords in description
  • Create clear cross-references to detailed docs
  • Add table of contents to reference files >100 lines
  • Convert reusable code to scripts
  • Test optimization with real usage

❌ DON'T:

  • Exceed 500 lines in SKILL.md
  • Nest references more than 1 level deep
  • Include API docs in main file
  • Embed long code examples in main file
  • Create reference files without linking them
  • Use sparse YAML descriptions
  • Optimize without preserving critical info

Quick Reference

File size limits:

  • SKILL.md: <500 lines (strict)
  • Reference files: No limit (loaded on-demand)
  • YAML description: 1024 chars max

Optimization priority:

  1. Apply 500-line rule to SKILL.md
  2. Extract API docs to REFERENCE.md
  3. Move examples to EXAMPLES.md or PATTERNS.md
  4. Convert scripts to scripts/ directory
  5. Enrich YAML frontmatter description

Common extractions:

  • API documentation → REFERENCE.md
  • Code examples → EXAMPLES.md
  • Troubleshooting → TROUBLESHOOTING.md
  • Pattern library → PATTERNS.md
  • Scripts → scripts/ directory

Typical token savings:

  • API extraction: ~1,400 tokens
  • Pattern library: ~3,640 tokens
  • Troubleshooting: ~5,640 tokens
  • Scripts: ~960 tokens + no code in context

For comprehensive optimization patterns and detailed workflows: REFERENCE.md


Real-World Example

Before optimization:

skill-example/
└── SKILL.md  (850 lines, ~17,000 tokens)

After optimization:

skill-example/
├── SKILL.md              (420 lines, ~8,400 tokens)
├── REFERENCE.md          (350 lines, loaded on-demand)
├── EXAMPLES.md           (180 lines, loaded on-demand)
└── scripts/
    ├── validate.sh       (code never enters context)
    └── setup.sh          (code never enters context)

Result: 50% token reduction on initial load, comprehensive docs still available on-demand


Next Steps:

  1. Audit existing skills: wc -l.claude/skills/*/SKILL.md
  2. Identify candidates for optimization (>500 lines)
  3. Apply optimization workflow
  4. Measure token savings
  5. Validate with real usage

For detailed guidance: See REFERENCE.md for complete optimization patterns, anti-patterns, migration workflows, and advanced techniques.

平台分布

Codex

38.66%
按下载量换算25

Claude

30.05%
按下载量换算20

Cursor

19.99%
按下载量换算13

Gemini CLI

8.61%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills