Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

extension-authoring扩展创作

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

998

周安装

42

GitHub Stars

12

下载量

349
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/scientiacapital/skills --skill extension-authoring

简介

extension-authoring 提供创建 Claude 扩展的核心方法论与 XML 结构规范。

  • 涵盖 SKILL.md 编写、钩子事件、斜杠命令与子代理等四类扩展类型。
  • 强调纯 XML 结构与 YAML 元数据格式,确保跨平台兼容性。
  • 需遵循成功标准定义与模块化设计原则,避免耦合度过高。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

  1. Skills - Modular capabilities in SKILL.md files that provide domain expertise
  2. Hooks - Event-driven automation that executes on tool use and session events
  3. Slash Commands - Reusable prompts triggered with /command-name syntax
  4. Subagents - Specialized Claude instances for delegated tasks

All four extension types share core principles: pure XML structure, YAML frontmatter, and clear success criteria. This skill teaches you to create effective extensions following best practices.

  1. Skill - SKILL.md file for domain expertise
  2. Hook - Event-driven automation (PreToolUse, PostToolUse, Stop, etc.)
  3. Slash Command - Reusable prompt with /command-name
  4. Subagent - Specialized agent for delegated tasks
  5. Guidance - Help deciding which extension type to use

Respond with a number or describe what you want to build.

After reading the reference, follow its workflow exactly.

<decision_tree> Which extension type should I use?

Is it triggered by specific Claude Code events?
  (tool use, session start/end, user prompt submit)
    YES --> Hook

Is it a reusable prompt the user invokes with /command-name?
    YES --> Slash Command

Is it an isolated task that runs autonomously without user interaction?
    YES --> Subagent

Is it domain knowledge or workflow guidance Claude loads on demand?
    YES --> Skill

Quick decision matrix:

NeedExtension Type
Validate commands before executionHook (PreToolUse)
Auto-format code after editsHook (PostToolUse)
Desktop notification when input neededHook (Notification)
Reusable git commit workflowSlash Command
Code review checklistSlash Command
Delegated research taskSubagent
Autonomous test writingSubagent
API integration knowledgeSkill
Multi-step workflow guidanceSkill
</decision_tree>

<shared_principles> These principles apply to ALL Claude Code extension types:

<xml_structure> Use pure XML structure. Remove ALL markdown headings from body content.

<objective>What it does</objective>
<workflow>How to do it</workflow>
<success_criteria>How to know it worked</success_criteria>

Keep markdown formatting WITHIN content (bold, lists, code blocks).

Why XML?

  • Semantic meaning for Claude (not just visual formatting)
  • Unambiguous section boundaries
  • Token efficient (~15 tokens vs ~20 for markdown headings)
  • Reliable parsing and progressive disclosure </xml_structure>

<yaml_frontmatter> All extensions require YAML frontmatter:

---
name: extension-name       # lowercase-with-hyphens
description: What it does and when to use it (third person)
---

Name conventions: create-*, manage-*, setup-*, generate-*

Description rules:

  • Third person (never "I" or "you")
  • Include WHAT it does AND WHEN to use it
  • Maximum 1024 characters </yaml_frontmatter>
  • Assume Claude is smart
  • Challenge every piece of content: "Does this justify its token cost?"
  • Provide default approach with escape hatch, not a list of options
  • Keep main files under 500 lines, split to reference files

<success_criteria> Every extension should define clear completion criteria:

<success_criteria>
- Specific measurable outcome 1
- Specific measurable outcome 2
- How to verify it worked
</success_criteria>

</success_criteria> </shared_principles>

<quick_reference> File locations:

ExtensionProject LocationUser Location
Skill.claude/skills/~/.claude/skills/
Hook.claude/hooks.json~/.claude/hooks.json
Slash Command.claude/commands/~/.claude/commands/
Subagent.claude/agents/~/.claude/agents/

Minimal examples:

<skill_example>

---
name: process-pdfs
description: Extract text from PDF files. Use when working with PDFs.
---

<objective>Extract text from PDF files using pdfplumber.</objective>

<quick_start>

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


</quick_start>

<success_criteria>Text extracted without errors.</success_criteria>

</skill_example>

<hook_example>

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude needs input\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

</hook_example>

<command_example>

---
description: Create a git commit
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
---

<objective>Create a git commit for current changes.</objective>

<context>
Current status: ! `git status`
Changes: ! `git diff HEAD`
</context>

<process>
1. Review changes
2. Stage relevant files
3. Create commit following repository conventions
</process>

<success_criteria>Commit created successfully.</success_criteria>

</command_example>

<subagent_example>

---
name: code-reviewer
description: Reviews code for quality and security. Use after code changes.
tools: Read, Grep, Glob, Bash
model: sonnet
---

<role>
You are a senior code reviewer focused on quality and security.
</role>

<workflow>
1. Read modified files
2. Identify issues
3. Provide specific feedback with file:line references
</workflow>

<constraints>
- NEVER modify code, only review
- ALWAYS provide actionable feedback
</constraints>

</subagent_example> </quick_reference>

<reference_index> Detailed guides:

ReferenceContent
reference/skills.mdSKILL.md structure, router pattern, progressive disclosure
reference/hooks.mdHook types, matchers, input/output schemas, examples
reference/commands.mdSlash command YAML, arguments, dynamic context
reference/subagents.mdAgent configuration, execution model, orchestration
</reference_index>

<anti_patterns> Common mistakes across all extension types:

<good>Using XML tags instead</good>

<success_criteria> A well-authored Claude Code extension has:

  • Valid YAML frontmatter with descriptive name and description
  • Pure XML structure (no markdown headings in body)
  • Clear objective/purpose statement
  • Defined success criteria or completion verification
  • Appropriate level of detail (not over-engineered)
  • Real-world testing and iteration
  • Documentation in third person </success_criteria>

Emit Outcome Sidecar

As the final step, write to ~/.claude/skill-analytics/last-outcome-extension-authoring.json:

{"ts":"[UTC ISO8601]","skill":"extension-authoring","version":"1.1.0","variant":"default",
 "status":"[success|partial|error]","runtime_ms":[estimated ms from start],
 "metrics":{"extensions_created":[n],"extension_type":"[skill|hook|command|subagent]"},
 "error":null,"session_id":"[YYYY-MM-DD]"}

Use status "partial" if some stages failed but results were produced. Use "error" only if no output was generated.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

26.76%
按下载量换算93

Antigravity

23.78%
按下载量换算83

Gemini CLI

20.56%
按下载量换算72

Codex

14.08%
按下载量换算49

OpenCode

9.21%
按下载量换算32

windsurf

3.88%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills