Token导航 LogoToken导航TokenDH.com
开发规范需要联网github未标认证来源可访问许可证需确认审计通过

skills-best-practices技能最佳实践

Agent Skill

skills-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

416

周安装

17

GitHub Stars

24

下载量

135
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/tenequm/skills --skill skills-best-practices

简介

skills-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理项目状态与变更。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息梳理的场景。
  • 通过 npx skills add 命令从 GitHub 安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Skills Best Practices

Comprehensive reference for building Agent Skills that follow Anthropic's official guidelines. Skills are folders containing instructions, scripts, and resources that teach Claude how to handle specific tasks. They follow the Agent Skills open standard.

Quick Start

A minimal skill is a directory with a SKILL.md file:

my-skill/
├── SKILL.md          # Required - instructions with YAML frontmatter
├── references/       # Optional - detailed docs loaded on demand
├── scripts/          # Optional - executable code
└── assets/           # Optional - templates, fonts, icons

Minimal SKILL.md:

---
name: my-skill-name
description: What it does. Use when [specific triggers].
---

# My Skill Name

[Instructions here]

Only name and description are required in frontmatter.

Core Design Principles

Progressive Disclosure (Most Important)

Skills load information in three levels to minimize token usage:

LevelWhen LoadedToken CostContent
1: MetadataAlways (startup)~100 tokensname + description from frontmatter
2: InstructionsWhen skill triggers<5k tokensSKILL.md body
3: ResourcesAs neededEffectively unlimitedBundled files, scripts

Keep SKILL.md under 500 lines. Move detailed docs to separate files and reference them:

## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md)
- **API reference**: See [reference.md](reference.md)

Claude reads referenced files only when the task requires them.

Composability

Skills work alongside other skills. Don't assume yours is the only one loaded.

Portability

Skills work across Claude.ai, Claude Code, API, and Agent SDK without modification (if dependencies are available).

Writing the Description (Critical)

The description is the single most important field - it determines when your skill activates. Claude uses it to decide relevance from potentially 100+ available skills.

Rules

  • Write in third person ("Processes files..." not "I help you process files...")
  • Include WHAT it does + WHEN to use it
  • Max 1024 characters, no XML angle brackets
  • Be slightly "pushy" - Claude tends to undertrigger rather than overtrigger
  • Include specific trigger phrases users would naturally say

Good vs Bad

# GOOD - specific, actionable, includes triggers
description: Extract text and tables from PDF files, fill forms, merge
  documents. Use when working with PDF files or when the user mentions
  PDFs, forms, or document extraction.

# BAD - too vague
description: Helps with documents.

# BAD - missing triggers
description: Creates sophisticated multi-page documentation systems.

More examples in references/description-guide.md.

Frontmatter Reference

Required Fields

FieldRules
nameKebab-case, max 64 chars, lowercase + numbers + hyphens only. No "claude" or "anthropic"
descriptionNon-empty, max 1024 chars, no XML tags. WHAT + WHEN

Optional Fields (Claude Code)

FieldPurpose
argument-hintAutocomplete hint, e.g. [issue-number]
disable-model-invocationtrue = only user can invoke (for deploy, commit)
user-invocablefalse = hidden from / menu (background knowledge)
allowed-toolsTools allowed without permission, e.g. Read, Grep, Glob
modelOverride model for this skill
effortOverride effort level: low, medium, high, max
contextfork = run in isolated subagent
agentSubagent type when context: fork (e.g. Explore, Plan)
pathsGlob patterns limiting when skill activates

Naming Conventions

Prefer gerund form for clarity:

  • processing-pdfs, analyzing-spreadsheets, managing-databases
  • Also acceptable: pdf-processing, process-pdfs
  • Avoid: helper, utils, tools, documents

Structuring Instructions

Be Concise

Claude is smart. Only add context it doesn't already have:

# GOOD (~50 tokens)
## Extract PDF text
Use pdfplumber for text extraction:

import pdfplumber with pdfplumber.open("file.pdf") as pdf: text = pdf.pages[0].extract_text()


# BAD (~150 tokens)

## Extract PDF text

PDF files are a common file format containing text and images. To extract text, you need a library. There are many available...

Set Degrees of Freedom

  • High freedom (text guidelines): Multiple approaches valid, context-dependent
  • Medium freedom (pseudocode/templates): Preferred pattern exists, some variation OK
  • Low freedom (exact scripts): Operations are fragile, consistency critical

Recommended SKILL.md Structure

# Skill Name

## Quick start
[Minimal working example]

## Workflow Decision Tree
[Route to the right approach based on task type]

## Detailed Instructions
[Step-by-step for each workflow]

## Examples
[Concrete input/output pairs]

## Troubleshooting
[Common errors and fixes]

Reference Files

Keep references one level deep from SKILL.md. Avoid nested chains:

# BAD: Too deep
SKILL.md -> advanced.md -> details.md -> actual info

# GOOD: One level
SKILL.md -> advanced.md (contains the info directly)
SKILL.md -> reference.md (contains the info directly)

For reference files >100 lines, include a table of contents at the top.

Patterns

Sequential Workflow

## Step 1: Analyze input
Run: `python scripts/analyze.py input.pdf`

## Step 2: Validate
Run: `python scripts/validate.py fields.json`
Fix any errors before continuing.

## Step 3: Execute
Run: `python scripts/process.py input.pdf fields.json output.pdf`

Conditional Workflow (Decision Tree)

## Workflow Decision Tree
**Creating new content?** -> Follow "Creation workflow"
**Editing existing content?** -> Follow "Editing workflow"
**Reviewing content?** -> Follow "Review workflow"

Feedback Loop

1. Make edits
2. Validate: `python scripts/validate.py`
3. If validation fails -> fix issues -> go to step 2
4. Only proceed when validation passes

Checklist Pattern (for complex tasks)

Copy this checklist and track progress:
- [ ] Step 1: Analyze input
- [ ] Step 2: Create plan
- [ ] Step 3: Validate plan
- [ ] Step 4: Execute
- [ ] Step 5: Verify output

More patterns in references/patterns.md.

Scripts

When your skill includes executable code:

  • Solve, don't punt: Handle errors explicitly instead of letting them fail
  • Justify constants: No magic numbers - document why each value was chosen
  • Prefer execution over loading: Scripts run without entering context; only output consumes tokens
  • Clarify intent: "Run analyze.py" (execute) vs "See analyze.py" (read as reference)
  • List dependencies in SKILL.md and verify availability

Testing

Triggering Tests

Should trigger:
- "Help me set up a new project in [Service]"
- "I need to create a project" (paraphrased)

Should NOT trigger:
- "What's the weather?" (unrelated)
- "Write Python code" (too generic)

Functional Tests

Test normal operations, edge cases, and out-of-scope requests. Run the same request 3-5 times to check consistency.

Debug Triggering

Ask Claude: "When would you use the [skill-name] skill?" - it quotes the description back. Adjust based on what's missing.

Troubleshooting

SymptomCauseFix
Skill never loadsDescription too vagueAdd specific triggers and key terms
Skill loads for wrong tasksDescription too broadAdd negative triggers, be more specific
Instructions not followedToo verbose or buriedPut critical instructions at top, use headers
Slow/degraded responsesSKILL.md too largeMove content to references/, keep under 500 lines
"Could not find SKILL.md"Wrong filenameMust be exactly SKILL.md (case-sensitive)
"Invalid skill name"Spaces or capitalsUse kebab-case: my-skill-name

Distribution

SurfaceHow to Deploy
Claude.aiSettings > Features > Upload zip
Claude Code (personal)~/.claude/skills/<name>/SKILL.md
Claude Code (project).claude/skills/<name>/SKILL.md
Claude Code (plugin)<plugin>/skills/<name>/SKILL.md
APIPOST /v1/skills with beta headers
EnterpriseManaged settings (org-wide)

Skills don't sync across surfaces - deploy separately to each.

Security

  • Only use skills from trusted sources
  • No XML angle brackets in frontmatter (injection risk)
  • Audit all bundled scripts and resources before using third-party skills
  • Be cautious of skills that fetch from external URLs

Additional References

Official Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.65%
按下载量换算48

Claude

30.12%
按下载量换算41

Cursor

18.03%
按下载量换算24

Gemini CLI

8.88%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills