Agent SkillsAgent Skills

Skill Composition

Compose, split, test, and sandbox preview skills

composetestsplitsandbox

compose#

Combine multiple skills into a single "super-skill."

skills compose <skills...> [options]
OptionDescription
-o, --output <name>Output skill name (default: composed-skill)
-s, --strategy <type>Composition strategy: merge, chain, conditional (default: merge)
--no-dedupDisable deduplication in merge mode
--saveAuto-save to global skills directory

Composition strategies:

StrategyDescription
mergeCombines all sections, deduplicates similar lines (default)
chainSequences skills with ordered phase markers
conditionalWraps each skill in a conditional activation block

Examples:

# Merge two frontend skills
skills compose frontend-design frontend-code-review -o frontend-pro

# Chain skills in sequence
skills compose setup coding-style testing -o full-workflow -s chain --save

# Conditional activation
skills compose python-pro typescript-pro -o polyglot -s conditional

Output:

✔ Composed "combined-frontend"
  Source skills: frontend-design, frontend-code-review
  Strategy:      merge
  Token count:   1729
  Deduplicated:  1 redundant lines removed
  Saved to:      ~/.antigravity/skills/combined-frontend/SKILL.md

test#

Run quality tests and assertions against skills.

skills test [skills...] [options]
OptionDescription
-a, --allTest all installed skills
--jsonOutput results as JSON
-v, --verboseShow all assertions (not just failures)

10 built-in assertions:

CategoryAssertionDescription
StructureSKILL.md existsSkill file must be present
StructureValid frontmatterMust parse without errors
StructureHas nameFrontmatter includes name field
StructureHas descriptionFrontmatter includes description field
ContentHas sectionsAt least 2 markdown headings
ContentHas code examplesAt least one fenced code block
ContentHas "when to use"Describes activation criteria
QualityDescription < 200 charsConcise, scannable description
QualityNo TODOs/FIXMEsNo placeholder content
QualityMinimum lengthContent is at least 100 characters

Custom tests: Create a skill-test.yml in your skill directory:

tests:
  - name: "Uses TypeScript examples"
    type: contains
    value: "typescript"
  - name: "Mentions error handling"
    type: contains
    value: "error"

Examples:

skills test frontend-design              # Test a specific skill
skills test --all --verbose             # Test all, show all assertions
skills test --all --json                # Machine-readable for CI

Output:

🧪 Skill Test Results
  ✗ frontend-design 70% (7ms)
    ✗ Has "when to use" section
    ✗ Has code examples
    ✗ Description is concise

  Summary: 0 passed / 1 failed / 1 total

CI Integration: Exits with code 1 on any failure, making it ideal for CI pipelines.


split#

Split a large skill into focused sub-skills by topic.

skills split <skill> [options]
OptionDescription
-m, --min-sections <n>Minimum sections per sub-skill (default: 2)
--save <dir>Save sub-skills to directory
--dry-runOnly preview the split, do not save
--jsonOutput as JSON

Topic categories used for clustering:

setup, coding-style, testing, architecture, deployment, security, api, database, documentation, performance

Examples:

skills split skill-creator --dry-run    # Preview the split
skills split big-skill --save ./output  # Save sub-skills
skills split monolith --min-sections 3  # Require 3+ sections per group

Output:

✂️  Skill Splitter: skill-creator
  Original: 4426 tokens

  Can be split into 8 sub-skills:
  📦 testing (300 tokens) — About Skills, What Skills Provide, Iterate
  📦 deployment (785 tokens) — Core Principles, Concise is Key, ...
  📦 setup (955 tokens) — SKILL.md (required), Quick start, ...
  📦 database (983 tokens) — Bundled Resources, Planning, ...
  ...

sandbox#

Preview a skill's quality, conflicts, and token impact before installing.

skills sandbox <source> [options]
OptionDescription
-f, --format <format>Output format: text, json

Accepts local paths or remote GitHub sources (@owner/repo). Runs three analyses:

  1. Skill Info — Name, description, token count, line count
  2. Quality Score — Grade (A–F) from the built-in test framework
  3. Conflict Analysis — Checks for overlaps with already-installed skills

Examples:

skills sandbox ~/.antigravity/skills/my-skill     # Local skill
skills sandbox @owner/repo                        # Remote skill
skills sandbox ./my-skill                         # Relative path

Output:

🧪 Sandbox Preview: frontend-design

  📋 Skill Info
    Name:        frontend-design
    Tokens:      1069
    Lines:       42

  🧪 Quality Score
    Grade: C (70%)
    Issues:
      ✗ Has "when to use" section
      ✗ Has code examples

  ⚔️  Conflict Analysis
    1 overlap(s) found (~842 wasted tokens)

  📊 Verdict
    This skill would consume ~1069 tokens of your context budget.