guard
यह क्या करती है
यह स्किल एक साथ दो सुरक्षा जाँच चालू करती है: खतरनाक कमांड पर चेतावनी और इस पर सीमा कि फ़ाइलें किस फ़ोल्डर में बदली जा सकती हैं। यह उस व्यक्ति के लिए है जो एजेंट के काम के दौरान मज़बूत सुरक्षा चाहता है।
कब इस्तेमाल करें
- ✓जब आप चाहते हैं कि एजेंट आपके प्रोजेक्ट पर काम करते समय अधिकतम सुरक्षा में रहे।
- ✓जब आप खतरनाक कमांड की चेतावनी और फ़ोल्डर की सीमा, दोनों एक साथ चाहते हैं।
- ✓जब आप किसी ज़रूरी प्रोजेक्ट पर एजेंट को काम सौंपते हैं और गलती की गुंजाइश नहीं है।
Skill का लिंक
https://github.com/garrytan/gstack/blob/main/guard/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पूरा सुरक्षा मोड चालू कीजिए और सारे बदलाव src फ़ोल्डर के अंदर ही रखिए। कुछ भी खतरनाक करने से पहले मुझे चेतावनी दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप एक फ़ोल्डर चुनते हैं, और स्किल कमांड की चेतावनी और फ़ोल्डर की सीमा को एक साथ लागू करती है। फ़ोल्डर के बाहर के बदलाव रोके जाते हैं, और जोखिम भरी कमांड पर चेतावनी आती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
/guard — Full Safety Mode
Activates both destructive command warnings and directory-scoped edit restrictions.
This is the combination of /careful + /freeze in a single command.
Dependency note: This skill references hook scripts from the sibling /careful
and /freeze skill directories. Both must be installed (they are installed together
by the gstack setup script).
GSTACK_STATE_ROOT=$(~/.claude/skills/gstack/bin/gstack-paths --get GSTACK_STATE_ROOT); : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
mkdir -p "$GSTACK_STATE_ROOT"/analytics
echo '{"skill":"guard","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> "$GSTACK_STATE_ROOT"/analytics/skill-usage.jsonl 2>/dev/null || true
Setup
Ask the user which directory to restrict edits to. Use AskUserQuestion:
- Question: "Guard mode: which directory should edits be restricted to? Destructive command warnings are always on. Files outside the chosen path will be blocked from editing."
- Text input (not multiple choice) — the user types a path.
Once the user provides a directory path:
Set the user-selected boundary with the shared writer, which resolves a physical absolute path and serializes replacement with investigation cleanup:
bash "$HOME/.claude/skills/gstack/freeze/bin/freeze-state.sh" set "<user-provided-path>"
On helper failure, do not claim the boundary is active. Preserve the state and report recovery; never bypass the shared writer with a direct write or deletion.
Tell the user:
- "Guard mode active. Two protections are now running:"
- "1. Destructive command guard — rm -rf, DROP TABLE, force-push, etc. warn before executing (overridable); catastrophic shapes (recursive delete of / or ~, force-push to the default branch) are hard-denied"
- "2. Edit boundary — file edits restricted to
<path>/. Edits outside this directory are blocked." - "To remove the persistent edit boundary, run
/unfreeze. Ending the session stops its hooks but does not delete that boundary."
What's protected
See /careful for the full list of destructive command patterns and safe exceptions.
See /freeze for how edit boundary enforcement works.
अक्सर पूछे जाने वाले सवाल
पूरे सुरक्षा मोड में क्या शामिल है?
खतरनाक कमांड की चेतावनी के साथ, आपके चुने फ़ोल्डर के बाहर फ़ाइल बदलावों पर रोक।
क्या चेतावनियाँ हमेशा चालू रहती हैं?
हाँ। विवरण के अनुसार इस मोड में खतरनाक कमांड की चेतावनियाँ हमेशा चालू रहती हैं।
क्या इसके लिए दूसरी स्किल्स चाहिए?
हाँ। यह दो सहायक स्किल्स की हुक स्क्रिप्ट इस्तेमाल करती है, जो साथ में इंस्टॉल होती हैं।
जानकारी
लेखक का मूल विवरण
Full safety mode: destructive command warnings + directory-scoped edits. (gstack)
repo: garrytan/gstack
लोकप्रियता
- GitHub स्टार
- 139k
- रैंकिंग में स्थान
- #705
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
autoplan
139kआपके एजेंट को एक ही रन में प्रोडक्ट, डिज़ाइन, इंजीनियरिंग और डेवलपर अनुभव के नज़रिए से योजना की समीक्षा करने में मदद करती है।
benchmark
139kआपके एजेंट को किसी बदलाव से पहले और बाद में पेज की गति नापकर वेब प्रदर्शन में गिरावट पकड़ने में मदद करती है।
browse
139kआपके एजेंट को असली वेब ब्राउज़र खोलने, पेज के प्रवाह में क्लिक करने, स्क्रीनशॉट लेने और कंसोल त्रुटियाँ जाँचने देती है।
hackernews-frontpage
139kआपके एजेंट को Hacker News का मौजूदा फ़्रंट पेज इकट्ठा करने में मदद करती है, हर कहानी की रैंक, शीर्षक, लिंक, अंक और टिप्पणियों की संख्या के साथ।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।