create-gsd-extension

create-gsd-extension is a skill for Claude Code, Codex from open-gsd/gsd-pi. It costs 101 tokens per session (1,290 once invoked), scanned A, original, MIT.

Development guidance for building GSD extensions in TypeScript. These extensions can add tools, slash commands, event handlers, custom interface components, and providers to GSD.

In plain words
What is it for?
Use it to create or modify an extension that gives the language model a new tool, adds a user command, reacts to GSD events, changes the terminal interface, or adds a provider.
Why use it?
It explains how to connect new behavior to GSD's runtime while following its required extension and output rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create or modify an extension that gives the language model a new tool, adds a user command, reacts to GSD events, changes the terminal interface, or adds a provider.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-gsd/gsd-pi/create-gsd-extension
About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,214 stars · on GitHub · opengsd.net

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 open-gsd/gsd-pi --skill create-gsd-extension
Clone the repo
git clone --depth 1 https://github.com/open-gsd/gsd-pi

Made for: Claude Code, Codex.

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 create-gsd-extension

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-gsd/gsd-pi/create-gsd-extension/github.svg)](https://agentmods.dev/skills/open-gsd/gsd-pi/create-gsd-extension)
Your own site
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/create-gsd-extension"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/create-gsd-extension/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 create-gsd-extension

Your own site · 80×15
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/create-gsd-extension"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/create-gsd-extension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 3
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00101 $0.01290
Opus 5 $0.00051 $0.00645
Sonnet 5 $0.00020 $0.00258
Haiku 4.5 $0.00010 $0.00129

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

Security

Grade A, and why

create-gsd-extension scanned grade A with 1 finding 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 10d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (templates/extension-skeleton.ts, templates/stateful-tool-skeleton.ts, templates/templates.test.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Use `pi.exec()` not `child_process` for shell commands
src/resources/skills/create-gsd-extension/SKILL.md · 94 lines

How it starts

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

<essential_principles>

Extensions are TypeScript modules that hook into GSD's runtime (built on pi). They export a default function receiving ExtensionAPI and use it to subscribe to events, register tools/commands/shortcuts, and interact with the session.

GSD extension paths (community/user-installed extensions):

  • Global: ~/.pi/agent/extensions/*.ts or ~/.pi/agent/extensions/*/index.ts
  • Project-local: .gsd/extensions/*.ts or .gsd/extensions/*/index.ts

Note: ~/.gsd/agent/extensions/ is reserved for bundled extensions synced from the gsd-pi package. Community extensions placed there are silently ignored by the loader.

The three primitives:

  1. Events — Listen and react (pi.on("event", handler)). Can block tool calls, modify messages, inject context.
  2. Tools — Give the LLM new abilities (pi.registerTool()). LLM calls them autonomously.
  3. Commands — Give users slash commands (pi.registerCommand()). Users type /mycommand.

Non-negotiable rules:

  • Use StringEnum from @gsd/pi-ai for string enum params (NOT Type.Union/Type.Literal — breaks Google's API)
  • Truncate tool output to 50KB / 2000 lines max (use truncateHead/truncateTail from @gsd/pi-coding-agent)
  • Store stateful tool state in details for branching support
  • Check signal?.aborted in long-running tool executions
  • Use pi.exec() not child_process for shell commands
  • Check ctx.hasUI before dialog methods (non-interactive modes exist)
  • Session control methods (waitForIdle, newSession, fork, navigateTree, reload) are ONLY available in command handlers — they deadlock in event handlers
  • Lines from render() must not exceed width — use truncateToWidth()
  • Use theme from callback params, never import directly
  • Strip leading @ from path params in custom tools (some models add it)

Available imports:

Package Purpose
@gsd/pi-coding-agent ExtensionAPI, ExtensionContext, Theme, event types, tool utilities, DynamicBorder, BorderedLoader, CustomEditor, highlightCode
@sinclair/typebox Type.Object, Type.String, Type.Number, Type.Optional, Type.Boolean, Type.Array
@gsd/pi-ai StringEnum (required for string enums), Type re-export
@gsd/pi-tui Text, Box, Container, Spacer, Markdown, SelectList, Input, matchesKey, Key, truncateToWidth, visibleWidth
Node.js built-ins node:fs, node:path, node:child_process, etc.

</essential_principles>

Building a new extension:

  • "Create an extension", "build a tool", "I want to add a command" → workflows/create-extension.md

Adding capabilities to an existing extension:

  • "Add a tool to my extension", "add event hook", "add custom rendering" → workflows/add-capability.md

Debugging an extension:

  • "My extension doesn't work", "tool not showing up", "event not firing" → workflows/debug-extension.md

If user intent is clear from context, skip the question and go directly to the workflow.

<reference_index> All domain knowledge in references/:

Core architecture: extension-lifecycle.md, events-reference.md API surface: extensionapi-reference.md, extensioncontext-reference.md Capabilities: custom-tools.md, custom-commands.md, custom-ui.md, custom-rendering.md Patterns: state-management.md, system-prompt-modification.md, compaction-session-control.md Infrastructure: model-provider-management.md, remote-execution-overrides.md, packaging-distribution.md, mode-behavior.md Spec: docs/extension-sdk/manifest-spec.md — manifest format, tiers, validation Testing: docs/extension-sdk/testing.md — mock patterns, test conventions SDK: docs/extension-sdk/ — the authoritative gsd-pi extension guide Gotchas: key-rules-gotchas.md </reference_index>

<workflows_index>

Workflow Purpose
create-extension.md Build a new extension from scratch
add-capability.md Add tools, commands, hooks, UI to an existing extension
debug-extension.md Diagnose and fix extension issues
</workflows_index>

Read the full file on GitHub · 94 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. 10d ago First seen · 94 lines · 101 tokens per session scan A 2cf6185595da

Subscribe to this mod's changes

create-gsd-extension is a skill published in the GitHub repository open-gsd/gsd-pi (1,214 stars, last pushed today), licensed MIT. It adds 101 tokens to every session and 1,290 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.