slash-command-encoder
Creates ergonomic slash commands (/command) that provide fast, unambiguous access to micro-skills, cascades, and agents. Enhanced with auto-discovery, intelligent routing, parameter validation, and command chaining. Generates comprehensive command catalogs for all installed skills with multi-model integration.
What this skill does
# Slash Command Encoder (Enhanced)
## Overview
Creates fast, scriptable `/command` interfaces for micro-skills, cascades, and agents. This enhanced version includes automatic skill discovery, intelligent command generation, parameter validation, multi-model routing, and command chaining patterns.
## Philosophy: Expert Efficiency
**Command Line UX for AI**: Expert users benefit from fast, precise, scriptable interfaces over natural language when performing repeated operations.
**Enhanced Capabilities**:
- **Auto-Discovery**: Scans and catalogs all installed skills automatically
- **Intelligent Routing**: Commands invoke optimal AI/agent for task
- **Parameter Validation**: Type-checked, auto-completed parameters
- **Command Chaining**: Compose commands into pipelines
- **Multi-Model Integration**: Direct access to Gemini/Codex via commands
**Key Principles**:
1. Fast and unambiguous invocation
2. Self-documenting through naming
3. Composable and scriptable
4. Type-safe parameter handling
5. Muscle memory for power users
## When to Create Slash Commands
✅ **Perfect For**:
- Operations performed repeatedly (daily/weekly)
- Workflows that need exact parameters
- Tasks requiring scriptable automation
- Commands that compose into pipelines
- Expert user shortcuts
❌ **Don't Use For**:
- One-off exploratory tasks
- Operations needing natural language nuance
- Tasks better suited to interactive dialogue
## Enhanced Creation Workflow
### Step 1: Auto-Discovery Phase
**Scan Installed Skills**:
```bash
# Discovery algorithm
scan_directories:
- ~/.claude/skills/*/SKILL.md
- .claude/skills/*/SKILL.md
extract_metadata:
- name (command base)
- description (help text)
- inputs (parameters)
- outputs (return types)
- integration_points (routing)
```
**Catalog Generation**:
```yaml
discovered_skills:
micro_skills: [extract-data, validate-api, refactor-code, ...]
cascades: [audit-pipeline, code-quality-swarm, ...]
agents: [root-cause-analyzer, code-reviewer, ...]
multi_model: [gemini-megacontext, codex-auto, ...]
```
### Step 2: Command Design (Enhanced)
#### A. Naming Conventions
**Category Prefixes**:
```bash
# Data operations
/extract-json, /validate-csv, /transform-xml
# Code operations
/lint-python, /test-coverage, /refactor-imports
# Agent invocation
/agent-rca, /agent-reviewer, /agent-architect
# Multi-model
/gemini-search, /codex-auto, /claude-reason
# Workflows
/audit-pipeline, /deploy-prod, /quality-check
```
**Naming Rules**:
- Verb-noun pattern: `/validate-api`, `/extract-data`
- Agent prefix: `/agent-<specialty>`
- Model prefix: `/gemini-*`, `/codex-*`
- Workflow descriptive: `/audit-pipeline`
- Max 3 words, hyphenated
#### B. Parameter Design
**Parameter Types**:
```yaml
positional:
- file_path (required, validated)
- target (required, validated)
flags:
--strict: boolean
--format: enum[json, csv, xml]
--output: file_path
options:
--config: json_object
--schema: file_path
--model: enum[claude, gemini, codex]
```
**Validation Schema**:
```typescript
interface CommandParameter {
name: string
type: 'string' | 'number' | 'boolean' | 'file_path' | 'enum'
required: boolean
default?: any
validation?: RegExp | ((value: any) => boolean)
description: string
completion?: () => string[] // Auto-complete options
}
```
#### C. Multi-Model Routing
**Model Selection Flags**:
```bash
# Explicit model selection
/analyze src/ --model gemini-megacontext # Large context
/prototype feature.spec --model codex-auto # Rapid prototyping
/reason bug-report.md --model codex-reasoning # Alternative view
/review code.js --model claude # Best reasoning (default)
# Auto-select based on task
/analyze-large-codebase # Auto-routes to gemini-megacontext
/rapid-prototype # Auto-routes to codex-auto
/search-current-info # Auto-routes to gemini-search
```
### Step 3: Command Implementation Structure
**Command Definition Template**:
```yaml
command:
name: /command-name
version: 1.0.0
description: |
Brief description of what this command does
category: data | code | agent | workflow | multi-model
parameters:
- name: input
type: file_path
required: true
validation: file_exists
description: Input file to process
- name: --strict
type: boolean
default: false
description: Enable strict validation
- name: --model
type: enum
options: [claude, gemini-megacontext, gemini-search, codex-auto]
default: auto-select
description: AI model to use
routing:
type: micro-skill | cascade | agent | multi-model
target: skill-name | cascade-name | agent-name
model_selection: auto | explicit
binding:
parameter_mapping:
file: ${input}
strictness: ${--strict}
model: ${--model}
output:
format: json | text | file
validation: schema | none
examples:
- command: /command-name input.json --strict
description: Process input.json with strict validation
composition:
chainable: true
pipe_output: stdout
pipe_input: stdin
```
### Step 4: Command Chaining & Composition
**Pipeline Patterns**:
```bash
# Sequential pipeline
/extract data.json | /validate --strict | /transform --format csv > output.csv
# Parallel fan-out
/analyze src/ --parallel [/lint + /security-scan + /test-coverage] | /merge-reports
# Conditional branching
/validate input.json && /deploy-prod || /generate-error-report
# Multi-stage workflow
/audit-pipeline src/ \
--phase theater-detection \
--phase functionality-audit --model codex-auto \
--phase style-audit \
--output report.json
```
**Composition Interface**:
```typescript
interface ChainableCommand {
execute: (input: any) => Promise<CommandResult>
pipe: (next: Command) => ChainableCommand
parallel: (commands: Command[]) => ParallelCommand
conditional: (condition: boolean, ifTrue: Command, ifFalse: Command) => ConditionalCommand
}
```
### Step 5: Auto-Completion & Help
**Completion System**:
```bash
# File path completion
/validate <TAB> # Shows files matching pattern
# Parameter completion
/analyze --<TAB> # Shows available flags
# Model completion
/analyze --model <TAB> # Shows [claude, gemini-megacontext, codex-auto, ...]
# Command discovery
/<TAB> # Shows all available commands by category
```
**Help Generation**:
```markdown
/help command-name
Command: /validate-api
Version: 1.0.0
Category: Data Operations
Description:
Validates API responses against OpenAPI schemas using specialist validation agent
Usage:
/validate-api <file> [--schema <schema_file>] [--strict] [--model <model>]
Parameters:
file Path to API response file (required)
--schema FILE OpenAPI schema file (default: auto-detect)
--strict Enable strict validation mode
--model MODEL AI model [claude|gemini|codex] (default: auto)
Examples:
/validate-api response.json
/validate-api response.json --schema openapi.yaml --strict
/validate-api response.json --model gemini-megacontext
Chains with:
/extract-data → /validate-api → /transform-data
See also:
/validate-csv, /validate-json, /agent-validator
```
## Enhanced Command Templates
### 1. Data Processing Commands
**Template**:
```yaml
command: /process-<datatype>
category: data
routing:
type: micro-skill
target: process-<datatype>
parameters:
- input: file_path (required)
- --format: enum[json, csv, xml]
- --schema: file_path
- --output: file_path
- --model: enum[claude, gemini, codex]
examples:
/extract-json data.json --schema schema.json
/validate-csv data.csv --strict --output report.json
/transform-xml data.xml --format json
```
**Generated Commands**:
- `/extract-json`, `/extract-csv`, `/extract-xml`
- `/validate-json`, `/validate-csv`, `/validate-api`
- `/transform-json`, `/transform-csv`, `/transform-xml`
### 2. Code Operation Commands
**Template**:
```yaml
command: /code-<operation>
category: code
routing:
type: micrRelated 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.