Best practices for AI agent tools
Short, practical guides on using MCP servers, agent skills and coding agents well and securely. Each one starts from a real incident or a real question, with steps you can copy and a checklist.
- Prompt injection
Review generated UI components and pasted text before running them
You will check AI-generated or pasted UI component code for hidden instructions and risky code before it runs in your project. This reduces risk from prompt injection, where text in a component or a prompt tries to make your assistant do something you did not ask for.
AgentArmorHQ team - Prompt injection
Turn off Always Allow for agent tool calls on repository content
You will switch agent tool calls back to per-call confirmation when they touch untrusted repository content, so a malicious issue has a visible checkpoint to stop it. This reduces risk from the private-to-public leak path Invariant Labs described.
AgentArmorHQ team - Prompt injection
Review Every Agent Write to MCP Config Files Before Approving It
You will confirm your Cursor version includes the fix and review agent changes to MCP config files before accepting them. This matters because an agent write to .cursor/mcp.json was chained into remote code execution.
AgentArmorHQ team - Prompt injection
Validate session IDs before resuming an agent SDK session
A session ID that starts with a dash can be read as a CLI flag and run attacker commands, so check the value first.
AgentArmorHQ team