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.
Use before retrying any command, tool, or approach that failed once, and immediately after discovering any OS/shell/tool-specific quirk — checks and updates a stable cross-project quirks file so…
$ npx skills add ccplugins/awesome-claude-code-plugins --skill environment-memory -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ccplugins/awesome-claude-code-plugins environment-memory --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/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .claude/skills/environment-memory && 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 "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .claude/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memoryType 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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ccplugins/awesome-claude-code-plugins environment-memory --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .agents/skills/environment-memory && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .agents/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ccplugins/awesome-claude-code-plugins environment-memory --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .cursor/skills/environment-memory && 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 "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .cursor/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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/ccplugins/awesome-claude-code-plugins.git --path plugins/craftsman/skills/environment-memory--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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ccplugins/awesome-claude-code-plugins environment-memory --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .gemini/skills/environment-memory && 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 "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .gemini/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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 ccplugins/awesome-claude-code-plugins environment-memoryInstalls 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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .github/skills/environment-memory && 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 "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .github/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ccplugins/awesome-claude-code-plugins environment-memory --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ccplugins/awesome-claude-code-plugins.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/craftsman/skills/environment-memory .opencode/skills/environment-memory && 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 "environment-memory" agent skill from https://github.com/ccplugins/awesome-claude-code-plugins/tree/main/plugins/craftsman/skills/environment-memory into .opencode/skills/environment-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "environment-memory", 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.
environment-memoryUse before retrying any command, tool, or approach that failed once, and immediately after discovering any OS/shell/tool-specific quirk — checks and updates a stable cross-project quirks file so…
Environment Memory is an agent skill from ccplugins/awesome-claude-code-plugins. Use before retrying any command, tool, or approach that failed once, and immediately after discovering any OS/shell/tool-specific quirk — checks and updates a stable cross-project quirks file so failed approaches are never silently repeated.
Its SKILL.md is about 820 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: Awesome Claude Code plugins — a curated list of slash commands, subagents, MCP servers, and hooks for Claude Code. The licence is Apache-2.0.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 5bd4f16. 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.
No scripts in the folder and no shell commands in SKILL.md.
From 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 no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Environment Memory loads about 823 tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 435 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 ccplugins/awesome-claude-code-plugins at commit 5bd4f16, republished under its Apache-2.0 licence (© ccplugins). 435 words, ~823 tokens.
.claude/skills/environment-memory/SKILL.md (or your agent's skills folder).Trial-and-error against the same broken assumption — "maybe bash works this time" — wastes turns and tokens without new information. Any OS, shell, or tool quirk discovered once should be usable forever after, in every project, not just the one where it was found.
Core principle: a quirk discovered once should never be rediscovered by trial and error.
~/.claude/craftsman-memory/environment-quirks.md — deliberately outside this plugin's own
install directory, so a plugin update never wipes it. Deliberately outside any single project's
memory folder too, since quirks like "hooks run via CMD.exe not bash on this machine" apply
everywhere, not just to the project where they were found.
Format: flat, append-only, one line per entry —
<symptom> → <fix> (discovered: <date>, context: <where>)No YAML frontmatter, no index, no categorization — this file is meant to be read in full whenever it's relevant, so keep it short and skimmable rather than structured for querying (token-cheap by design).
~/.claude/craftsman-memory/environment-quirks.md for a matching symptom before trying
the same thing a second way, or a different way that might hit the same underlying constraint
(e.g. "PowerShell syntax works where bash syntax silently no-ops" applies to any bash-syntax
attempt, not just the exact command that first failed).KNOWN_ISSUES.md for the project instead).~/.claude/craftsman-memory/ folder is a valid Obsidian vault as-is (plain
markdown, no export step). Users can Open folder as vault on it to get search, backlinks, and
graph view over the quirks log while Claude Code keeps writing the same files. Nothing here needs
to change to support that — just keep the plain-markdown format intact.© ccplugins, Apache-2.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 plugins/craftsman/skills/environment-memory of ccplugins/awesome-claude-code-plugins.
Open the folder on GitHubat commit 5bd4f16
Environment Memory 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 |
|---|---|---|---|---|---|---|
| Environment Memory this skillccplugins/awesome-claude-code-plugins | 967 | — | ~823 | Automated safety check: Pass | Apache-2.0 | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 37k | 11 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Plugin Settings Patternanthropics/claude-plugins-official | 37k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Mole Bug Patternstw93/Mole | 69k | — | ~2k | Automated safety check: Pass | GPL-3.0 | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| CCPM Project Managementautomazeio/ccpm | 8.4k | — | ~1.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.
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.
charmbracelet/crush
Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.
ccplugins/awesome-claude-code-plugins
Run structured AI meetings for plans, product ideas, technical designs, business decisions, feature proposals, and strategy choices.
ccplugins/awesome-claude-code-plugins
Bootstrap a new FastAPI backend with async SQLAlchemy 2.0, asyncpg, Alembic, Pydantic v2, and no deprecated APIs.
ccplugins/awesome-claude-code-plugins
Bootstrap a new Flutter mobile app with clean architecture, Riverpod, FVM-pinned SDK, current packages, and no deprecated APIs.
ccplugins/awesome-claude-code-plugins
Bootstrap a new Next.js (App Router, TypeScript) web app with current packages and no deprecated APIs.
ccplugins/awesome-claude-code-plugins
Write up a coding session for a non-technical stakeholder — the context, what was built, and the engineering reasoning behind it — the way a senior engineer briefs a product manager who does not…
ccplugins/awesome-claude-code-plugins
Aggiunge a un sito/app un agente di difesa che rileva e blocca richieste malevole (SQL injection, XSS, path traversal, brute force, bot) con rate limiting, blocklist IP e modalità lockdown che…
Works with
Use before retrying any command, tool, or approach that failed once, and immediately after discovering any OS/shell/tool-specific quirk — checks and updates a stable cross-project quirks file so…. Environment Memory is an agent skill from ccplugins/awesome-claude-code-plugins. Use before retrying any command, tool, or approach that failed once, and immediately after discovering any OS/shell/tool-specific quirk — checks and updates a stable cross-project quirks file so failed approaches are never silently repeated.
Run `npx skills add ccplugins/awesome-claude-code-plugins --skill environment-memory -a claude-code`. Or copy the skill folder (plugins/craftsman/skills/environment-memory in ccplugins/awesome-claude-code-plugins) into .claude/skills/environment-memory in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ccplugins/awesome-claude-code-plugins --skill environment-memory -a codex`. Or copy the skill folder (plugins/craftsman/skills/environment-memory in ccplugins/awesome-claude-code-plugins) into .agents/skills/environment-memory 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 ccplugins/awesome-claude-code-plugins --skill environment-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/environment-memory, .gemini/skills/environment-memory, .github/skills/environment-memory and .opencode/skills/environment-memory in your project.
SKILL.md names no scripts, command-line tools or credentials: Environment Memory is instructions for the agent only.
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.
Environment Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 823 tokens (SKILL.md is roughly 3.3k 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 Environment Memory: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Plugin Settings Pattern (anthropics/claude-plugins-official, 37k stars), Mole Bug Patterns (tw93/Mole, 69k 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.
ccplugins (a GitHub organization) maintains it in ccplugins/awesome-claude-code-plugins, which has 967 GitHub stars. The repository holds 68 skills in this directory. The repository was last updated on August 12, 2026.
Source: ccplugins/awesome-claude-code-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.