<< All versions
Skill v1.0.0
currentAutomated scan96/100alsk1992/cloddsbot/permissions
──Details
PublishedSeptember 9, 2026 at 01:11 AM
Content Hashsha256:05429f879914681e...
Git SHA715fd4a6c06b
──Files
Files (1 file, 5.5 KB)
SKILL.md5.5 KBactive
SKILL.md · 271 lines · 5.5 KB
version: "1.0.0" name: permissions description: "Command approvals, tool policies, and exec security" emoji: "🛡️"
Permissions - Complete API Reference
Manage command execution approvals, tool access policies, and security controls.
Chat Commands
View Permissions
/permissions View current permissions/permissions list List all rules/permissions pending View pending approvals/permissions history View approval history
Approve/Reject
/approve Approve pending command/approve <id> Approve specific request/reject Reject pending command/reject <id> "reason" Reject with reason
Allow/Block Rules
/permissions allow "npm install" Allow pattern/permissions allow "git *" Allow with wildcard/permissions block "rm -rf" Block dangerous command/permissions remove <rule-id> Remove rule
Security Mode
/permissions mode Check current mode/permissions mode allowlist Only allowed commands/permissions mode blocklist Block specific commands/permissions mode full Allow all (dangerous)
TypeScript API Reference
Create Permissions Manager
typescript
import { createPermissionsManager } from 'clodds/permissions';const perms = createPermissionsManager({// Security modemode: 'allowlist', // 'deny' | 'allowlist' | 'blocklist' | 'full'// Default rulesdefaultAllow: ['ls *','cat *','git status','git diff','npm run *',],defaultBlock: ['rm -rf *','sudo *','chmod 777 *',],// Approval settingsrequireApproval: true,approvalTimeoutMs: 60000,// Storagestorage: 'sqlite',dbPath: './permissions.db',});
Check Permission
typescript
// Check if command is allowedconst result = await perms.check({command: 'npm install lodash',userId: 'user-123',context: 'Installing dependency',});if (result.allowed) {console.log('Command allowed');} else if (result.needsApproval) {console.log(`Waiting for approval: ${result.requestId}`);} else {console.log(`Blocked: ${result.reason}`);}
Request Approval
typescript
// Request approval for commandconst request = await perms.requestApproval({command: 'docker build -t myapp .',userId: 'user-123',reason: 'Building application container',});console.log(`Request ID: ${request.id}`);console.log(`Status: ${request.status}`);// Wait for approvalconst approved = await perms.waitForApproval(request.id, {timeoutMs: 60000,});if (approved) {console.log('Approved! Executing...');}
Approve/Reject
typescript
// Approve requestawait perms.approve({requestId: 'req-123',approvedBy: 'admin-user',note: 'Looks safe',});// Reject requestawait perms.reject({requestId: 'req-123',rejectedBy: 'admin-user',reason: 'Command too broad',});
List Pending
typescript
// Get pending approvalsconst pending = await perms.listPending();for (const req of pending) {console.log(`[${req.id}] ${req.command}`);console.log(` User: ${req.userId}`);console.log(` Reason: ${req.reason}`);console.log(` Requested: ${req.createdAt}`);}
Add Rules
typescript
// Add allow ruleawait perms.addRule({type: 'allow',pattern: 'npm run *',description: 'Allow npm scripts',createdBy: 'admin',});// Add block ruleawait perms.addRule({type: 'block',pattern: 'rm -rf /',description: 'Prevent root deletion',createdBy: 'admin',});// List rulesconst rules = await perms.listRules();for (const rule of rules) {console.log(`${rule.type}: ${rule.pattern}`);}// Remove ruleawait perms.removeRule('rule-id');
Tool Policies
typescript
// Set tool policy for agentawait perms.setToolPolicy({agentId: 'trading',allow: ['execute', 'portfolio', 'markets'],deny: ['browser', 'docker', 'exec'],});// Check tool accessconst canUse = perms.isToolAllowed('trading', 'execute');// Get agent's allowed toolsconst tools = perms.getAllowedTools('trading');
Security Modes
| Mode | Behavior | |
|---|---|---|
| deny | Block all exec commands | |
| allowlist | Only explicitly allowed commands | |
| blocklist | Block specific patterns, allow rest | |
| full | Allow all (dangerous!) |
Pattern Syntax
| Pattern | Matches | |
|---|---|---|
npm install | Exact command | |
npm * | npm with any args | |
git status | Exact command | |
* --version | Any command with --version |
Built-in Safety Rules
Always blocked regardless of mode:
rm -rf /sudo rm -rfchmod 777 /:(){ :|:& };:(fork bomb)- Commands with shell injection patterns
CLI Commands
bash
# List permission rulesclodds permissions list# Add allow patternclodds permissions allow "npm run *"# View pending approvalsclodds permissions pending# Approve requestclodds permissions approve req-123
Best Practices
- Use allowlist mode — Most secure, explicit permissions
- Review pending regularly — Don't let requests pile up
- Specific patterns —
npm install lodashovernpm * - Audit history — Review what was approved
- Tool policies — Restrict agent tool access