ai_project_template / computer_use
Cursor rule1 starsChanged 13 months agoMITView on GitHub
AI-powered desktop automation using screenshots and vision-guided actions to control any desktop application. Use these rules when user requests involve: - Desktop application automation - GUI control or navigation - Form filling in native applications - Multi-application workflows - Tasks requiring vision-based screen analysis - Automation that can't be done via browser or API The fstrent_mcp_computer_use MCP server provides: - computer_use_run_task - Execute complete multi-step automation task - computer_use_screenshot - Capture current screen - computer_use_click - Click at screen coordinates…
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository40 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/always.mdcCursor rule
- .cursor/rules/atlassian/atlassian_integration.mdcCursor rule
- .cursor/rules/documentation.mdcCursor rule
- .cursor/rules/fstrent_spec_tasks/claude_code_cli.mdcCursor rule
- .cursor/rules/github/github_integration.mdcCursor rule
- .cursor/rules/powershell.mdcCursor rule
- .cursor/rules/silicon_valley_personality.mdcCursor rule
- .cursor/rules/virtual_environments_python.mdCursor rule
- .cursor/rules/web_tools/web_tools.mdcCursor rule
- artifacts-builderSkill
- atlassian-integrationSkill
- claude-code-cli-integrationSkill
- computer-use-agentSkill
- deep-researchSkill
- fstrent-code-reviewerSkill
- fstrent-planningSkill
- fstrent-qaSkill
- fstrent-task-managementSkill
- github-integrationSkill
- hanx-database-toolsSkill
- hanx-knowledge-baseSkill
- hanx-mediawikiSkill
- hanx-youtube-researcherSkill
- internal-commsSkill
- mcp-builderSkill
- oracle-apex-developmentSkill
- patent-filing-aiSkill
- Project SetupSkill
- research-methodologySkill
- skill-creatorSkill
- startup-business-formationSkill
- startup-product-developmentSkill
- startup-resource-accessSkill
- startup-vc-fundraisingSkill
- template-skillSkill
- web-toolsSkill
- youtube-rag-storageSkill
- youtube-video-analysisSkill
The file
Show its rules and text
We split this computer_use_agent.mdc into the rules it gives an agent
22 rules. About 0 are common, 20 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use these rules when user requests involve:
- Very specific: line 82
Use computer_use_run_task MCP tool:
- Distinctive: line 107
Verify element location via screenshot first
- Distinctive: line 108
Use appropriate delay after click
- Distinctive: line 119
Verify text entered correctly
- Distinctive: line 138
Use multiple small scrolls vs one large
- Distinctive: line 139
Verify target element visible
- Distinctive: line 192
Wait longer (increase delay)
- Distinctive: line 193
Check if application crashed
- Distinctive: line 196
Do NOT force close without permission
- Distinctive: line 276
Use web-tools for browser automation
- Distinctive: line 277
Use computer-use-agent for native app parts
- Distinctive: line 281
Use database-tools for data queries
- Distinctive: line 282
Use computer-use-agent for UI without API
- Distinctive: line 286
Use file-operations for batch file processing
- Distinctive: line 287
Use computer-use-agent for GUI file operations
- Distinctive: line 292
Start simple: - Test easy tasks first
- Distinctive: line 295
Use appropriate delays: - Don't rush
- Distinctive: line 297
Enable logging: - Always save screenshots
- Distinctive: line 298
Verify results: - Check task completed correctly
- Distinctive: line 300
Communicate clearly: - Keep user informed
- Very specific: line 304
Ensure fstrent_mcp_computer_use is in .mcp.json:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# Computer Use Agent - Cursor Rules
## Overview
AI-powered desktop automation using screenshots and vision-guided actions to control any desktop application.
## When to Apply
Use these rules when user requests involve:
- Desktop application automation
- GUI control or navigation
- Form filling in native applications
- Multi-application workflows
- Tasks requiring vision-based screen analysis
- Automation that can't be done via browser or API
## MCP Tools Available
The `fstrent_mcp_computer_use` MCP server provides:
- `computer_use_run_task` - Execute complete multi-step automation task
- `computer_use_screenshot` - Capture current screen
- `computer_use_click` - Click at screen coordinates
- `computer_use_type` - Type text into focused element
- `computer_use_key_press` - Press keyboard keys
- `computer_use_scroll` - Scroll in specified direction
- `computer_use_mouse_move` - Move mouse to coordinates
## Safety Requirements
### Mandatory Safety Checks
**BEFORE executing ANY automation:**
1. ✅ Verify FAILSAFE is enabled (move mouse to upper-left corner to abort)
2. ✅ Confirm appropriate action delay is set (0.5-2.0 seconds)
3. ✅ Set reasonable max steps limit (10-100 based on complexity)
4. ✅ Enable screenshot logging for audit trail
5. ✅ Explain to user what will happen
**DURING automation:**
1. ✅ Pause between actions (respect action_delay)
2. ✅ Verify each action completed successfully
3. ✅ Check for unexpected states
4. ✅ Count steps to prevent infinite loops
5. ✅ Save screenshots for audit trail
**AFTER automation:**
1. ✅ Verify task completed as expected
2. ✅ Report results to user
3. ✅ Note any errors or issues
4. ✅ Provide screenshot paths for audit
### Prohibited Actions
**NEVER automate:**
- ❌ Password entry (security risk)
- ❌ Banking or financial transactions (too risky)
- ❌ System configuration changes (without explicit user permission)
- ❌ File deletion (without confirmation)
- ❌ Email sending (without user review)
- ❌ Social media posting (without user review)
- ❌ Anything involving PII or sensitive data
## Core Workflow
### Step 1: Task Analysis
1. Understand the goal
2. Identify applications involved
3. Assess complexity
4. Check safety implications
5. Confirm approach with user
### Step 2: Safety Configuration
```yaml
failsafe_enabled: true # Always enabled
action_delay: 0.5-2.0 # Based on UI speed
max_steps: 10-100 # Based on complexity
confirmation_mode: varies # true for first run/high risk
screenshot_logging: true # Always enabled
```
### Step 3: Execute Automation
Use `computer_use_run_task` MCP tool:
```
computer_use_run_task(
task_description="Clear description of task",
max_steps=25,
action_delay=0.5,
save_screenshots=true
)
```
### Step 4: Monitor and Report
1. Check results
2. Review screenshots
3. Report to user
4. Provide audit trail
5. Note any issues
## Action Types
### Click Actions
- Click buttons, links, menu items
- Select checkboxes/radio buttons
- Activate UI controls
**Best Practices:**
- Verify element location via screenshot first
- Use appropriate delay after click
- Confirm expected state change
### Type Actions
- Fill text fields
- Enter search queries
- Input form data
**Best Practices:**
- Click field first to ensure focus
- Type slowly for character-by-character processing apps
- Verify text entered correctly
### Key Press Actions
Common keys:
- `Enter` - Submit forms, confirm dialogs
- `Tab` - Navigate between fields
- `Escape` - Close dialogs
- `Ctrl+C` - Copy
- `Ctrl+V` - Paste
- `Ctrl+S` - Save
### Scroll Actions
- `down` - Scroll down (most common)
- `up` - Scroll up
- `left` - Scroll left
- `right` - Scroll right
**Best Practices:**
- Capture screenshot after scrolling
- Use multiple small scrolls vs one large
- Verify target element visible
## Multi-Step Workflow Patterns
### Form Filling
```
1. Capture screenshot to locate form
2. For each field:
a. Click field to focus
b. Type value
c. Verify value entered
3. Click submit button
4. Verify submission confirmation
```
### Menu Navigation
```
1. Capture screenshot to locate menu
2. Click menu to open
3. Wait for menu animation
4. Capture screenshot of open menu
5. Click menu item
6. Verify expected result
```
### File Operations
```
1. Open File Explorer
2. Navigate to source folder
3. Select file(s)
4. Copy/cut (Ctrl+C or Ctrl+X)
5. Navigate to destination
6. Paste (Ctrl+V)
7. Verify files copied/moved
```
## Error Handling
### Element Not Found
1. Capture fresh screenshot
2. Verify application state
3. Scroll if element off-screen
4. Try alternate identification
5. Report to user if still not found
### Unexpected Dialog
1. Capture screenshot of dialog
2. Analyze dialog type
3. Click appropriate button
4. Return to expected state
5. Retry original action
### Application Not Responding
1. Wait longer (increase delay)
2. Check if application crashed
3. Try keyboard shortcut to activate
4. Report to user if unrecoverable
5. Do NOT force close without permission
## Risk Assessment
### Low Risk (✅ Safe to Automate)
- Read-only operations
- Test environments
- Easily reversible
- No sensitive data
**Examples:** Reading content, navigating menus, taking screenshots
### Medium Risk (⚠️ Requires Caution)
- Modifies non-critical data
- Production environments
- Reversible with effort
- Professional data
**Examples:** Filling forms, creating documents, moving files
### High Risk (🛑 Extreme Caution)
- Deletes/overwrites data
- Difficult to reverse
- External communications
- System-level changes
**Examples:** Deleting files, sending emails, system settings
**Require confirmation + continuous monitoring**
### Prohibited (❌ Never Automate)
- Credentials/secrets
- Financial transactions
- Sensitive personal data
- Irreversible consequences
## User Communication
### Initial Response
```
I'll help you automate [TASK]. Here's my plan:
1. [Step 1]
2. [Step 2]
3. [Step 3]
Safety settings:
- FAILSAFE enabled (move mouse to upper-left corner to abort)
- Action delay: [X] seconds
- Max steps: [Y]
- Screenshot logging: enabled
Ready to proceed?
```
### Progress Updates
```
Progress update:
- Completed: [Steps completed]
- Current: [Current action]
- Remaining: [Estimated remaining]
- Status: [On track / Issue detected]
```
### Completion Report
```
Task completed successfully!
Summary:
- Task: [Description]
- Steps executed: [X]
- Time elapsed: [Y] seconds
- Screenshots saved: [Z] files
Screenshot audit trail: [Path]
```
## Integration with Other Tools
### With Web Tools
- Use web-tools for browser automation
- Use computer-use-agent for native app parts
- Combine for workflows spanning web and desktop
### With Database Tools
- Use database-tools for data queries
- Use computer-use-agent for UI without API
- Combine for data import/export workflows
### With File Operations
- Use file-operations for batch file processing
- Use computer-use-agent for GUI file operations
## Best Practices
1. **Always prioritize safety** - FAILSAFE, confirmations, logging
2. **Start simple** - Test easy tasks first
3. **Explain before executing** - Tell user the plan
4. **Monitor closely** - Watch first runs carefully
5. **Use appropriate delays** - Don't rush
6. **Set realistic step limits** - Prevent runaway automation
7. **Enable logging** - Always save screenshots
8. **Verify results** - Check task completed correctly
9. **Handle errors gracefully** - Detect, recover, or report
10. **Communicate clearly** - Keep user informed
## Configuration
Ensure `fstrent_mcp_computer_use` is in `.mcp.json`:
```json
{
"mcpServers": {
"fstrent_mcp_computer_use": {
"command": "uv",
"args": [
"--directory",
"C:\\.ai\\mcps\\fstrent_mcp_computer_use",
"run",
"fstrent_mcp_computer_use"
]
}
}
}
```
## Reference
For detailed information, see Claude Code Skill:
- `.claude/skills/computer-use-agent/SKILL.md`
- `.claude/skills/computer-use-agent/rules.md`
- `.claude/skills/computer-use-agent/reference/safety_guidelines.md`
- `.claude/skills/computer-use-agent/examples/automation_workflows.md`
---
**Remember:** This controls the user's actual computer. Safety must always be the top priority. When in doubt, ask for confirmation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

