Skip to main content

Filtering Reference

Complete specification of the three filtering layers that control which skills reach which targets.

Looking for quick guidance?

See Filtering Skills for a scenario-driven guide.

Overview

LayerScopeWhere to setSyntaxEvaluated at
.skillignoreHides from all targetsSource dir or tracked repo rootgitignoreDiscovery
SKILL.md targetsRestricts to listed targetsPer skill frontmatterYAML listSync (parsed at discovery)
Target include/excludePer targetconfig.yaml or CLI flagsGo filepath.Match globSync
Sync mode caveat

All three layers only apply to merge and copy sync modes. In symlink mode the entire source directory is linked as one unit — per-skill filtering has no effect.

Evaluation order and precedence

A skill must pass all layers to reach a target:

  1. .skillignore — evaluated at discovery. Matching skills never enter the sync pipeline.
  2. Target include/exclude — evaluated at sync (FilterSkills). Skills are discovered but skipped for non-matching targets.
  3. SKILL.md targets — evaluated at sync (FilterSkillsByTarget). Skills are restricted to their declared targets.

.skillignore

Locations:

  • Source root: ~/.config/skillshare/skills/.skillignore — applies to all skills
  • Tracked repo root: _team-repo/.skillignore — applies only within that repo

Syntax: Full gitignore* (single segment), ** (any depth), ?, [abc], !pattern (negation), /pattern (anchored), pattern/ (directory-only).

.skillignore.local: Place alongside .skillignore. Patterns are appended after the base file — last matching rule wins. Use !pattern to un-ignore. Don't commit this file.

CLI visibility:

CommandOutput
skillshare syncCount + skill names
skillshare status --jsonsource.skillignore object with patterns and ignored list
skillshare doctorPattern count and ignored count

📖 File structure reference

SKILL.md targets field

Format: Top-level or nested under metadata:

# Either format works
targets: [claude, cursor]

# Or nested
metadata:
targets: [claude, cursor]

Behavior: Whitelist — the skill only syncs to the listed targets. Omitting the field means sync to all targets.

Aliases: Target names support aliases. claude matches a target configured as claude-code. See Supported Targets.

📖 Skill format — targets field

Target include/exclude filters

Set via CLI:

skillshare target claude --add-include "team-*"
skillshare target cursor --add-exclude "legacy-*"
skillshare target claude --remove-include "team-*"

Stored in: config.yaml under targets.<name>.include / targets.<name>.exclude.

Syntax: Go filepath.Match glob patterns matched against the flat skill name (e.g., _team__frontend__ui).

SupportedNot supported
* (any chars)** (recursive)
? (single char){a,b} (brace expansion)
[abc] (char class)

Precedence: When both include and exclude are set, include is applied first, then exclude. A skill matching both is excluded.

Visual editor: skillshare ui → Targets page → "Customize filters" button.

📖 Target command · Filter behavior examples · Configuration

See also