skillshare

repository·main·Indexed 25 days ago

https://github.com/runkids/skillshare

A single source of truth for managing AI CLI skills, agents, rules, and commands. skillshare allows developers to maintain a central repository of AI instructions and sync them across multiple tools like Claude, Cursor, and Codex using symlinks, junctions, or copy mode. It includes a mapping API for custom extensions to transform Markdown into tool-specific formats, a TUI for context and token analysis via the `analyze` command, and security auditing capabilities to scan for prompt injection or data exfiltration.

Tokens
175.2K
Snippets
513
Records
838
Agent score
75%

What's inside skillshare

  1. Overview of skillshare CLI commands

    main

    The skillshare CLI is organized into several functional categories to manage skills, targets, and synchronization.

    Core Commands

    Used for basic lifecycle management: init (setup), install (add skills), uninstall (remove skills), list (view skills), search (find skills), sync (push to targets), and status (check sync state).

    Skill Management

    Used to manipulate individual skills: new (create), check (look for updates), update (apply updates), upgrade (upgrade CLI/built-ins), and enable/disable (toggle skill availability).

    Target Management

    Used to manage where skills are deployed: target (manage targets) and diff (compare source and targets).

    Extras Management

    Used for non-skill resources like rules, commands, and prompts: extras (subcommands: init, list, remove, collect).

    Sync Operations

    Used for data movement and version control: collect (pull from targets), backup/restore (manage backups), trash (manage uninstalled skills), and git-like operations: commit, push, and pull.

    Security & Utilities

    Used for maintenance and inspection: analyze (context usage), audit (security scan), log (audit logs), doctor (diagnostics), tui (interactive mode), ui (web dashboard), hub (manage hub sources), completion (shell completion), and version (CLI version).

  2. Explore skillshare technical reference documentation

    main

    The skillshare technical reference is organized into three main sections to help you master the CLI, configure AI targets, and understand the system environment:

    • Commands: Detailed documentation of all CLI commands, including their usage, available flags, and practical examples.
    • Targets: Information on supported AI tools and how to configure them as targets.
    • Appendix: Technical details regarding environment variables, the internal file structure, and supported URL formats.
  3. Explore Skillshare How-To Guides

    main

    The Skillshare documentation provides practical guides categorized by user intent and technical complexity. You can find guidance for:

    Daily Tasks

    • Creating Skills: How to create and publish your own skills.
    • Organizing Skills: Using folders with auto-flattening to manage collections.
    • Best Practices: Guidelines for naming, organization, and versioning.
    • Daily Workflow: Standard day-to-day skill management.
    • Skill Discovery: How to find and evaluate existing skills.
    • Backup & Restore: Procedures for backing up and restoring your skill data.
    • Project Workflow: Managing skills at a project level.

    Sharing & Teams

    • Project Setup: Setting up project-scoped skills for a specific repository.
    • Organization-Wide Skills: Sharing skills across an entire organization.
    • Cross-Machine Sync: Synchronizing skills across multiple computers.
    • Hub Index: Browsing and managing skill hubs.

    Advanced Topics

    • Migration: Moving from other tools or switching between modes.
    • Local-First: Understanding the local-first architecture.
    • Docker Sandbox: Using an isolated test sandbox and interactive playground.
    • Securing Your Skills: Implementing security scanning, custom rules, and organizational policies.
  4. What is upgraded during skillshare upgrade?

    main

    The upgrade command manages three distinct components:

    1. CLI Binary: The skillshare executable. It is downloaded from GitHub releases. If the binary resides in a protected directory (like /usr/local/bin), the command will automatically re-run with sudo if necessary.
    2. Web UI Assets: Upon upgrading, skillshare pre-downloads frontend assets for the new version. These are cached at ~/.cache/skillshare/ui/<version>/ and are used when running skillshare ui. If the pre-download fails, assets are downloaded during the next skillshare ui launch.
    3. skillshare Skill: The built-in skill that provides the /skillshare command to AI CLIs. It is located at ~/.config/skillshare/skills/skillshare/SKILL.md.
  5. What is a skillshare Hub?

    main

    A Hub is a static JSON file named skillshare-hub.json that acts as a searchable index for skills. Each entry in the hub includes the skill's name, description, source, and tags.

    Hubs are independent and highly portable. They can be hosted in several ways:

    • A Git repository
    • An HTTP server
    • A local filesystem

    Because hubs are independent, users can connect to multiple hubs simultaneously, allowing for the coexistence of private organizational catalogs and public community catalogs.

  6. Overview of Skill Design Patterns

    main

    Skillshare uses five structural templates (patterns) to define how an agent interacts with a task. Pick a pattern based on the primary goal of your skill:

    PatternWhat It DoesUse When
    tool-wrapperTeaches agent how to use a library/APIAgent needs domain-specific conventions
    generatorProduces structured output from a templateYou need consistent document/code formats
    reviewerScores/audits against a checklistCode review, security audit, quality checks
    inversionAgent interviews user before actingRequirements gathering, project planning
    pipelineMulti-step workflow with checkpointsComplex tasks needing validation gates
  7. What is a Skill Manifest?

    main

    A skill manifest is a portable declaration of your skill collection. Instead of installing skills manually, you list them in a manifest file and use skillshare install to automate the setup. This allows for reproducible environments across different machines or for team onboarding.

    There are two modes of operation:

    1. Project Mode: Uses a .skillshare/config.yaml file located within your project directory. This file is intended to be committed to version control (e.g., Git) to share skill requirements with teammates.
    2. Global Mode: Uses a centralized metadata store at ~/.config/skillshare/skills/.metadata.json. This represents your personal machine state and is typically not committed to version control.
  8. Understand Command Safety Tiering

    main

    The audit engine classifies shell commands in skill files into behavioral safety tiers (T0–T6). This classification describes the kind of actions a skill performs, complementing pattern-based severity.

    For .md files, only commands within fenced code blocks are analyzed.

    Tier Definitions

    TierLabelExample CommandsRisk Level
    T0read-onlycat, ls, grep, echoINFO
    T1mutatingmkdir, cp, mv, sedLOW
    T2destructiverm, dd, kill, truncateHIGH
    T3networkcurl, wget, ssh, ncMEDIUM
    T4privilegesudo, su, chown, systemctlHIGH
    T5stealthhistory -c, unset HISTFILE, shredCRITICAL
    T6interpreterpython, node, ruby, bun, deno, npx, pwsh, powershellINFO
  9. How the Audit Engine workflow works

    main

    The audit command acts as a gatekeeper. It scans skill content for known threat patterns before instructions reach your AI assistant.

    Workflow Lifecycle:

    1. Installation: When running skillshare install, an audit scan is triggered automatically.
    2. Scanning:
      • If the scan is Clean, the skill is installed.
      • If Threats are found, the installation is Blocked.
    3. Resolution: If a skill is blocked, you must review the findings. You can then:
      • Use the --force flag to bypass the block and install the skill.
      • Reject the skill to prevent installation.
    4. Execution: Only installed skills are executed by the AI CLI.
    flowchart TD
        A["Untrusted Skill<br/>(GitHub, shared repo)"] --> B["skillshare install"]
        B --> C{"audit scan"}
        C -- "Clean" --> D["Installed ✓"]
        C -- "Threats found" --> E["Blocked ✗"]
        D --> F["AI CLI executes<br/>skill instructions"]
        E --> G["Review & decide"]
        G -- "--force" --> D
        G -- "Reject" --> H["Not installed"]
    
        style C fill:#f59e0b,color:#000
        style E fill:#ef4444,color:#fff
        style D fill:#22c55e,color:#fff
  10. How to compose multiple patterns

    main

    Skill patterns are building blocks that can be layered to match complex real-world needs. Instead of using a single rigid mold, you can combine them:

    • Pipeline + Reviewer: A deployment pipeline that ends with a quality review step, scoring the deployment against a checklist before marking it complete.
    • Inversion + Generator: An RFC skill that first interviews the user about goals and constraints (Inversion), then fills a template with the gathered information (Generator).
    • Tool Wrapper + Reviewer: A library skill that both teaches conventions (Tool Wrapper) and can audit existing code for compliance (Reviewer).
  11. Understand Tracked Repositories vs Regular Skills

    main

    Skillshare distinguishes between regular skills (copied files) and tracked repositories (git clones).

    AspectRegular SkillTracked Repo
    SourceCopied to sourceCloned with .git
    Updateinstall --updateupdate <name> (git pull)
    PrefixNone_ prefix
    Nested skillsFlattenedFlattened with __

    The _ prefix is used to identify tracked repositories, helping prevent name collisions and making them easily identifiable in listings.