m3lander

{{skill-name}}

1
0
# Install this skill:
npx skills add m3lander/system-skills-pattern-template

Or install specific skill: npx add-skill https://github.com/m3lander/system-skills-pattern-template/tree/main/src

# Description

{{SKILL_DESCRIPTION}}. Use when users request {{USE_CASES}}. Demonstrates the System Skill Pattern (CLI + SKILL.md + Database).

# SKILL.md


name: {{skill-name}}
description: {{SKILL_DESCRIPTION}}. Use when users request {{USE_CASES}}. Demonstrates the System Skill Pattern (CLI + SKILL.md + Database).
license: MIT
allowed-tools:
- Bash
- Read


{{SKILL_NAME}} Skill

Overview

{{SKILL_DESCRIPTION}}

This is a System Skill - it provides handles to operate a personal data system. As commands run and data accumulates, context builds and compounds. The system learns patterns and provides increasingly valuable insights through an OODA loop of observation, orientation, decision, and action.

Mental Model: The OODA Loop

Operating this skill involves running a continuous cycle:

  1. Observe - Check current state (./{{skill-name}} status) and review data (./{{skill-name}} list)
  2. Orient - Analyze patterns in the data (./{{skill-name}} stats --period week)
  3. Decide - Determine optimal actions based on accumulated insights
  4. Act - Execute commands, provide recommendations, celebrate milestones

Each cycle builds on accumulated data, making insights more valuable over time.

Dependencies

  • Binary location: ~/.claude/skills/{{skill-name}}/{{skill-name}}
  • Database: Auto-created at ~/.claude/skills/{{skill-name}}/{{skill-name}}.db on first run
  • No external dependencies required

Quick Decision Tree

User request -> What kind of action?
   |-- Add new data -> Use add command
   |-- View current state -> Use status or list command
   |-- Analyze patterns -> Use stats command (day/week/month/year)
   |-- Update existing data -> Use update command
   |-- Remove data -> Use delete command
   +-- Search/query -> Use search or list with filters

Core Commands

To see all available options: Run ./{{skill-name}} --help or ./{{skill-name}} <command> --help

Adding Data

Add a new item to the system:

./{{skill-name}} add --content "Description of item"
./{{skill-name}} add --content "Another item" --category "work"

Options:
- --content <text> - The main content/description (required)
- --category <name> - Optional category for organization
- --priority <level> - Optional priority (low/medium/high)

JSON output:

./{{skill-name}} add --content "New item" --json
# Returns: {"status": "added", "id": 1, "content": "New item", "created_at": "..."}

Checking Status

See current state of the system:

./{{skill-name}} status
./{{skill-name}} status --json  # For programmatic use

Listing Data

View stored items:

./{{skill-name}} list                    # Recent items
./{{skill-name}} list --days 7           # Last 7 days
./{{skill-name}} list --category "work"  # Filter by category
./{{skill-name}} list --json             # For programmatic use

Output includes:
- Item IDs for reference
- Content and metadata
- Timestamps
- Status/completion info

Analyzing Patterns

Get insights from accumulated data:

./{{skill-name}} stats --period day     # Today's stats
./{{skill-name}} stats --period week    # This week
./{{skill-name}} stats --period month   # This month
./{{skill-name}} stats --period year    # This year
./{{skill-name}} stats --json           # For programmatic use

Statistics include:
- Total items and trends
- Category distribution
- Most active times
- Pattern insights

Updating Data

Modify existing items:

./{{skill-name}} update <id> --status "completed"
./{{skill-name}} update <id> --note "Additional context"

Deleting Data

Remove items:

./{{skill-name}} delete <id>
./{{skill-name}} delete <id> --confirm  # Skip confirmation

Essential Workflows

Daily Review

To provide a daily summary:

  1. Fetch today's data: ./{{skill-name}} stats --period day --json
  2. Parse and present insights:
  3. Summary of activity
  4. Notable patterns
  5. Recommendations

Weekly Analysis

To provide weekly insights:

  1. Fetch week's data: ./{{skill-name}} stats --period week --json
  2. Identify patterns:
  3. Compare to previous periods
  4. Note trends and changes
  5. Make recommendations:
  6. Actionable insights based on data

Pattern Recognition Over Time

As data accumulates, provide increasingly valuable insights:

After a few items (1-10):
- Basic counts and recent activity
- Initial patterns forming

After several days (10-50 items):
- Daily/weekly patterns visible
- Category trends emerging

After a week (50-100 items):
- Clear usage patterns
- Time-of-day preferences
- Category distributions

After a month (100+ items):
- Long-term trends
- Seasonal patterns
- Predictive insights

Commands for pattern recognition:

./{{skill-name}} stats --period month --json  # Monthly patterns
./{{skill-name}} list --days 90 --json        # Long-term history

Common Pitfalls

Missing Required Fields

  • Don't run commands without required options
  • Do use --help to see required options

Non-Descriptive Content

  • Don't use vague content: "stuff", "thing", "misc"
  • Do use specific, searchable descriptions

Ignoring Pattern Signals

  • Don't ignore trends in the data
  • Do surface insights when patterns emerge

Best Practices

Data Entry

  • Use descriptive content for better analytics
  • Apply categories consistently
  • Add context via notes when relevant

User Interaction

  • Celebrate milestones as data accumulates
  • Surface insights proactively
  • Suggest optimizations based on patterns

Data Analysis

  • Review stats regularly
  • Track trends over time
  • Use JSON output for custom analytics

Command Composition

Combine commands for deeper insights:

# Morning check
./{{skill-name}} status
./{{skill-name}} stats --period day

# Weekly review
./{{skill-name}} list --days 7 --json
./{{skill-name}} stats --period week --json

# Long-term analysis
./{{skill-name}} stats --period month --json
./{{skill-name}} list --days 90 --json

Technical Notes

JSON Output

All commands support --json flag for programmatic access:

./{{skill-name}} status --json
./{{skill-name}} list --json
./{{skill-name}} stats --json

Use JSON output when:
- Parsing data programmatically
- Building custom analytics
- Feeding into other tools

Database

  • Location: ~/.claude/skills/{{skill-name}}/{{skill-name}}.db
  • Format: SQLite
  • Persistence: All data saved permanently
  • Analytics: Richer insights as data accumulates

Binary Location

  • Path: ~/.claude/skills/{{skill-name}}/{{skill-name}}
  • To run from skill directory: ./{{skill-name}}
  • Full path from anywhere: ~/.claude/skills/{{skill-name}}/{{skill-name}}

The System Skill Pattern in Action

This skill demonstrates the System Skill Pattern (CLI + SKILL.md + Database):

  1. CLI Binary: Handles to operate the system
  2. SKILL.md: Operating procedure for the OODA loop
  3. SQLite Database: Persistent memory where every interaction adds context

The key insight: With these three components, the skill animates a system rather than just responding to requests. Each interaction builds on the last. Analytics become richer. Insights get sharper. The tool compounds in value.

See also: README.md for technical details and implementation guide.

# README.md

System Skills Pattern Template

A GitHub repository template for building System Skills - self-contained personal data systems that Claude can animate via CLI + SKILL.md + SQLite.

The Pattern

CLI + SKILL.md + Database

Give Claude a command-line tool to run, instructions on how to operate a system, and a database to remember things. Watch it turn the crank, running its own OODA loop (Observe, Orient, Decide, Act) - building context that compounds across sessions.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    THE SYSTEM SKILL PATTERN                      β”‚
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚   CLI    β”‚ ←── β”‚   SKILL.md   β”‚ ──→ β”‚  SQLite Database β”‚     β”‚
β”‚  β”‚  Binary  β”‚     β”‚  (Tutorial)  β”‚     β”‚   (Persistence)  β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚       β”‚                  β”‚                      β”‚                β”‚
β”‚       β–Ό                  β–Ό                      β–Ό                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                      CLAUDE                               β”‚   β”‚
β”‚  β”‚  Observe β†’ Orient β†’ Decide β†’ Act (OODA Loop)             β”‚   β”‚
β”‚  β”‚  Context compounds over time as data accumulates         β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

  1. Use this template - Click "Use this template" on GitHub to create your own repo
  2. Customize placeholders - Replace {{SKILL_NAME}} with your skill name throughout
  3. Design your schema - Edit src/cli/db.ts with your data model
  4. Build your CLI - Implement commands in src/cli/main.ts
  5. Write SKILL.md - Document how Claude should operate your system
  6. Build & Install - Run ./build.sh then ./install.sh

Repository Structure

your-skill/
β”œβ”€β”€ .claude-plugin/
β”‚   β”œβ”€β”€ plugin.json          # Plugin manifest
β”‚   └── marketplace.json     # Marketplace configuration
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ SKILL.md             # Claude's operating instructions
β”‚   └── cli/
β”‚       β”œβ”€β”€ main.ts          # CLI entry point
β”‚       β”œβ”€β”€ db.ts            # Database operations
β”‚       └── deno.json        # Deno dependencies
β”œβ”€β”€ dist/
β”‚   └── skills/
β”‚       └── {{skill-name}}/  # Built output (binary + SKILL.md)
β”œβ”€β”€ build.sh                 # Compiles TypeScript to binary
β”œβ”€β”€ install.sh               # Copies to ~/.claude/skills/
β”œβ”€β”€ .gitignore
└── README.md

The Three Components

1. CLI Binary

A standalone executable that provides handles for Claude to operate your system:

./your-skill add --item "Something to track"
./your-skill list --filter recent
./your-skill stats --period week

Key attributes:
- Self-contained (no runtime dependencies)
- Helpful --help documentation
- JSON output option (--json) for programmatic use
- Built with Deno for easy compilation

2. SKILL.md

The tutorial that teaches Claude how to think about and operate your system:

  • What the system is and when to use it
  • Which commands to run in different situations
  • How to interpret output and look for patterns
  • The mental model and decision flow

This is where you share the operating procedure. Claude uses this to run its OODA loop.

3. SQLite Database

Persistent storage that accumulates value over time. Keep it simple:

CREATE TABLE items (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  content TEXT NOT NULL,
  created_at TEXT NOT NULL,
  metadata TEXT  -- JSON for flexible fields
);

Why SQLite:
- Self-contained (just a file)
- Zero configuration
- Easy to backup
- Claude can query directly if needed

Customization Guide

Step 1: Replace Placeholders

Search and replace these placeholders throughout the template:

Placeholder Description Example
{{SKILL_NAME}} Display name "Task Manager"
{{skill-name}} Lowercase with dashes "task-manager"
{{skill_name}} Lowercase with underscores "task_manager"
{{SKILL_DESCRIPTION}} One-line description "Personal task tracking with priorities"
{{AUTHOR_NAME}} Your name "Your Name"
{{AUTHOR_EMAIL}} Your email "[email protected]"
{{GITHUB_USERNAME}} GitHub username "yourusername"

Step 2: Design Your Data Model

Edit src/cli/db.ts:

  1. Define your TypeScript interfaces
  2. Create your SQLite schema
  3. Implement CRUD operations
  4. Add any analytics/aggregation queries

Step 3: Build Your CLI Commands

Edit src/cli/main.ts:

  1. Define your command structure
  2. Implement each command handler
  3. Add proper --help documentation
  4. Support --json output for all commands

Step 4: Write Your SKILL.md

Your SKILL.md should include:

  • Overview: What the skill does
  • Mental Model: How Claude should think about the system
  • Decision Tree: Quick reference for which commands to use
  • Core Commands: Detailed documentation for each command
  • Workflows: Common multi-step operations
  • Pattern Recognition: How to derive insights as data accumulates
  • Best Practices: Tips for effective use

Building & Installing

Requirements

Build

./build.sh

This compiles your TypeScript to a standalone binary with baked-in security permissions:
- No network access
- No environment variable access (except HOME)
- Can read/write files on disk

Install

./install.sh

Copies the built skill to ~/.claude/skills/{{skill-name}}/

Example Ideas

Personal Finance Manager
- CLI: money tx list, money note abc-123 "unexpected!", money cat abc-123 "vacation"
- Database: Transactions with amounts, categories, notes
- Result: Claude watches spending trends and asks about anomalies

Project Management
- CLI: task new "rake leaves", task update T-123 --status=done, task kanban
- Database: Tasks with status, due date, priority
- Result: "What are my top 3 priorities for the week?"

Gratitude Journal
- CLI: thankful "for my cat", thankful trends, thankful search
- Database: Entries with message and timestamp
- Result: A journal that talks back and lifts you up

Morning Briefing
- CLI: pulse topic add "AI safety", pulse generate, pulse feedback <id> --helpful
- Database: Topics, generated briefings, feedback
- Result: Personalized morning briefing that learns what's useful

Note Taker with Memory
- CLI: note add "API design thoughts", note search "auth", note tag T-123 "urgent"
- Database: Notes with tags and full-text search
- Result: Claude recalls and connects ideas across sessions

Why This Matters

Most Claude Skills are stateless - they run and forget. The System Skill Pattern enables:

  • Memory: Every interaction saved, building context over time
  • Learning: Patterns emerge from accumulated data
  • Compounding value: The tool gets more useful with use
  • Autonomy: Claude animates the system rather than just responding

When you give Claude the handles to operate a system - a CLI to run commands, a database to remember things, and a tutorial on how it all works - it runs its own OODA loop, building context that compounds over time.

License

MIT

Credits

Based on The System Skill Pattern by Jake Dahn.
Reference implementation: github.com/jakedahn/pomodoro

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.