hooks pre-edit command (monomind)
Scanned 9/10/2026
Install to Claude Code
npx -y skills add monoes/monomind --skill monomind-monomind-hooks-pre-edit --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Monomind Monomind Hooks Pre Edit?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/monoes-monomind-monomind-hooks-pre-edit)More formats (shields.io, HTML) on the badges page.
---
description: hooks pre-edit command (monomind)
type: flow
name: monomind-monomind-hooks-pre-edit
---
# hooks pre-edit
Get context and agent suggestions before editing a file.
## Usage
```bash
npx monomind hooks pre-edit [options]
```
## Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
| `--file` | `-f` | string | `unknown` | File path to edit |
| `--operation` | `-o` | string | `update` | Edit operation: `create`, `update`, `delete`, `refactor` |
| `--context` | `-c` | string | — | Additional context about the edit |
| `--format` | — | string | — | Output format: `json` |
## Examples
```bash
# Get context before editing a file
npx monomind hooks pre-edit --file src/auth/login.ts
# With operation type
npx monomind hooks pre-edit -f src/api.ts -o refactor
# With additional context
npx monomind hooks pre-edit -f src/auth.ts -o update -c "Adding JWT refresh logic"
# JSON output for scripting
npx monomind hooks pre-edit -f src/utils.ts --format json
```
## Output
- **File context** — file type, exists/not-exists, operation
- **Suggested agents** — which agent types are best for this file
- **Related files** — files likely affected by the edit
- **Learned patterns** — matching patterns from past edits with confidence scores
- **Potential risks** — warnings about the edit
## Claude Code Integration
Typically fired automatically via `settings.json`:
```json
{
"hooks": {
"PreToolUse": [{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx monomind hooks pre-edit --file '${tool.params.file_path}'"
}]
}]
}
}
```
## MCP Tool
```javascript
mcp__monomind__hooks_pre_edit({
filePath: "src/auth/login.ts",
operation: "update",
context: "Adding JWT refresh logic",
includePatterns: true,
includeRisks: true
})
```
## See Also
- `hooks post-edit` — record edit outcome
- `hooks route` — manual agent routing
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!