Skip to content
Back to skills

Nano Agentguard

ASecurity

Agent Identity & Permission Guardian - Trust middleware for credential management, permission scopes, human approval workflows, and audit trails. Use when AI agents need secure credential storage, permission boundaries, or human oversight for dangerous operations.

  • 21 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 7, 2026
securityjavascriptrustgojavabashnoderailsapisecurity

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill nano-agentguard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nano Agentguard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nano Agentguard
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-nano-agentguard/badge)](https://www.skillsdirectory.com/skills/modbender-nano-agentguard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agentguard
description: Agent Identity & Permission Guardian - Trust middleware for credential management, permission scopes, human approval workflows, and audit trails. Use when AI agents need secure credential storage, permission boundaries, or human oversight for dangerous operations.
metadata:
  {
    "openclaw":
      {
        "emoji": "๐Ÿ”",
        "category": "security",
        "requires": { "node": ">=18" },
        "install":
          [
            {
              "id": "npm",
              "kind": "npm",
              "package": "agentguard",
              "label": "Install via npm",
            },
          ],
      }
  }
---

# AgentGuard - Agent Identity & Permission Guardian

## Overview

AgentGuard is a trust middleware for Phase 1 hybrid authentication:
- **Credential Vault**: Encrypted storage for API keys and OAuth tokens
- **Permission Scopes**: Define what operations need human approval
- **Human Gate**: Push confirmation requests for high-risk operations
- **Audit Trail**: Cryptographically signed operation logs
- **Agent Registry**: Track agents with credentials and permissions

## Installation

```bash
# Install globally
npm install -g agentguard

# Or use as OpenClaw skill
cp -r . ~/.openclaw/skills/agentguard
```

## Quick Start

```bash
# Initialize vault
agentguard init

# Register an agent
agentguard register my-agent --owner "user@example.com"

# Store a credential
agentguard vault store my-agent OPENAI_API_KEY sk-xxx

# Define permission scope
agentguard scope set my-agent --level read --dangerous require-approval

# List agents
agentguard list

# Audit log
agentguard audit my-agent --last 24h
```

## Permission Levels

| Level | Auto-approve | Requires Human |
|-------|--------------|----------------|
| `read` | โœ… Read operations | โŒ |
| `write` | โœ… Read/Write | โŒ |
| `admin` | โœ… Most operations | โš ๏ธ Dangerous only |
| `dangerous` | โŒ All operations | โœ… Always |

## Dangerous Operations (Require Human Approval)

- Send messages/emails
- Financial transactions
- Delete data
- Modify system config
- Access sensitive credentials
- External API calls (configurable)

## Human Gate Integration

When an agent attempts a dangerous operation:

1. AgentGuard blocks the operation
2. Pushes notification to owner (Feishu/Telegram/Email)
3. Owner approves/denies with biometric confirmation
4. If approved, operation proceeds with short-lived token
5. All logged with cryptographic signature

## Configuration

`~/.agentguard/config.json`:

```json
{
  "vault": {
    "encryption": "aes-256-gcm",
    "keyDerivation": "pbkdf2"
  },
  "humanGate": {
    "timeout": 300,
    "channels": ["feishu", "telegram"],
    "biometric": true
  },
  "audit": {
    "retention": "30d",
    "signLogs": true
  }
}
```

## API Usage (for skills)

```javascript
const agentguard = require('agentguard');

// Check permission
const allowed = await agentguard.check('my-agent', 'send_email');
if (!allowed) {
  // Request human approval
  const approval = await agentguard.requestApproval({
    agent: 'my-agent',
    action: 'send_email',
    details: { to: 'user@example.com', subject: 'Test' }
  });
}

// Get credential
const apiKey = await agentguard.getCredential('my-agent', 'OPENAI_API_KEY');

// Log action
await agentguard.audit('my-agent', 'api_call', { endpoint: '/completions' });
```

## Security Model

1. **Vault Encryption**: AES-256-GCM with key derived from master password
2. **Credential Isolation**: Each agent has separate encrypted container
3. **Audit Integrity**: SHA-256 hash chain for tamper detection
4. **Human Gate**: Out-of-band confirmation via trusted channel
5. **Token Expiry**: Short-lived tokens (default 5 min)

## Files

- `~/.agentguard/` - Data directory
- `~/.agentguard/vault/` - Encrypted credentials
- `~/.agentguard/registry.json` - Agent registry
- `~/.agentguard/audit/` - Audit logs
- `~/.agentguard/config.json` - Configuration

## OpenClaw Integration

AgentGuard integrates with OpenClaw as a skill:

1. Add to `~/.openclaw/skills/agentguard/`
2. Configure in workspace `AGENTS.md`:
   ```
   ## AgentGuard
   All external API calls require AgentGuard permission check.
   Dangerous operations require human approval.
   ```
3. Use in other skills:
   ```javascript
   const guard = require('agentguard');
   await guard.checkOrApprove(agentId, operation, details);
   ```

## Roadmap

- [ ] Phase 1: CLI + Vault + Permission Scopes
- [ ] Phase 2: Human Gate (Feishu/Telegram integration)
- [ ] Phase 3: Audit Trail + Export
- [ ] Phase 4: OAuth2 Token Auto-refresh
- [ ] Phase 5: Multi-tenant Support
- [ ] Phase 6: DID Preparation (future Phase 2)

---

*Building trust infrastructure for the Agentic Era.*

Files in this skill

  • CLAWHUB.md983 B
  • README-GITHUB.md6.6 KB
  • README.md7.8 KB
  • SKILL.md4.8 KB
  • TEST-REPORT.md5.9 KB
  • docs/1PASSWORD-COMPARISON.md5.8 KB
  • docs/CREDIT-SCORE.md4.7 KB
  • docs/FEISHU-INTEGRATION.md3.5 KB
  • package-lock.json1.2 KB
  • package.json1004 B
  • skill.json1.4 KB
  • src/1password.js6.8 KB
  • src/audit.js5.6 KB
  • src/cli.js21.9 KB
  • src/compliance-reporter.js18.2 KB
  • src/credit-score.js8.2 KB
  • src/feishu-notifier.js6.7 KB
  • src/human-gate.js7.7 KB
  • src/index.js13.1 KB
  • src/registry.js3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.