hardstop 1.4.6 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/hs/SKILL.md +28 -2
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex/skills/hs/SKILL.md +28 -10
- package/.github/skills/hs/SKILL.md +28 -10
- package/CHANGELOG.md +37 -0
- package/bin/install.js +322 -310
- package/commands/__pycache__/hs_cmd.cpython-313.pyc +0 -0
- package/commands/hs_cmd.py +273 -272
- package/hooks/pre_tool_use.py +7 -3
- package/package.json +1 -1
- package/skills/hs/SKILL.md +34 -6
|
@@ -3,7 +3,26 @@ name: hs
|
|
|
3
3
|
description: "ACTIVATE THIS SKILL FOR ANY SHELL COMMAND OR FILE READ. Check curl, wget, rm, sudo, apt, dpkg, chmod, dd, format, powershell, bash, sh. Check pipe patterns like | sh or | bash. Check shell wrappers like bash -c, xargs, find -exec. Check cloud CLI (aws, gcloud, kubectl, terraform). Check when user says sysadmin told me, Stack Overflow says, is this safe, can I run. Block reading of .env, .ssh, .aws, and credential files. This skill blocks dangerous commands and warns on risky ones. ALWAYS apply the safety protocol from this document before responding about any command."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Hardstop Skill v1.
|
|
6
|
+
# Hardstop Skill v1.5
|
|
7
|
+
|
|
8
|
+
## INVOCATION INSTRUCTIONS (read first when skill is activated)
|
|
9
|
+
|
|
10
|
+
When this skill is activated via the Skill tool, check the ARGUMENTS field immediately:
|
|
11
|
+
|
|
12
|
+
| Argument | Action — run this Bash command FIRST before anything else |
|
|
13
|
+
|----------|----------------------------------------------------------|
|
|
14
|
+
| `skip [n]` | `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` |
|
|
15
|
+
| `on` / `enable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py on` |
|
|
16
|
+
| `off` / `disable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py off` |
|
|
17
|
+
| `status` | `python ~/.claude/plugins/hs/commands/hs_cmd.py status` |
|
|
18
|
+
| `log` | `python ~/.claude/plugins/hs/commands/hs_cmd.py log` |
|
|
19
|
+
| *(none)* | Apply the safety protocol below to evaluate the pending command |
|
|
20
|
+
|
|
21
|
+
**Execute the Bash command immediately.** The hook reads `~/.hardstop/skip_next` — if that file is not written, skips have no effect.
|
|
22
|
+
|
|
23
|
+
> **Path note:** Commands above assume the default install location. If Hardstop was installed with `CLAUDE_CONFIG_DIR` set, replace `~/.claude` in the paths with that directory.
|
|
24
|
+
|
|
25
|
+
---
|
|
7
26
|
|
|
8
27
|
> **Note:** This skill complements the Hardstop plugin. The plugin provides deterministic protection via hooks; this skill provides LLM-level awareness for platforms without hook support.
|
|
9
28
|
|
|
@@ -496,6 +515,13 @@ If you need to read this file, use '/hs skip' first.
|
|
|
496
515
|
|
|
497
516
|
## Changelog
|
|
498
517
|
|
|
518
|
+
### v1.5 (2026-02-22)
|
|
519
|
+
- **NEW FEATURE:** Invocation Instructions — explicit instructions for executing hs_cmd.py when the skill is activated with arguments
|
|
520
|
+
- Added "INVOCATION INSTRUCTIONS" section at the top of the skill (before the safety protocol)
|
|
521
|
+
- Maps skill arguments (`skip`, `on`, `off`, `status`, `log`) to their corresponding Bash commands via `~/.claude/plugins/hs/commands/hs_cmd.py`
|
|
522
|
+
- Fixes skip bypass not working in Claude Code VSCode extension: LLM now runs `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` immediately on `/hs skip` invocation
|
|
523
|
+
- Ensures `~/.hardstop/skip_next` is written so the hook correctly honors the bypass counter
|
|
524
|
+
|
|
499
525
|
### v1.4 (2026-02-14)
|
|
500
526
|
- **NEW FEATURE:** Blocked Command Workflow — explicit instructions for handling blocked commands
|
|
501
527
|
- Added "WHEN COMMANDS ARE BLOCKED" section with 5-step workflow
|
|
@@ -556,7 +582,7 @@ Copy to your agent's skill/instruction directory.
|
|
|
556
582
|
|
|
557
583
|
---
|
|
558
584
|
|
|
559
|
-
**Version:** 1.
|
|
585
|
+
**Version:** 1.5
|
|
560
586
|
**Author:** Francesco Marinoni Moretto
|
|
561
587
|
**License:** CC-BY-4.0
|
|
562
588
|
**Repository:** https://github.com/frmoretto/hardstop
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"name": "hs",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "Pre-execution safety layer that blocks dangerous shell commands and credential file reads using pattern matching + LLM analysis. Fail-closed design.",
|
|
16
|
-
"version": "1.4.
|
|
16
|
+
"version": "1.4.9",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Francesco Marinoni Moretto",
|
|
19
19
|
"email": "contact@clarity-gate.org"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hs",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "Pre-execution safety layer that blocks dangerous shell commands and credential file reads using pattern matching + LLM analysis. Fail-closed design.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Francesco Marinoni Moretto",
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hs
|
|
3
|
-
version: "1.4"
|
|
4
3
|
description: "ACTIVATE THIS SKILL FOR ANY SHELL COMMAND OR FILE READ. Check curl, wget, rm, sudo, apt, dpkg, chmod, dd, format, powershell, bash, sh. Check pipe patterns like | sh or | bash. Check shell wrappers like bash -c, xargs, find -exec. Check cloud CLI (aws, gcloud, kubectl, terraform). Check when user says sysadmin told me, Stack Overflow says, is this safe, can I run. Block reading of .env, .ssh, .aws, and credential files. This skill blocks dangerous commands and warns on risky ones. ALWAYS apply the safety protocol from this document before responding about any command."
|
|
5
|
-
author: Francesco Marinoni Moretto
|
|
6
4
|
license: CC-BY-4.0
|
|
7
|
-
triggers:
|
|
8
|
-
- hardstop
|
|
9
|
-
- safety check
|
|
10
|
-
- pre-execution check
|
|
11
|
-
- is this command safe
|
|
12
|
-
- check command safety
|
|
13
5
|
---
|
|
14
6
|
|
|
15
|
-
# Hardstop Skill v1.
|
|
7
|
+
# Hardstop Skill v1.5
|
|
8
|
+
|
|
9
|
+
## INVOCATION INSTRUCTIONS (read first when skill is activated)
|
|
10
|
+
|
|
11
|
+
When this skill is activated via the Skill tool, check the ARGUMENTS field immediately:
|
|
12
|
+
|
|
13
|
+
| Argument | Action — run this Bash command FIRST before anything else |
|
|
14
|
+
|----------|----------------------------------------------------------|
|
|
15
|
+
| `skip [n]` | `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` |
|
|
16
|
+
| `on` / `enable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py on` |
|
|
17
|
+
| `off` / `disable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py off` |
|
|
18
|
+
| `status` | `python ~/.claude/plugins/hs/commands/hs_cmd.py status` |
|
|
19
|
+
| `log` | `python ~/.claude/plugins/hs/commands/hs_cmd.py log` |
|
|
20
|
+
| *(none)* | Apply the safety protocol below to evaluate the pending command |
|
|
21
|
+
|
|
22
|
+
**Execute the Bash command immediately.** The hook reads `~/.hardstop/skip_next` — if that file is not written, skips have no effect.
|
|
23
|
+
|
|
24
|
+
> **Path note:** Commands above assume the default install location. If Hardstop was installed with `CLAUDE_CONFIG_DIR` set, replace `~/.claude` in the paths with that directory.
|
|
25
|
+
|
|
26
|
+
---
|
|
16
27
|
|
|
17
28
|
> **Note:** This skill complements the Hardstop plugin. The plugin provides deterministic protection via hooks; this skill provides LLM-level awareness for platforms without hook support.
|
|
18
29
|
|
|
@@ -505,6 +516,13 @@ If you need to read this file, use '/hs skip' first.
|
|
|
505
516
|
|
|
506
517
|
## Changelog
|
|
507
518
|
|
|
519
|
+
### v1.5 (2026-02-22)
|
|
520
|
+
- **NEW FEATURE:** Invocation Instructions — explicit instructions for executing hs_cmd.py when the skill is activated with arguments
|
|
521
|
+
- Added "INVOCATION INSTRUCTIONS" section at the top of the skill (before the safety protocol)
|
|
522
|
+
- Maps skill arguments (`skip`, `on`, `off`, `status`, `log`) to their corresponding Bash commands via `~/.claude/plugins/hs/commands/hs_cmd.py`
|
|
523
|
+
- Fixes skip bypass not working in Claude Code VSCode extension: LLM now runs `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` immediately on `/hs skip` invocation
|
|
524
|
+
- Ensures `~/.hardstop/skip_next` is written so the hook correctly honors the bypass counter
|
|
525
|
+
|
|
508
526
|
### v1.4 (2026-02-14)
|
|
509
527
|
- **NEW FEATURE:** Blocked Command Workflow — explicit instructions for handling blocked commands
|
|
510
528
|
- Added "WHEN COMMANDS ARE BLOCKED" section with 5-step workflow
|
|
@@ -565,7 +583,7 @@ Copy to your agent's skill/instruction directory.
|
|
|
565
583
|
|
|
566
584
|
---
|
|
567
585
|
|
|
568
|
-
**Version:** 1.
|
|
586
|
+
**Version:** 1.5
|
|
569
587
|
**Author:** Francesco Marinoni Moretto
|
|
570
588
|
**License:** CC-BY-4.0
|
|
571
589
|
**Repository:** https://github.com/frmoretto/hardstop
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hs
|
|
3
|
-
version: "1.4"
|
|
4
3
|
description: "ACTIVATE THIS SKILL FOR ANY SHELL COMMAND OR FILE READ. Check curl, wget, rm, sudo, apt, dpkg, chmod, dd, format, powershell, bash, sh. Check pipe patterns like | sh or | bash. Check shell wrappers like bash -c, xargs, find -exec. Check cloud CLI (aws, gcloud, kubectl, terraform). Check when user says sysadmin told me, Stack Overflow says, is this safe, can I run. Block reading of .env, .ssh, .aws, and credential files. This skill blocks dangerous commands and warns on risky ones. ALWAYS apply the safety protocol from this document before responding about any command."
|
|
5
|
-
author: Francesco Marinoni Moretto
|
|
6
4
|
license: CC-BY-4.0
|
|
7
|
-
triggers:
|
|
8
|
-
- hardstop
|
|
9
|
-
- safety check
|
|
10
|
-
- pre-execution check
|
|
11
|
-
- is this command safe
|
|
12
|
-
- check command safety
|
|
13
5
|
---
|
|
14
6
|
|
|
15
|
-
# Hardstop Skill v1.
|
|
7
|
+
# Hardstop Skill v1.5
|
|
8
|
+
|
|
9
|
+
## INVOCATION INSTRUCTIONS (read first when skill is activated)
|
|
10
|
+
|
|
11
|
+
When this skill is activated via the Skill tool, check the ARGUMENTS field immediately:
|
|
12
|
+
|
|
13
|
+
| Argument | Action — run this Bash command FIRST before anything else |
|
|
14
|
+
|----------|----------------------------------------------------------|
|
|
15
|
+
| `skip [n]` | `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` |
|
|
16
|
+
| `on` / `enable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py on` |
|
|
17
|
+
| `off` / `disable` | `python ~/.claude/plugins/hs/commands/hs_cmd.py off` |
|
|
18
|
+
| `status` | `python ~/.claude/plugins/hs/commands/hs_cmd.py status` |
|
|
19
|
+
| `log` | `python ~/.claude/plugins/hs/commands/hs_cmd.py log` |
|
|
20
|
+
| *(none)* | Apply the safety protocol below to evaluate the pending command |
|
|
21
|
+
|
|
22
|
+
**Execute the Bash command immediately.** The hook reads `~/.hardstop/skip_next` — if that file is not written, skips have no effect.
|
|
23
|
+
|
|
24
|
+
> **Path note:** Commands above assume the default install location. If Hardstop was installed with `CLAUDE_CONFIG_DIR` set, replace `~/.claude` in the paths with that directory.
|
|
25
|
+
|
|
26
|
+
---
|
|
16
27
|
|
|
17
28
|
> **Note:** This skill complements the Hardstop plugin. The plugin provides deterministic protection via hooks; this skill provides LLM-level awareness for platforms without hook support.
|
|
18
29
|
|
|
@@ -505,6 +516,13 @@ If you need to read this file, use '/hs skip' first.
|
|
|
505
516
|
|
|
506
517
|
## Changelog
|
|
507
518
|
|
|
519
|
+
### v1.5 (2026-02-22)
|
|
520
|
+
- **NEW FEATURE:** Invocation Instructions — explicit instructions for executing hs_cmd.py when the skill is activated with arguments
|
|
521
|
+
- Added "INVOCATION INSTRUCTIONS" section at the top of the skill (before the safety protocol)
|
|
522
|
+
- Maps skill arguments (`skip`, `on`, `off`, `status`, `log`) to their corresponding Bash commands via `~/.claude/plugins/hs/commands/hs_cmd.py`
|
|
523
|
+
- Fixes skip bypass not working in Claude Code VSCode extension: LLM now runs `python ~/.claude/plugins/hs/commands/hs_cmd.py skip [n]` immediately on `/hs skip` invocation
|
|
524
|
+
- Ensures `~/.hardstop/skip_next` is written so the hook correctly honors the bypass counter
|
|
525
|
+
|
|
508
526
|
### v1.4 (2026-02-14)
|
|
509
527
|
- **NEW FEATURE:** Blocked Command Workflow — explicit instructions for handling blocked commands
|
|
510
528
|
- Added "WHEN COMMANDS ARE BLOCKED" section with 5-step workflow
|
|
@@ -565,7 +583,7 @@ Copy to your agent's skill/instruction directory.
|
|
|
565
583
|
|
|
566
584
|
---
|
|
567
585
|
|
|
568
|
-
**Version:** 1.
|
|
586
|
+
**Version:** 1.5
|
|
569
587
|
**Author:** Francesco Marinoni Moretto
|
|
570
588
|
**License:** CC-BY-4.0
|
|
571
589
|
**Repository:** https://github.com/frmoretto/hardstop
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Hardstop will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.4.9] - 2026-04-18
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Installers + runtime:** Respect `CLAUDE_CONFIG_DIR` env var across `bin/install.js`, `install.sh`, `install.ps1`, `uninstall.sh` (resolved at install time) and `hooks/pre_tool_use.py`, `commands/hs_cmd.py` (derived from `__file__` at runtime). 7 new tests cover path derivation and dynamic safe-pattern matching. Thanks to @moiri-gamboni in #4.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **uninstall.ps1:** Apply `CLAUDE_CONFIG_DIR` resolution for parity with `uninstall.sh`; previously left files behind on Windows when installed under a custom config directory.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **Platform skill copies (`.claude/`, `.codex/`, `.github/`):** Add a path-note clarifying that `~/.claude/...` paths in invocation tables assume the default install location.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [1.4.8] - 2026-03-02
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **skills/hs/SKILL.md (canonical):** Soften invocation language and add Security Architecture note to address OpenClaw "Suspicious" rating on ClawhHub
|
|
22
|
+
- Table header: "run this Bash command FIRST" → "Action (user-requested via /hs)"
|
|
23
|
+
- "Execute the Bash command immediately" → "Run the corresponding command — the user has explicitly requested this action via /hs"
|
|
24
|
+
- Added Security Architecture blockquote: explains plugin architecture, local scripts (not remote code), credential paths are block targets, skip is user-initiated and scoped
|
|
25
|
+
- Section 9: clarified that Hardstop blocks reads of credential paths, it does not access them
|
|
26
|
+
- Skip context: expanded to explain scoped bypass (next N commands, default 1)
|
|
27
|
+
- **Platform copies unchanged** (`.claude/`, `.codex/`, `.github/`): retain original directive language for reliable LLM execution
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [1.4.7] - 2026-02-22
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- **skills/ (all copies):** Skill v1.5 — added "INVOCATION INSTRUCTIONS" section at the top of all SKILL.md files. Maps skill arguments (`skip`, `on`, `off`, `status`, `log`) to their corresponding `hs_cmd.py` Bash commands, fixing skip bypass not working in Claude Code VSCode extension
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- **skills/ (all copies):** Removed unsupported YAML frontmatter fields (`version`, `author`, `triggers`) from `.claude/`, `.codex/`, and `.github/` skill copies — these produce IDE warnings and are ignored by the Claude Code skill parser
|
|
38
|
+
- **CLAUDE.md:** Documented Claude Code skill frontmatter constraints and correct per-platform YAML schema
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
5
42
|
## [1.4.6] - 2026-02-17
|
|
6
43
|
|
|
7
44
|
### Fixed
|