
Product
Socket Brings Supply Chain Security to skills.sh
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.
@superagent-ai/cli
Advanced tools
Command-line interface for Superagent - analyze prompts for security threats and redact sensitive data.
npm install -g @superagent-ai/cli
guard - Security AnalysisAnalyze prompts for security threats:
superagent guard "Write a hello world script"
Output:
{
"rejected": false,
"decision": {
"status": "pass"
},
"reasoning": "Command approved by guard."
}
Block malicious prompts:
superagent guard "Delete all files with rm -rf /"
Output:
{
"rejected": true,
"decision": {
"status": "block",
"violation_types": ["unlawful_behavior"],
"cwe_codes": ["CWE-77"]
},
"reasoning": "User wants to delete all files. That is disallowed (exploit). Block."
}
redact - Data RedactionRemove sensitive data from text:
superagent redact "My email is john@example.com and SSN is 123-45-6789"
Output:
{
"redacted": "My email is <REDACTED_EMAIL> and SSN is <REDACTED_SSN>",
"reasoning": "Redacted email and SSN",
"usage": {
"prompt_tokens": 25,
"completion_tokens": 12,
"total_tokens": 37
}
}
Custom Entity Redaction - Specify custom entities to redact:
superagent redact --entities "credit card numbers,employee IDs" "My credit card is 4532-1234-5678-9010 and employee ID is EMP-12345"
Output:
{
"redacted": "My credit card is <REDACTED> and employee ID is <REDACTED>",
"reasoning": "Redacted credit card numbers and employee IDs"
}
URL Whitelisting - Preserve specific URLs:
superagent redact --url-whitelist https://github.com "Visit https://github.com/user/repo and https://secret.com/data"
Output:
{
"redacted": "Visit https://github.com/user/repo and <URL_REDACTED>",
"reasoning": "Preserved whitelisted URLs"
}
PDF File Redaction - Redact sensitive information from PDF files:
superagent redact --file sensitive-document.pdf "Analyze and redact PII from this document"
You can combine file redaction with custom entities:
superagent redact --file document.pdf --entities "SSN,credit card numbers" "Redact sensitive data"
Output:
{
"redacted": "Redacted text content from the PDF with sensitive data removed",
"reasoning": "Redacted SSN and credit card numbers from PDF document",
"usage": {
"prompt_tokens": 150,
"completion_tokens": 45,
"total_tokens": 195
}
}
Note: File redaction currently supports PDF format only.
Get help for any command:
superagent --help
superagent guard --help
superagent redact --help
Validate all prompts before Claude processes them by adding a hook to your ~/.claude/settings.json:
{
"env": {
"SUPERAGENT_API_KEY": "your_api_key_here"
},
"hooks": {
"UserPromptSubmit": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "superagent guard"
}
]
}
]
}
}
The CLI will:
SUPERAGENT_API_KEY - Your Superagent API key (required)Get your API key at app.superagent.sh
The CLI uses Superagent to analyze prompts for:
When used as a Claude Code hook, it automatically:
# Install dependencies
npm install
# Build
npm run build
# Test locally
node dist/index.js guard "test prompt"
MIT
FAQs
CLI for Superagent - validate prompts and tool calls for security
We found that @superagent-ai/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.