claude-code-extension-builder

claude-code-extension-builder is a skill for Claude Code from khalilbenaz/claude-skills-collection. It costs 76 tokens per session (1,941 once invoked), scanned D, original, MIT.

A guide for building Claude Code extensions such as reusable skills, event hooks, external-tool connections, and custom slash commands. It explains which extension type fits each need and shows the required skill structure.

In plain words
What is it for?
Use it to design and build Claude Code skills, hooks, MCP servers, or custom slash commands.
Why use it?
It prevents choosing the wrong extension format and provides the project rules needed for a working Claude Code addition.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to design and build Claude Code skills, hooks, MCP servers, or custom slash commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill claude-code-extension-builder
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-code-extension-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-code-extension-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/claude-code-extension-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,941 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.01941
Opus 5 $0.00038 $0.00971
Sonnet 5 $0.00015 $0.00388
Haiku 4.5 $0.00008 $0.00194

Measured 12d ago against content hash 63e482da91de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade D, and why

claude-code-extension-builder scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

**Fichier :** `.claude/settings.json` (projet) ou `~/.claude/settings.json` (global).

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `PreToolUse` + `Bash` → bloquer des commandes dangereuses (`rm -rf`).
agent-skills/claude-code-extension-builder/SKILL.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Code Extension Builder

Critères de décision — quel type d'extension créer ?

Besoin Type d'extension
Réutiliser un workflow de prompt Skill (SKILL.md)
Déclencher une action sur événement Claude Hook (.claude/settings.json)
Exposer un outil externe (DB, API, fs) Serveur MCP
Composer plusieurs skills en une commande Slash command custom

Workflow en étapes

1. Analyser le besoin

  • Identifier le workflow répétitif ou l'outil à connecter.
  • Répondre à : déclenchement automatique ou à la demande ? sortie texte, fichier, ou action ?
  • Choisir le type (tableau ci-dessus) avant toute implémentation.

2. Créer un Skill (SKILL.md)

Structure minimale obligatoire :

---
name: mon-skill                    # kebab-case, unique dans la collection
description: Une ligne, termine avec les phrases de déclenchement entre guillemets. Se déclenche avec "mot-clé A", "mot-clé B".
---

# Mon Skill

## Workflow

1. **Étape 1** — description actionnable.
2. **Étape 2** — ...

## Règles

- Règle 1 (obligatoire, concise).

Bonnes pratiques :

  • name = identifiant technique → dossier agent-skills/<category>/<name>/SKILL.md.
  • description : ≤ 2 phrases ; les triggers entre guillemets couvrent les synonymes naturels de l'utilisateur.
  • Corps : 80-180 lignes, pas de section ## Communication Rules (ajoutée automatiquement).
  • Langue : français, termes techniques en anglais.

Arborescence collection :

agent-skills/
  dev/
    mon-skill/
      SKILL.md
  devops/
    ...

3. Configurer des Hooks

Les hooks interceptent les événements Claude Code pour automatiser des actions.

Fichier : .claude/settings.json (projet) ou ~/.claude/settings.json (global).

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "echo '[hook] commande bash interceptée'"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "npx prettier --write $CLAUDE_TOOL_INPUT_FILE_PATH"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node scripts/notify-slack.js"
          }
        ]
      }
    ]
  }
}

Read the full file on GitHub · 252 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 252 lines · 76 tokens per session scan D 63e482da91de

Subscribe to this mod's changes

claude-code-extension-builder is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 18d ago), licensed MIT. It adds 76 tokens to every session and 1,941 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

explain

Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.

softspark/ai-toolkit · 34 tokens

common-sense-index-investing-bogle

Apply John Bogle index investing rules for low-cost funds, asset allocation, fees, taxes, ETFs, advisers, and buy-hold discipline.

simbajigege/book2skills · 38 tokens

finance-econ-literacy

A Korean-language guide to understanding economic indicators such as interest rates, exchange rates, inflation, GDP, employment, and trade. It explains how these figures can affect loans, savings, investments, and spending.

modu-ai/moai-cowork · 128 tokens

stock-analysis-lead

Orchestrate a US-stock investment analysis — classify sector archetype, fetch SEC filings, dispatch a tiered fan-out of six vertical equity-research agents (business model, earnings quality, balance sheet, management, industry, peer comparison) over a validated JSON findings contract, then synthesize a buy/hold/sell…

johnqtcg/awesome-skills · 229 tokens

stock-business-review

Review a US-listed company's business model and revenue structure for an equity-research workup. Covers product/service mix, customer concentration, geographic exposure, industry position, revenue-growth decomposition (organic vs acquired vs price vs volume), and information-tier discipline (which numbers are facts vs…

johnqtcg/awesome-skills · 121 tokens

stock-earnings-quality-review

Review a US-listed company's earnings quality, cash-flow integrity, and operating leverage for an equity-research workup. Covers operating cash flow vs net income drift, free cash flow trajectory, capex character (maintenance vs expansion), equity issuance / shareholder-return yield, revenue-quality signals…

johnqtcg/awesome-skills · 147 tokens