Install
$ agentstack add skill-hasna-skills-hook ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Hook Creation Skill
Creates Claude Code hook scaffolds following a standardized pattern. Run hook in any directory to generate a complete hook project.
Quick Start
# Install globally
bun add -g git+ssh://git@github.com/example/hook.git
# Create a hook (interactive)
hook
# Or with a name directly
hook my-hook
What Gets Created
Running hook creates:
hook-/
├── src/
│ ├── index.ts # CLI entry point
│ ├── commands/
│ │ ├── run.ts # Main hook logic
│ │ ├── setup.ts # Setup command
│ │ ├── test.ts # Manual testing
│ │ └── config.ts # Configuration management
│ ├── core/
│ │ └── .ts # Hook-specific logic (implement here)
│ └── utils/
│ ├── logger.ts # Configurable logging
│ └── claude.ts # Claude config helpers
├── hook.config.json # Self-describing metadata
├── package.json
├── tsconfig.json
├── bunfig.toml
├── README.md
└── HOOK.md
Usage
hook [name] [options]
Options:
--event PreToolUse, PostToolUse, or Stop (default: PreToolUse)
--matcher Tool matcher: Bash, Write, Edit, * (default: *)
--output Output directory (default: current)
--help Show help
Hook Events
| Event | When | Can Block | |-------|------|-----------| | PreToolUse | Before tool executes | Yes | | PostToolUse | After tool executes | No | | Stop | When agent stops | No |
After Creating
cd hook-bun install- Edit
src/core/.ts- implement your logic - Test:
bun run src/index.ts test - Push to GitHub
- Install:
bun add -g git+ssh://git@github.com/example/hook-.git - Setup:
hook- setup
Hook Output Format
{ "decision": "allow" } // Allow operation
{ "decision": "block", "reason": "Why blocked" } // Block (PreToolUse only)
{ "decision": "error", "message": "Error msg" } // Error occurred
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: hasna
- Source: hasna/skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.