Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Rules and best practices for writing and editing mise tasks.
$ npx skills add speakeasy-api/gram --skill mise-tasks -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install speakeasy-api/gram mise-tasks --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mise-tasks .claude/skills/mise-tasks && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .claude/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasksType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add speakeasy-api/gram --skill mise-tasks -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install speakeasy-api/gram mise-tasks --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/mise-tasks .agents/skills/mise-tasks && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .agents/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add speakeasy-api/gram --skill mise-tasks -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install speakeasy-api/gram mise-tasks --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/mise-tasks .cursor/skills/mise-tasks && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .cursor/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/speakeasy-api/gram.git --path .agents/skills/mise-tasks--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add speakeasy-api/gram --skill mise-tasks -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install speakeasy-api/gram mise-tasks --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/mise-tasks .gemini/skills/mise-tasks && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .gemini/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install speakeasy-api/gram mise-tasksInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add speakeasy-api/gram --skill mise-tasks -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/mise-tasks .github/skills/mise-tasks && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .github/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add speakeasy-api/gram --skill mise-tasks -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install speakeasy-api/gram mise-tasks --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/speakeasy-api/gram.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/mise-tasks .opencode/skills/mise-tasks && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mise-tasks" agent skill from https://github.com/speakeasy-api/gram/tree/main/.agents/skills/mise-tasks into .opencode/skills/mise-tasks/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mise-tasks", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mise-tasksRules and best practices for writing and editing mise tasks.
Mise Tasks is an agent skill from speakeasy-api/gram. Rules and best practices for writing and editing mise tasks.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with Bash. The repository describes itself as: Securely scale AI usage across your organization. A single stack to Connect, Secure, Observe and Distribute agents, MCPs, and Skills within your company. The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit ad78247. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
miseruffFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mise Tasks loads about 2.9k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 1,027 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from speakeasy-api/gram at commit ad78247, republished under its AGPL-3.0 licence (© speakeasy-api). 1,027 words, ~2,913 tokens.
.claude/skills/mise-tasks/SKILL.md (or your agent's skills folder)..mise-tasks/ or a subdirectory of it..mise-tasks/start.sh corresponds to mise run start.mise-tasks/test/app.mts corresponds to mise run test:app.mise-tasks/agents/worktree/init.sh corresponds to mise run agents:worktree:initchmod +x <task> to make them executable.mise.toml to understand more about what tools and environment variables are available to support tasks.package.json has utilities for writing tasks in TypeScript more effectively.#MISE <option>=<value>.#!/usr/bin/env bash followed by a blank line without exception.gum is a really good tool for building interactive scripts if these are needed.<detail open><summary>Example</summary>
#!/usr/bin/env bash
#MISE description="An example task description"
#MISE dir="{{ config_root }}/example"
set -e
echo "Hello world"</detail>
descriptionstringA description of the task. This is used in (among other places) the help output, completions, mise run (without arguments), and mise tasks.
<detail open><summary>Example</summary>
#MISE description="Useful description here"</detail>
dependsstring | string[]Tasks that must be run before this task. This is a list of task names or aliases. Arguments can be passed to the task, e.g.: depends = ["build --release"]. If multiple tasks have the same dependency, that dependency will only be run once. mise will run whatever it can in parallel (up to --jobs) through the use of depends and related properties.
<detail open><summary>Example</summary>
#MISE depends=["test","build:go","lint:*"]</detail>
env{ [key]: string | int | bool }Environment variables specific to this task. These will not be passed to depends tasks.
<detail open><summary>Example</summary>
#MISE env.TEST_ENV_VAR="ABC"</detail>
dirstring<code v-pre>"{{ config_root }}"</code> - the directory containing mise.toml.The directory to run the task from. The most common way this is used is when you want the task to execute in the user's current directory:
<detail open><summary>Example</summary>
#MISE dir="{{ config_root }}/server"</detail>
hideboolfalseHide the task from help, completion, and other output like mise tasks. Useful for deprecated or internal tasks you don't want others to easily see.
<detail open><summary>Example</summary>
#MISE hide=true</detail>
confirmstringA message to show before running the task. This is useful for tasks that are destructive or take a long time to run. The user will be prompted to confirm before the task is run.
<detail open><summary>Example</summary>
#MISE confirm="Are you sure you want to cut a release?"</detail>
sourcesstring | string[]Files or directories that this task uses as input, if this and outputs is defined, mise will skip executing tasks where the modification time of the oldest output file is newer than the modification time of the newest source file. This is useful for tasks that are expensive to run and only need to be run when their inputs change.
The task itself will be automatically added as a source, so if you edit the definition that will also cause the task to be run.
This is also used in mise watch to know which files/directories to watch.
This can be specified with relative paths to the config file and/or with glob patterns, e.g.: src/**/*.rs. Ensure you don't go crazy with adding a ton of files in a glob though—mise has to scan each and every one to check the timestamp.
<detail open><summary>Example</summary>
#MISE sources=["go.mod", "go.sum", "**/*.{go,sql}"]</detail>
outputsstring | string[] | { auto = true }The counterpart to sources, these are the files or directories that the task will create/modify after it executes.
auto = true is an alternative to specifying output files manually. In that case, mise will touch an internally tracked file based on the hash of the task definition (stored in ~/.local/state/mise/task-outputs/<hash> if you're curious). This is useful if you want mise run to execute when sources change but don't want to have to manually touch a file for sources to work.
<detail open><summary>Example</summary>
#MISE sources=["Cargo.toml", "src/**/*.rs"]
#MISE outputs={ auto = true }</detail>
quietboolfalseSuppress mise's output for the task such as showing the command that is run, e.g.: [build] $ cargo build. When this is set, mise won't show any output other than what the script itself outputs. If you'd also like to hide even the output that the task emits, use silent.
<detail open><summary>Example</summary>
#MISE quiet=true</detail>
silentbool | "stdout" | "stderr"falseSuppress all output from the task. If set to "stdout" or "stderr", only that stream will be suppressed.
<detail open><summary>Example</summary>
#MISE silent=true</detail>
redactions <Badge type="warning" text="experimental" />string[]Redactions are a way to hide sensitive information from the output of tasks. This is useful for things like API keys, passwords, or other sensitive information that you don't want to accidentally leak in logs or other output.
A list of environment variables to redact from the output.
<detail open><summary>Example</summary>
#MISE redactions=["API_KEY", "PASSWORD"]</detail>
Running the above task will output echo [redacted] instead.
You can also specify these as a glob pattern, e.g.: redactions.env = ["SECRETS_*"].
Tasks may define inputs as flags. It is CRITICAL that you leverage flags and not implicitly rely on environment variables. You can however map environment variables to flags in the task definition. In bash tasks flags look like this:
#!/usr/bin/env bash
#MISE description="Description of the task goes here"
#USAGE flag "-u --user <user>" # one way to define a flag
#USAGE flag "--user" { # another way to define the same flag
#USAGE alias "-u"
#USAGE arg "<user>"
#USAGE }
#USAGE flag "--user" { alias "-u" hide=#true } # hide alias from docs and completions
#USAGE flag "-f --force" global=#true # global can be set on any subcommand
#USAGE flag "--file <file>" default="file.txt" # default value for flag
#USAGE flag "-v --verbose" count=#true # instead of true/false $usage_verbose is # of times
# flag was used (e.g. -vvv = 3)
#USAGE flag "--include <pattern>" var=#true # flag can be repeated (--include a --include b)
#USAGE flag "--include... <pattern>" # same as above, ellipsis on flag
#USAGE flag "--include <pattern>..." # arg is variadic (--include a b c in one invocation)
#USAGE flag "--include <pattern>" var=#true var_min=1 # at least 1 value required
#USAGE flag "--include <pattern>" var=#true var_max=5 # up to 5 values allowed
#USAGE flag "--color" negate="--no-color" default=#true # $usage_color=#true by default
# --no-color will set $usage_color=#false
#USAGE flag "--color" env="MYCLI_COLOR" # flag can be backed by an env var
#USAGE flag "--file <file>" # args named "<file>" will be completed as files
#USAGE flag "--dir <dir>" # args named "<dir>" will be completed as directories
#USAGE flag "--file <file>" required_if="--dir" # if --dir is set, --file must also be set
#USAGE flag "--file <file>" required_unless="--dir" # either --file or --dir must be present
#USAGE flag "--file <file>" overrides="--stdin" # if --file is set, previous --stdin will be ignored
#USAGE flag "--shell <shell>" {
#USAGE choices "bash" "zsh" "fish" # <shell> must be one of the choices
#USAGE }
#USAGE flag "--file <file>" long_help="longer help for --help (as oppoosed to -h)"
# this is equivalent to the above but preferred when a lot of space is needed
#USAGE flag "--file <file>" {
#USAGE long_help r#"longer help for --help (as oppoosed to -h)
#USAGE even
#USAGE more
#USAGE text
#USAGE "#
#USAGE }Many of the aspects of task configuration for bash tasks also apply to TypeScript tasks. The main things to change over:
.mise-tasks/**/*.mts must end in .mtsThe general layout of a TypeScript task should look like this:
#!/usr/bin/env node
//MISE description="Description of the task goes here"
//MISE dir="{{ config_root }}"
//USAGE flag "--out-file <file>" required=#true help="Help text for the flag goes here"
//USAGE flag "--color <color>" help="Help text for the flag goes here" { choices "red" "blue" "green" }
import assert from "node:assert";
// You may import zx to do shell-like scripting in TypeScript. It also bundles chalk for colored output.
import { $, chalk } from "zx";
// You may import clack for building interactive prompts in the terminal.
import { isCancel, confirm } from "@clack/prompts";
async function run() {
const outFilename = process.env["usage_out_file"];
assert(outFilename, "out file is required");
const color = process.env["usage_color"] || "blue";
assert(
["red", "blue", "green"].includes(color),
"color must be one of red, blue, or green",
);
// rest of task implementation goes here
}
run();Python tasks use the same #MISE/#USAGE directive syntax as bash tasks (the pound-sign comment form), typically run via uv with an inline script header.
The catch: our ruff format step (run by hk) normalizes comments to have a space after the #, which would rewrite #MISE/#USAGE into # MISE/# USAGE. mise parses those directives literally, so the rewrite silently breaks the task (the description and flags disappear). ruff has no setting to skip comment normalization on its own, so fence the directive block with # fmt: off / # fmt: on. This keeps the directives intact while ruff still formats the rest of the file.
#!/usr/bin/env -S uv run --script
# fmt: off
# ruff must not add a space after the pound sign: the #MISE/#USAGE directives
# below are parsed literally by mise and break if rewritten to "# MISE".
#MISE description="Description of the task goes here"
#USAGE flag "--out-file <file>" help="Help text for the flag goes here"
# fmt: on
# /// script
# requires-python = ">=3.11"
# ///
# rest of task implementation goes here© speakeasy-api, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/mise-tasks of speakeasy-api/gram.
Open the folder on GitHubat commit ad78247
Mise Tasks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mise Tasks this skillspeakeasy-api/gram | 272 | — | ~2.9k | Automated safety check: Pass | AGPL-3.0 | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 38k | 11 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Plugin Settings Patternanthropics/claude-plugins-official | 38k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Mole Bug Patternstw93/Mole | 70k | — | ~2k | Automated safety check: Pass | GPL-3.0 | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| E2Ecallstack/react-native-pager-view | 3.4k | 1 repos | ~2.1k | Automated safety check: Pass | MIT |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
tw93/Mole
A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
callstack/react-native-pager-view
Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.
automazeio/ccpm
Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.
speakeasy-api/gram
A skill your agent uses when automating the Gram dashboard in a browser, capturing screenshots, inspecting pages.
speakeasy-api/gram
A skill your agent uses when adding, changing, restyling, reviewing, validating, or previewing a Gram/Speakeasy transactional email, in Go or in LMX/MJML — a template<name.go, a TemplateKey…
speakeasy-api/gram
A skill your agent uses when adding, changing, or styling UI in client/admin (the Gram admin dashboard) that touches shadcn/ui — a button, dialog, table, sidebar, badge, select, tabs, tooltip, card…
speakeasy-api/gram
A skill your agent uses when adding, editing, reviewing, testing, or locating a reviewed skill distributed with the Platform MCP plugin; triggers include "Platform MCP skill", "platformmcpskills"…
speakeasy-api/gram
A skill your agent uses when changing or reviewing Gram ClickHouse schemas, migrations, queries, inserts, access principals, bootstrap SQL, Cloud compatibility, partial migration failures, or…
speakeasy-api/gram
A skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…
Works with
Rules and best practices for writing and editing mise tasks. Mise Tasks is an agent skill from speakeasy-api/gram. Rules and best practices for writing and editing mise tasks.
Run `npx skills add speakeasy-api/gram --skill mise-tasks -a claude-code`. Or copy the skill folder (.agents/skills/mise-tasks in speakeasy-api/gram) into .claude/skills/mise-tasks in your project. Claude Code loads it when a task matches its description.
Run `npx skills add speakeasy-api/gram --skill mise-tasks -a codex`. Or copy the skill folder (.agents/skills/mise-tasks in speakeasy-api/gram) into .agents/skills/mise-tasks in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add speakeasy-api/gram --skill mise-tasks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mise-tasks, .gemini/skills/mise-tasks, .github/skills/mise-tasks and .opencode/skills/mise-tasks in your project.
Going by SKILL.md and its folder, Mise Tasks needs the command-line tools its instructions call (mise and ruff) and credentials named API_KEY. Our summary lists: Python 3; A credential in API_KEY.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mise Tasks is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Mise Tasks: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Plugin Settings Pattern (anthropics/claude-plugins-official, 38k stars), Mole Bug Patterns (tw93/Mole, 70k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
speakeasy-api (a GitHub organization) maintains it in speakeasy-api/gram, which has 272 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 8, 2026.
Source: speakeasy-api/gram on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.