Rules, skills and hooks

Shape how CloudForge works in your project with files in the .cloudforge folder.

On this page

Manage them

Open the Options menu in the title bar and choose Customizations. From the Command Palette you can also run New Rule, New Skill and Open hooks.json.

Files in your project's .cloudforge folder apply to that project. You can also keep global ones that apply to every project.

Rules

A ruleRuleGuidance CloudForge follows in your project, written as a Markdown file in .cloudforge/rules/. is guidance CloudForge follows, such as "Use TypeScript strict mode" or "Tag every AWS resource with the project name". Each rule is a Markdown file in .cloudforge/rules/.

Rule typeWhen it applies
AlwaysIn every chat.
SmartWhen CloudForge works on files that match the rule's file pattern, or when the task matches the rule's description.
On callCloudForge sees a list of these rules and loads one when it is relevant.

You can turn each rule on and off.

Skills

A skillSkillA set of instructions for a task you repeat, saved in .cloudforge/skills/. Skills also show up as slash commands in chat. is a set of instructions for a task you repeat, such as "release a new version". Each skill is a folder with a SKILL.md file: .cloudforge/skills/<name>/SKILL.md. Skill names use lowercase letters, numbers and single hyphens, up to 64 characters.

Your skills also show up as slash commands in chat.

Hooks

A hookHookA command of yours that CloudForge runs at a set moment, for example after a file is saved. runs a command of yours at a set moment, for example a formatter after each file is saved. Hooks live in .cloudforge/hooks.json.

Hooks can run when:

  • a session starts or ends;
  • you send a message;
  • CloudForge is about to call a model;
  • CloudForge is about to use a tool, or has just used one;
  • CloudForge finishes its turn;
  • a file is saved.

Your command gets the details as JSON in the CLOUDFORGE_HOOK_PAYLOAD environment variable, and the event name in CLOUDFORGE_HOOK_EVENT. A hook that runs before a tool or after you send a message can block it by exiting with code 2. Text your command prints is passed to CloudForge as extra context.

Keyboard shortcuts

Docs keyboard shortcuts
Ctrl + KOpen search
/Open search
?Show this list
[Previous page
]Next page
EscClose search, this list or the menu

Turn these off if they get in the way of speech input or other tools. Ctrl + K always works.