Skill站外收录 @skilllib/skill-2014279425221668866
skill-creator
定义高密度智能体技能的创建规范,强调信息密度与令牌效率的平衡,通过渐进式加载、指令式压缩和三级资源分层实现上下文精简,适用于多模型环境下的标准化技能开发与部署。
数据与分析 AI 技能
Skills.MD
# Agent Skill Creator Standard
## **Priority: P0 (CRITICAL)**
Strict guidelines for authoring High-Density Agent Skills. Maximize information density while minimizing token consumption through progressive disclosure and strategic content organization.
## Core Principles
### **Token Economy First** ⚡
Every word costs tokens. Design skills for maximum information/token ratio:
- **Progressive Loading**: Load only essential content initially
- **Lazy References**: Move detailed examples to `references/` folder
- **Imperative Compression**: Use verbs, abbreviations, bullet points
- **Context Window Awareness**: Design for 4k-32k token limits across agents
### **Three-Level Loading System**
```ts
Level 1: Metadata (100 words) → Always loaded
Level 2: SKILL.md Body (500 lines) → When triggered
Level 3: References/Scripts/Assets → As needed
```
## Directory Structure
```text
skills/
└── {category}/ # e.g., "flutter" (lowercase)
└── {skill-name}/ # e.g., "bloc-state-management" (kebab-case)
├── SKILL.md # Core Logic (High Density, <500 lines)
├── scripts/ # Executable code (Deterministic tasks)
│ └── automation.py
├── references/ # Heavy Examples (Lazy loaded)
│ ├── patterns.md
│ └── examples.md
└── assets/ # Output templates (Never loaded)
└── template.json
```
## Writing Rules (Token-Optimized)
1. **Imperative Compression**: Start with verbs. No "Please/You should".
- _Waste_: "You should use BLoC for state management." (8 words)
- _Efficient_: "Use BLoC for state management." (5 words)
2. **Token Economy**: Maximize info/token ratio.
- Skip articles ("the", "a") if readable
- Use standard abbreviations (cfg, param, impl)
- Bullet points > paragraphs (3x density)
3. **Progressive Disclosure**: Essential info first, details on-demand.
- Core workflow in SKILL.md
- Complex examples in references/
- Templates/assets never loaded
4. **Context-Aware Design**: Different agents have different limits.
- Cursor: ~100k tokens
- Claude: ~200k tokens
- Windsurf: ~32k tokens
## Content Sections (Token-Budgeted)
Required sections in `SKILL.md`:
1. **Frontmatter (Mandatory)**: Metadata for triggering (100 words max)
```yaml
---
name: Skill Name
description: What it does + when to use it (triggers activation)
metadata:
labels: [tag1, tag2]
triggers:
files: ['**/*.ext']
keywords: [term1, term2]
---
```
2. **Priority**: P0 (Critical), P1 (Standard), or P2 (Optional)
3. **Structure**: ASCII tree of expected file layout
4. **Guidelines**: Bullet points of "Do this" (imperative)
5. **Anti-Patterns**: Bullet points of "Don't do this"
6. **Reference Links**: Links to `references/` files (lazy loading)
## Size Limits (Strict)
| Element | Limit | Action if Exceeded |
| -------------------------- | -------- | ------------------------ |
| SKILL.md total | 70 lines | Extract to references/ |
| Inline code block | 10 lines | Move to references/ |
| Anti-pattern item | 15 words | Compress to imperative |
| Description after Priority | 0 lines | Remove (use frontmatter) |
## Resource Organization (Token-Saving)
### **scripts/** - Executable Code
**When to use**: Deterministic, repeated tasks
**Benefits**: Never loaded into context, executed directly
**Examples**: Code generators, formatters, validators
### **references/** - Documentation
**When to use**: Detailed examples, API docs, complex patterns
**Benefits**: Loaded only when needed, keeps SKILL.md lean
**Examples**: Implementation patterns, error handling guides
### **assets/** - Output Templates
**When to use**: Boilerplate files, images, configs
**Benefits**: Never loaded, copied to output as-needed
**Examples**: Project templates, config files, icons
## Skill Creation Lifecycle
### **Phase 1: Understanding (Token Audit)**
1. Define concrete use cases
2. Identify repetitive patterns
3. Calculate token budget per agent
### **Phase 2: Planning (Resource Strategy)**
1. Core workflow → SKILL.md
2. Complex examples → references/
3. Repeated code → scripts/
4. Templates → assets/
### **Phase 3: Implementation (Compression)**
1. Write imperative guidelines
2. Compress examples to essentials
3. Test context window fit
### **Phase 4: Validation (Token Testing)**
1. Verify loading efficiency
2. Test across different agents
3. Measure token consumption
### Validation Checklist
Before finalizing, verify:
- [ ] SKILL.md ≤70 lines (ideal: 40-60)
- [ ] No inline code >10 lines
- [ ] No repeated frontmatter content
- [ ] Anti-patterns use imperative format
- [ ] Complex examples in references/
## Anti-Patterns (Token Wasters)
- **Verbose Explanations**: "This is important because..." → Delete
- **Redundant Context**: Same info in multiple places
- **Large Inline Code**: Move code >10 lines to references/
- **Conversational Style**: "Let's see how to..." → "Do this:"
- **Over-Engineering**: Complex structure for simple skills
- **Redundant Descriptions**: Do not repeat frontmatter `description` after `## Priority`
- **Oversized Skills**: SKILL.md >70 lines → Extract to references/
- **Long Anti-Patterns**: Use `**No X**: Do Y, not Z.` (max 15 words)
## Reference & Examples
Use the enhanced template below to generate new skills:
[references/TEMPLATE.md](references/TEMPLATE.md)
For comprehensive lifecycle guidance:
[references/lifecycle.md](references/lifecycle.md)
For resource organization patterns:
[references/resource-organization.md](references/resource-organization.md)
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「skill-creator」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次