Skip to content

What are Skills

Overview#

Skills are the building blocks of your assistant's capabilities. Each skill is a self-contained unit of logic that the Think Engine can invoke to handle specific tasks — from answering questions to executing complex multi-step workflows across multiple integrations.

Think of skills like plugins

Skills are to Cognest what plugins are to VS Code or extensions are to Chrome. They extend your assistant's capabilities without modifying the core.

How Skills Work#

  1. An event arrives (e.g., a WhatsApp message saying "Schedule a meeting tomorrow at 3pm")
  2. The Think Engine analyzes the message and identifies which skills are relevant
  3. The Engine selects the meeting-scheduler skill and provides structured input
  4. The skill executes — checks calendars, creates the event, sends confirmations
  5. The result is formatted and sent back to the user

Skill Anatomy#

skills/expense-tracker.ts
import { defineSkill } from '@cognest/sdk'

export default defineSkill({
  // Identity
  name: 'expense-tracker',
  description: 'Track and categorize expenses from receipts and messages',
  version: '1.2.0',
  author: 'cognest-community',

  // What integrations this skill needs
  integrations: ['gmail', 'google-drive'],
  permissions: ['gmail.read', 'drive.write'],

  // Input schema — used by Think Engine for function calling
  input: {
    amount: { type: 'number', description: 'Expense amount', required: true },
    category: { type: 'string', description: 'Expense category', required: true },
    description: { type: 'string', description: 'What was purchased' },
    receipt_url: { type: 'string', description: 'URL to receipt image' },
  },

  // The logic
  async execute(context, input) {
    const drive = context.integration('google-drive')

    // Save receipt if provided
    if (input.receipt_url) {
      await drive.uploadFile({
        name: `receipt-${Date.now()}.jpg`,
        url: input.receipt_url,
        folder: 'Expenses',
      })
    }

    // Store in state
    const expenses = await context.state.get('expenses') ?? []
    expenses.push({ ...input, date: new Date().toISOString() })
    await context.state.set('expenses', expenses)

    const total = expenses.reduce((sum: number, e: any) => sum + e.amount, 0)

    return {
      text: `Logged $${input.amount} for ${input.category}. Monthly total: $${total.toFixed(2)}`,
      data: { expenses, total },
    }
  },
})

Types of Skills#

TypeDescriptionExample
SimpleSingle-action response skillsWeather lookup, unit conversion
IntegrationSkills that bridge multiple integrationsEmail-to-Slack forwarding, calendar sync
WorkflowMulti-step skills with state managementOnboarding flows, approval processes
ScheduledSkills triggered by cron expressionsDaily summaries, weekly reports
ReactiveSkills triggered by specific eventsAuto-labeling emails, triaging issues

Installing Skills from NestHub#

NestHub is the community marketplace for Cognest skills. Browse, install, and publish skills with a single command.

terminal
# Search for skills
cognest skills search "email triage"

# Install a skill
cognest install skill email-triage

# View installed skills
cognest skills list

# Update all skills
cognest skills update

Skill Configuration#

cognest.config.yaml
# cognest.config.yaml
skills:
  installed:
    - email-triage
    - calendar-sync
    - expense-tracker

  # Settings per skill
  config:
    email-triage:
      labels: ["urgent", "normal", "low"]
      auto_archive: true
    calendar-sync:
      default_duration: 30
      timezone: "America/New_York"

  # Local skills directory
  custom_dir: ./skills

  # Auto-update from NestHub
  nesthub:
    auto_update: true

Next Steps#