plugins
Plugin management, installation, and lifecycle control
What this skill does
# Plugins - Complete API Reference
Install, manage, and configure plugins to extend Clodds functionality.
---
## Chat Commands
### List Plugins
```
/plugins List installed plugins
/plugins available Browse available plugins
/plugins search <query> Search plugin registry
```
### Install/Remove
```
/plugins install <name> Install from registry
/plugins install <url> Install from URL
/plugins uninstall <id> Remove plugin
/plugins update <id> Update plugin
/plugins update-all Update all plugins
```
### Enable/Disable
```
/plugins enable <id> Enable plugin
/plugins disable <id> Disable plugin
/plugins restart <id> Restart plugin
```
### Configuration
```
/plugins config <id> View plugin settings
/plugins set <id> <key> <value> Update setting
/plugins reset <id> Reset to defaults
```
---
## TypeScript API Reference
### Create Plugin Manager
```typescript
import { createPluginManager } from 'clodds/plugins';
const plugins = createPluginManager({
// Plugin directory
pluginDir: './plugins',
// Registry URL
registry: 'https://plugins.clodds.ai',
// Auto-update
autoUpdate: true,
updateCheckIntervalMs: 86400000, // Daily
});
```
### List Plugins
```typescript
// Get installed plugins
const installed = plugins.list();
for (const plugin of installed) {
console.log(`${plugin.id}: ${plugin.name} v${plugin.version}`);
console.log(` Status: ${plugin.status}`); // 'enabled' | 'disabled' | 'error'
console.log(` Description: ${plugin.description}`);
}
```
### Install Plugin
```typescript
// Install from registry
await plugins.install('advanced-charts');
// Install from URL
await plugins.install('https://github.com/user/plugin/releases/latest/plugin.zip');
// Install from local path
await plugins.install('/path/to/plugin');
```
### Enable/Disable
```typescript
// Enable plugin
await plugins.enable('advanced-charts');
// Disable plugin
await plugins.disable('advanced-charts');
// Check status
const status = plugins.getStatus('advanced-charts');
console.log(`Enabled: ${status.enabled}`);
```
### Configure Plugin
```typescript
// Get plugin settings
const settings = plugins.getSettings('advanced-charts');
console.log(settings);
// Update settings
await plugins.setSettings('advanced-charts', {
theme: 'dark',
refreshInterval: 5000,
});
// Reset to defaults
await plugins.resetSettings('advanced-charts');
```
### Uninstall Plugin
```typescript
await plugins.uninstall('advanced-charts');
```
### Create Custom Plugin
```typescript
// plugins/my-plugin/index.ts
import { Plugin, PluginContext } from 'clodds/plugins';
export default class MyPlugin implements Plugin {
id = 'my-plugin';
name = 'My Custom Plugin';
version = '1.0.0';
description = 'Adds custom functionality';
// Default settings
defaultSettings = {
enabled: true,
threshold: 0.5,
};
async onLoad(ctx: PluginContext) {
console.log('Plugin loaded!');
// Register commands
ctx.registerCommand({
name: 'my-command',
description: 'Does something cool',
handler: async (args) => {
return `Result: ${args.join(' ')}`;
},
});
// Register tools
ctx.registerTool({
name: 'my-tool',
description: 'A custom tool',
execute: async (params) => {
return { result: 'success' };
},
});
// Subscribe to events
ctx.on('message', async (msg) => {
if (msg.content.includes('hello')) {
await ctx.reply('Hello back!');
}
});
}
async onUnload(ctx: PluginContext) {
console.log('Plugin unloaded!');
}
async onSettingsChange(settings: any, ctx: PluginContext) {
console.log('Settings updated:', settings);
}
}
```
### Plugin Lifecycle
```typescript
// Events
plugins.on('installed', (plugin) => {
console.log(`Installed: ${plugin.name}`);
});
plugins.on('enabled', (plugin) => {
console.log(`Enabled: ${plugin.name}`);
});
plugins.on('disabled', (plugin) => {
console.log(`Disabled: ${plugin.name}`);
});
plugins.on('error', (plugin, error) => {
console.error(`Plugin error: ${plugin.name}`, error);
});
```
---
## Plugin Structure
```
my-plugin/
├── index.ts # Main plugin file
├── package.json # Plugin metadata
├── settings.json # Default settings
├── commands/ # Command handlers
├── tools/ # Tool definitions
└── assets/ # Static assets
```
### package.json
```json
{
"name": "my-plugin",
"version": "1.0.0",
"description": "My custom plugin",
"main": "index.ts",
"clodds": {
"minVersion": "0.1.0",
"permissions": ["network", "storage"],
"commands": ["my-command"],
"tools": ["my-tool"]
}
}
```
---
## Plugin Permissions
| Permission | Access |
|------------|--------|
| `network` | HTTP/WebSocket requests |
| `storage` | Local file storage |
| `exec` | Shell command execution |
| `trading` | Trading APIs |
| `memory` | User memory access |
---
## Best Practices
1. **Minimal permissions** — Only request what you need
2. **Handle errors** — Don't crash on plugin errors
3. **Clean unload** — Release resources on unload
4. **Version compatibility** — Check minVersion
5. **Document settings** — Explain configuration options
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.