CLAUDE.md (Claude Code), .cursorrules (Cursor), or similar.
Below are example instructions organized by tool.
Style guide rules
Theget_styleguide_rules tool lets your agent fetch your team’s content rules and apply them when writing UI text.
Generate UI with compliant text
Add this to your agent instructions to apply style guide rules whenever the agent creates new UI:get_styleguide_rules before writing any user-facing strings, and apply those rules to the text it generates.
Audit existing strings
You can also use the tool to check and fix text that already exists in your codebase:Text search and reuse
Thesearch_ditto_text tool lets your agent find and reuse strings that already exist in your Ditto projects.
Reuse text when generating UI
Add this instruction so your agent checks Ditto for existing text before writing new copy:Replace hardcoded strings
You can ask the agent to scan your codebase and swap hardcoded strings for existing Ditto text:Combining tools
For the best results, combine both tools in your agent instructions:Managing style guide rules
Thecreate_styleguide_rule, update_styleguide_rule, and delete_styleguide_rule tools let your agent manage your style guide. The get_workspace_tags tool lists the tags available to attach to a rule.
Turn a code review comment into a rule
When you notice a recurring content issue, ask the agent to capture it as a rule so future text follows it automatically:get_styleguide_rules to find the target style guide and section, calls get_workspace_tags if it wants to tag the rule, then calls create_styleguide_rule.
Refine an existing rule
get_styleguide_rules to find the rule ID, then calls update_styleguide_rule with the changed fields.
Remove an outdated rule
get_styleguide_rules to find the rule ID, then calls delete_styleguide_rule.