smithery/microsoft

skill-with-hooks

Example skill demonstrating embedded hooks for validation and logging

Installation

$ npx skills add smithery/microsoft --skill skill-with-hooks

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/microsoft · top by installs.

npx skills add smithery/microsoft

Browse all from smithery/microsoft

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
LicenseMIT
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,541 B
  • docs SUMMARY.md 93 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Skill With Hooks Example

This is an example skill that demonstrates how to embed Claude Code-compatible hooks directly in a skill's frontmatter.

Purpose

When this skill is loaded, its hooks become active for the session:

  1. PreToolUse (Bash): Validates bash commands before execution
  2. PreToolUse (all tools): Logs all tool invocations
  3. PostToolUse (all tools): Logs tool results

Hook Scripts

The hooks reference scripts in the ./hooks/ directory relative to this skill:

  • validate-bash.sh - Checks bash commands for dangerous patterns
  • log-tool-use.sh - Logs tool name and parameters
  • log-tool-result.sh - Logs tool execution results

Usage

Load this skill to activate its hooks:

load_skill(skill_name="skill-with-hooks")

The hooks will remain active until the session ends.

Testing

This skill is used to validate the skill-scoped hooks integration between amplifier-module-tool-skills and amplifier-module-hooks-shell.