[{"data":1,"prerenderedAt":341},["ShallowReactive",2],{"blog-msty-claw-rules":3,"surround-msty-claw-rules":299,"i-tabler:menu-2":304,"i-tabler:sparkles":309,"i-tabler:download":311,"i-tabler:chevron-down":313,"i-tabler:shield-lock":315,"i-tabler:robot":317,"i-tabler:database":319,"i-tabler:arrow-right":321,"i-tabler:mail":323,"i-tabler:brand-discord":325,"i-tabler:brand-x":327,"i-tabler:brand-youtube":329,"i-tabler:brand-linkedin":331,"i-tabler:brand-facebook":333,"i-tabler:brand-instagram":335,"i-tabler:brand-tiktok":337,"i-tabler:arrow-up-right":339},{"id":4,"title":5,"author":6,"body":7,"canonical":284,"date":285,"description":286,"extension":287,"image":14,"meta":288,"navigation":289,"ogImage":284,"path":290,"seo":291,"stem":292,"tags":293,"twitterCard":297,"__hash__":298},"blog/blog/msty-claw-rules.md","Introducing Rules: Make Msty Claw Work the Way You Do","Rushal Parajuli",{"type":8,"value":9,"toc":267},"minimark",[10,15,19,22,25,28,33,36,59,62,67,71,74,88,91,95,98,103,110,117,123,128,132,135,138,143,148,152,164,167,172,177,181,184,191,196,201,205,208,213,218,222,237,240,245,250,254,257,261,264],[11,12],"blog-image",{"alt":13,"src":14},"Msty Claw Rules feature preview","/blog/claw-feat-rules/blog-preview-image.png",[16,17,18],"p",{},"Repeated instructions make AI workflows slower and less consistent. You explain how you want something handled, start a new chat, and then have to explain it again.",[16,20,21],{},"Rules in Msty Claw turn those repeated instructions into reusable behavior. Create a rule once, choose when it should run, and let Claw apply it at the right point in your workflow.",[16,23,24],{},"For developers, Rules work much like hooks. They can run when a chat starts, before Claw replies, before an action runs, or after an action finishes.",[16,26,27],{},"Here’s how those triggers become reusable, predictable workflows.",[29,30,32],"h2",{"id":31},"how-rules-work","How Rules work",[16,34,35],{},"Every rule has three parts:",[37,38,39,47,53],"ul",{},[40,41,42,46],"li",{},[43,44,45],"strong",{},"Event:"," When the rule should run.",[40,48,49,52],{},[43,50,51],{},"Conditions:"," Which prompts, commands, actions, or results should match.",[40,54,55,58],{},[43,56,57],{},"Outcome:"," What Claw should do when the rule matches.",[16,60,61],{},"Outcomes can add guidance or notes, block an action, ask Claw to follow up, or run a command. This makes Rules useful for both everyday preferences and important workflow safeguards.",[11,63],{"alt":64,"src":65,"caption":66},"Msty Claw new rule screen showing quick starts for context reminders, risky commands, post-edit follow-ups, and checks","/blog/claw-feat-rules/ss-0.webp","Creating a new rule in Msty Claw",[29,68,70],{"id":69},"why-rules-matter","Why Rules matter",[16,72,73],{},"AI assistants are more useful when they consistently follow the way you work. Without Rules, you may repeatedly type instructions such as:",[37,75,76,79,82,85],{},[40,77,78],{},"Keep the response concise.",[40,80,81],{},"Follow the release checklist.",[40,83,84],{},"Do not run matching commands without stopping first.",[40,86,87],{},"Review file changes after an edit.",[16,89,90],{},"Rules move those expectations out of individual prompts and into reusable product settings. The result is less repetition, more predictable behavior, and fewer missed workflow steps.",[29,92,94],{"id":93},"six-practical-ways-to-use-rules","Six practical ways to use Rules",[16,96,97],{},"The following examples cover the main rule events and outcomes available in Msty Claw.",[99,100,102],"h3",{"id":101},"_1-add-guidance-before-claw-replies","1. Add guidance before Claw replies",[16,104,105,106,109],{},"Use this event to apply guidance before every matching response. For example, a rule matching the word ",[43,107,108],{},"release"," could tell Claw to ask about testing, rollback plans, stakeholders, and timing before it builds a release plan.",[16,111,112,113,116],{},"Use the ",[43,114,115],{},"Prompt contains"," condition to target a word or phrase. Leave it empty when the guidance should apply to every prompt.",[16,118,119,122],{},[43,120,121],{},"Setup:"," Settings → Rules → Add → Add context reminder → Event: Before Claw Replies → Then: Add Guidance",[11,124],{"alt":125,"src":126,"caption":127},"Msty Claw applying a guidance rule before responding to a release planning prompt","/blog/claw-feat-rules/ss-1.webp","Guidance is added automatically when the prompt matches the rule",[99,129,131],{"id":130},"_2-add-guidance-when-a-chat-starts","2. Add guidance when a chat starts",[16,133,134],{},"This event runs once, when the first prompt starts a new chat. It is useful for initial instructions that should shape the conversation without being added before every response.",[16,136,137],{},"For example, a release-planning rule can establish the checklist Claw should follow at the beginning of a matching conversation.",[16,139,140,142],{},[43,141,121],{}," Settings → Rules → Add → Add context reminder → Event: When a Chat Starts → Then: Add Guidance",[11,144],{"alt":145,"src":146,"caption":147},"Msty Claw applying guidance once at the beginning of a release planning chat","/blog/claw-feat-rules/ss-2.webp","Chat-start guidance runs once on the first matching prompt",[99,149,151],{"id":150},"_3-block-risky-commands-before-they-run","3. Block risky commands before they run",[16,153,154,155,158,159,163],{},"Use ",[43,156,157],{},"Stop an Action"," to prevent matching commands or actions from running. A rule matching ",[160,161,162],"code",{},"git push",", for example, can stop the command and let Claw explain why it was blocked or suggest a safer alternative.",[16,165,166],{},"Keep blocking conditions specific enough to catch the risky operation without stopping unrelated commands.",[16,168,169,171],{},[43,170,121],{}," Settings → Rules → Add → Stop risky commands → Event: Before an Action Runs → Then: Stop an Action",[11,173],{"alt":174,"src":175,"caption":176},"Msty Claw blocking a git push command because it matches a safety rule","/blog/claw-feat-rules/ss-3.webp","A safety rule stops a matching command before execution",[99,178,180],{"id":179},"_4-run-a-check-before-an-action","4. Run a check before an action",[16,182,183],{},"Rules can also run a command before a matching action. This is useful for lightweight checks that should happen before work proceeds.",[16,185,186,187,190],{},"For example, run ",[160,188,189],{},"git status"," before a Git operation, list a directory before changing its contents, or validate the current environment before starting a tool call.",[16,192,193,195],{},[43,194,121],{}," Settings → Rules → Add → Build from scratch → Event: Before an Action Runs → Then: Run a Command",[11,197],{"alt":198,"src":199,"caption":200},"Msty Claw running a directory listing command before creating a folder","/blog/claw-feat-rules/ss-4.webp","A pre-action rule runs a check before the requested command",[99,202,204],{"id":203},"_5-ask-claw-to-follow-up-after-an-action","5. Ask Claw to follow up after an action",[16,206,207],{},"Use this outcome when Claw should take another reasoning step after completing a matching action. After editing a file, for example, Claw can summarize the change, review the result, or identify the next useful step.",[16,209,210,212],{},[43,211,121],{}," Settings → Rules → Add → Nudge after edits → Event: After an Action Finishes → Then: Ask Claw to Follow Up",[11,214],{"alt":215,"src":216,"caption":217},"Msty Claw reviewing and summarizing a source file after completing an edit","/blog/claw-feat-rules/ss-5.webp","A follow-up rule asks Claw to review the completed file change",[99,219,221],{"id":220},"_6-run-a-command-after-an-action","6. Run a command after an action",[16,223,224,225,228,229,232,233,236],{},"Use a post-action command for checks that should run after matching work completes. For example, after creating or updating ",[160,226,227],{},"package.json",", a rule can run ",[160,230,231],{},"npm install"," followed by ",[160,234,235],{},"npm test",".",[16,238,239],{},"This can turn testing, formatting, validation, or status checks into a consistent part of the workflow.",[16,241,242,244],{},[43,243,121],{}," Settings → Rules → Add → Run a check → Event: After an Action Finishes → Then: Run a Command",[11,246],{"alt":247,"src":248,"caption":249},"Msty Claw automatically running npm install and npm test after creating a package file","/blog/claw-feat-rules/ss-6.webp","A post-action rule runs installation and test commands after the file is written",[29,251,253],{"id":252},"use-command-rules-carefully","Use command rules carefully",[16,255,256],{},"Rules that run commands can change files, install dependencies, or affect external systems. Start with narrow matching conditions, use safe commands while testing, and confirm the rule behaves as expected before applying it broadly.",[29,258,260],{"id":259},"less-repetition-more-consistent-workflows","Less repetition, more consistent workflows",[16,262,263],{},"Rules help Msty Claw behave more like a configured assistant and less like a blank chat. Use them for standing guidance, safety guardrails, follow-up reviews, and repeatable checks that should happen at specific points in your workflow.",[16,265,266],{},"If you repeatedly type the same instruction or manually run the same check, it is probably a good candidate for a Rule.",{"title":268,"searchDepth":269,"depth":269,"links":270},"",2,[271,272,273,282,283],{"id":31,"depth":269,"text":32},{"id":69,"depth":269,"text":70},{"id":93,"depth":269,"text":94,"children":274},[275,277,278,279,280,281],{"id":101,"depth":276,"text":102},3,{"id":130,"depth":276,"text":131},{"id":150,"depth":276,"text":151},{"id":179,"depth":276,"text":180},{"id":203,"depth":276,"text":204},{"id":220,"depth":276,"text":221},{"id":252,"depth":269,"text":253},{"id":259,"depth":269,"text":260},null,"20260605","Use Msty Claw Rules to automate repeated guidance, block risky actions, run checks, and trigger useful follow-up steps.","md",{},true,"/blog/msty-claw-rules",{"title":5,"description":286},"blog/msty-claw-rules",[294,295,296],"msty-claw","rules","automation","summary_large_image","oC6V44JpzBZyV1wl2FlXuquqteRd4yt0n6DXU7kqWsc",[284,300],{"title":301,"path":302,"stem":303,"children":-1},"Msty AI and NVIDIA RTX Spark: Bringing Powerful Local AI Closer to Everyone","/blog/msty-ai-nvidia-rtx-spark-local-ai","blog/msty-ai-nvidia-rtx-spark-local-ai",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":308},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 6h16M4 12h16M4 18h16\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":310},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2m0-12a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2M9 18a6 6 0 0 1 6-6a6 6 0 0 1-6-6a6 6 0 0 1-6 6a6 6 0 0 1 6 6\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":312},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5l5-5m-5-7v12\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":314},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":316},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M12 3a12 12 0 0 0 8.5 3A12 12 0 0 1 12 21A12 12 0 0 1 3.5 6A12 12 0 0 0 12 3\"/>\u003Cpath d=\"M11 11a1 1 0 1 0 2 0a1 1 0 1 0-2 0m1 1v2.5\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":318},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zm6-4v2m-3 8v9m6-9v9M5 16l4-2m6 0l4 2M9 18h6M10 8v.01M14 8v.01\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":320},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M4 6a8 3 0 1 0 16 0A8 3 0 1 0 4 6\"/>\u003Cpath d=\"M4 6v6a8 3 0 0 0 16 0V6\"/>\u003Cpath d=\"M4 12v6a8 3 0 0 0 16 0v-6\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":322},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-6 6l6-6m-6-6l6 6\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":324},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/>\u003Cpath d=\"m3 7l9 6l9-6\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":326},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M8 12a1 1 0 1 0 2 0a1 1 0 0 0-2 0m6 0a1 1 0 1 0 2 0a1 1 0 0 0-2 0\"/>\u003Cpath d=\"M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833-1.667 3.5-3c.667-1.667.5-5.833-1.5-11.5c-1.457-1.015-3-1.34-4.5-1.5l-.972 1.923a11.9 11.9 0 0 0-4.053 0L9 4c-1.5.16-3.043.485-4.5 1.5c-2 5.667-2.167 9.833-1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2-2 2-3\"/>\u003Cpath d=\"M7 16.5c3.5 1 6.5 1 10 0\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":328},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m4 4l11.733 16H20L8.267 4zm0 16l6.768-6.768m2.46-2.46L20 4\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":330},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M2 8a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4z\"/>\u003Cpath d=\"m10 9l5 3l-5 3z\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":332},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M8 11v5m0-8v.01M12 16v-5m4 5v-3a2 2 0 1 0-4 0\"/>\u003Cpath d=\"M3 7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v10a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":334},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 10v4h3v7h4v-7h3l1-4h-4V8a1 1 0 0 1 1-1h3V3h-3a5 5 0 0 0-5 5v2z\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":336},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M4 8a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4z\"/>\u003Cpath d=\"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0m7.5-4.5v.01\"/>\u003C/g>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":338},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 7.917v4.034A9.95 9.95 0 0 1 16 10v4.5a6.5 6.5 0 1 1-8-6.326V12.5a2.5 2.5 0 1 0 4 2V3h4.083A6.005 6.005 0 0 0 21 7.917\"/>",{"left":305,"top":305,"width":306,"height":306,"rotate":305,"vFlip":307,"hFlip":307,"body":340},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 7L7 17M8 7h9v9\"/>",1780677284062]