Token导航 LogoToken导航

Agent Skill · 开发规范

plugin-best-practices(插件最佳实践)

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

plugin-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描有提醒项,按安装量在开发规范类的 1,265 个 Skill 里排第 539。

总安装 1,032周安装 43GitHub Stars 537下载 344核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/fradser/dotclaude --skill plugin-best-practices

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

plugin-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态和协作事项进行整理。它适用于代码审查、变更追踪和团队协作场景,可帮助 Agent 梳理项目结构和提交历史。

通过仓库路径、Issue 编号或 PR ID 触发,返回相关元数据和变更内容供进一步分析。安装命令为 npx skills add https://github.com/fradser/dotclaude --skill plugin-best-practices,需确认 GitHub API 访问权限。

使用前应检查仓库可见性和维护状态,避免依赖私有或归档项目,防止触发不必要的网络请求。

来源仓库内路径:skills/plugin-best-practices

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fradser/dotclaude --skill plugin-best-practice…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

plugin-best-practices 怎么安装?

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

plugin-best-practices 支持哪些 AI 工具?

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

plugin-best-practices 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

plugin-best-practices 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

plugin-best-practices 用的人多吗?

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

plugin-best-practices 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
plugin-best-practices

插件最佳实践 · 本页

1,032537调用外部服务MIT有提醒

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

SKILL.md 原文

Plugin Validation & Best Practices

Validates Claude Code plugins against architectural standards. This file is a navigation guide; detailed content lives in references/.

Quick Start

Run validation on a plugin:

python3 plugin-optimizer/scripts/validate-plugin.py <plugin-path>

For specific checks only:

python3 plugin-optimizer/scripts/validate-plugin.py <plugin-path> --check=manifest,frontmatter

Component Selection Guide

ComponentWhen to UseKey Requirements
Instruction-type SkillsUser-invoked workflows, linear processImperative voice, phase-based, declared in commands
Knowledge-type SkillsReference knowledge for agentsDeclarative voice, topic-based, declared in skills
AgentsIsolated, specialized decision-makingRestricted tools, 2-4 <example> blocks, isolated context
MCP ServersExternal tool/data integrationstdio/http/sse transport, ${CLAUDE_PLUGIN_ROOT} paths
LSP ServersIDE features (go to definition)Language server binary, extension mapping
HooksEvent-driven automationPreToolUse/PostToolUse events, command/prompt/agent types

See ./references/component-model.md for detailed selection criteria and ./references/components/ for implementation guides.

Progressive Disclosure

Three-tier token structure ensures efficient context usage:

LevelContentToken BudgetLoading
1Metadata (name + description)~100 tokensAlways (at startup)
2SKILL.md bodyUnder 5k tokensWhen skill triggered
3References/ filesEffectively unlimitedOn-demand via bash

Implementation Pattern:

  • SKILL.md: Overview and navigation to reference files
  • References/: Detailed specs, examples, patterns
  • Scripts/: Executable utilities (no context cost until executed)

See ./references/component-model.md for complete token budget guidelines.

Validation Workflow

Five sequential checks cover all plugin quality dimensions:

  1. Structure: File patterns, directory layout, kebab-case naming
  2. Manifest: plugin.json required fields and schema compliance
  3. Frontmatter: YAML frontmatter in components, third-person descriptions
  4. Tool Invocations: Anti-pattern detection (implicit vs explicit tool calls)
  5. Token Budget: Progressive disclosure compliance (under 5k tokens for SKILL.md)

Run validation with -v flag for verbose output showing all passing checks.

See ./references/validation-checklist.md for complete criteria.

Requirement Levels (RFC 2119)

Plugin documentation uses RFC 2119 requirement levels:

  • MUST / MUST NOT: Absolute requirement or prohibition
  • SHOULD / SHOULD NOT: Recommended practice with known exceptions
  • MAY: Truly optional

See ./references/rfc-2119.md for complete RFC 2119 specification.

Critical Patterns

Tool Invocation Rules

ToolStyleExample
Read, Write, Edit, Glob, GrepImplicit"Find files matching..."
BashImplicit"Run git status"
TaskImplicit"Launch plugin-name:agent-name agent"
SkillExplicit"Load plugin-name:skill-name skill using the Skill tool"
TaskCreateExplicit"Use TaskCreate tool to track progress"
AskUserQuestionExplicit"Use AskUserQuestion tool to [action]"
MCP ToolsImplicit"Query the database for user records"

Qualified names: MUST use plugin-name:component-name format for plugin components.

allowed-tools: NEVER use bare Bash - always use filters like Bash(git:*).

Inline Bash: Use inline syntax (exclamation + backtick + command + backtick) for dynamic context.

MCP Tool Invocation: Use natural language to describe intent — Claude automatically identifies the appropriate MCP tool. Never specify exact MCP tool names like mcp__server__tool in skill content.

See ./references/tool-invocations.md for complete patterns and anti-patterns. See ./references/mcp-patterns.md for MCP-specific invocation patterns.

Skill Frontmatter (Official Best Practices)

Required fields:

  • name: Max 64 chars, lowercase letters/numbers/hyphens only
  • description: Max 1024 chars. MUST use third-person voice with specific trigger phrases.

Description Best Practices:

RequirementDescription
PersonThird-person only ("This skill should be used when...")
Structure[What it does]. Use when [scenario 1], [scenario 2], or [user phrases].
PurposeSkill discovery - Claude uses this to select from 100+ skills
Trigger phrasesInclude specific user phrases like "validate plugin", "check frontmatter"

Additional fields are supported but affect progressive disclosure alignment.

See ./references/components/skills.md for complete frontmatter specification.

Agent Frontmatter

Required fields:

  • name: 3-50 chars, kebab-case
  • model: inherit, sonnet, opus, or haiku
  • color: blue, cyan, green, yellow, magenta, or red
  • <example> blocks: 2-4 required for router-friendliness
  • isolation: worktree: Optional — enables automatic git worktree isolation for parallel execution

Field order: name → description → model/color/skills/tools/isolation → <example> blocks → closing ---. Fields placed after <example> blocks are not parsed as YAML.

See ./references/components/agents.md for complete agent design guidelines including CO-STAR framework.

Task Management

Tasks with 3+ distinct steps, multi-file work, or sequential dependencies warrant TaskCreate. Single-file edits and 1-2 step operations do not.

Core Requirements:

  • Dual form naming: subject ("Run tests") + activeForm ("Running tests")
  • Mark in_progress BEFORE starting, completed AFTER finishing
  • Only mark completed when FULLY done

See ./references/task-management.md for complete patterns and examples.

MCP Server Configuration

MCP servers are configured in .mcp.json at plugin root or inline in plugin.json under mcpServers. Three transport types are supported: stdio (local CLI tools), http (remote APIs, most widely supported), and sse (real-time streaming).

NEVER hardcode secrets — always use ${ENV_VAR} syntax.

See ./references/mcp-patterns.md for complete MCP integration patterns. See ./references/components/mcp-servers.md for component configuration details.

Hook Configuration

Hook events cover the full session lifecycle: PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, SessionStart, SessionEnd, PreCompact. Three hook types are available: command, prompt, and agent.

See ./references/components/hooks.md for complete hook patterns including AI-native structured output.

Agent Teams vs Subagents

Subagents are isolated, single-direction sub-processes returning results to the caller. Agent Teams are multiple independent sessions sharing a task list with direct peer-to-peer communication — suited for parallel investigation, multi-module features, and competing hypotheses.

SubagentsAgent Teams
ContextReturns to callerFully independent
CommunicationTo main agent onlyDirect peer-to-peer
Token costLower (summarized)Higher (full instances)

Agent Teams are experimental. Enable with export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.

See ./references/agent-teams.md for complete guide and ./references/parallel-execution.md for parallel coordination patterns.

Directory Structure

Standard Layout:

plugin-name/
├── .claude-plugin/plugin.json    # Manifest (declare components here)
├── skills/                       # Agent Skills (RECOMMENDED)
│   └── skill-name/
│       ├── SKILL.md
│       └── references/
├── commands/                     # Legacy commands (optional)
├── agents/                       # Subagent definitions
├── hooks/hooks.json              # Hook configuration
├── .mcp.json                     # MCP server definitions
├── .lsp.json                     # LSP server configurations
└── scripts/                      # Executable scripts

Critical Rules:

  • Components live at plugin root, NOT inside .claude-plugin/
  • Scripts MUST be executable with shebangs
  • Scripts MUST use ${CLAUDE_PLUGIN_ROOT} for paths
  • All paths MUST be relative and start with ./

See ./references/directory-structure.md for complete layout guidelines.

Reference Directory

Validation & Quality

  • ./references/validation-checklist.md - Complete quality checklist
  • ./references/rfc-2119.md - Requirement levels (MUST/SHOULD/MAY)

Component Implementation

  • ./references/component-model.md - Component types, selection criteria, token budgets
  • ./references/components/skills.md - Skill structure, frontmatter, progressive disclosure
  • ./references/components/agents.md - Agent design, CO-STAR framework, example blocks
  • ./references/components/commands.md - Command frontmatter, dynamic context
  • ./references/components/hooks.md - Hook events, types, AI-native patterns, templates
  • ./references/components/mcp-servers.md - MCP configuration, stdio/http/sse
  • ./references/components/lsp-servers.md - LSP setup, binary requirements

Configuration & Integration

  • ./references/directory-structure.md - Plugin layout, naming conventions
  • ./references/manifest-schema.md - plugin.json schema, required fields
  • ./references/mcp-patterns.md - MCP transport types, security best practices

Development Patterns

  • ./references/tool-invocations.md - Tool usage patterns and anti-patterns
  • ./references/tool-design-philosophy.md - Principles for designing tools that work with Claude's strengths
  • ./references/task-management.md - TaskCreate patterns, dual-form naming
  • ./references/cli-commands.md - CLI commands for plugin management

Advanced Topics

  • ./references/agent-teams.md - Parallelizable tasks, multi-perspective analysis
  • ./references/parallel-execution.md - Parallel agent coordination patterns
  • ./references/debugging.md - Common issues, error messages, troubleshooting

平台分布

Claude Code

32.12%
按下载量换算110

OpenCode

24.11%
按下载量换算83

Gemini CLI

17.09%
按下载量换算59

Antigravity

13.81%
按下载量换算48

windsurf

7.67%
按下载量换算26

Codex

3.27%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills