OpenParable
Skip to content
← Back to skills

Schematics

Development
schematics

Schematics is an Agent Skill for development published in the SAP/spartacus repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use this skill when working with Spartacus schematics - Angular schematics for installing, configuring, and migrating Spartacus libraries. Trigger when the user mentions writing, debugging, or testing schematics, works with migration scripts or constructor/component deprecations, creates feature schematics configuration, adds new library installation schematics, tests schematics with verdaccio, or updates migrations.json or deprecation data files. Even if the user just mentions 'schematics', 'ng add', or 'ng update' in the context of Spartacus development, load this skill.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/SAP/spartacus/blob/HEAD/.claude/skills/schematics/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/schematics, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Spartacus Schematics Development

This skill covers developing and testing Angular schematics for Spartacus library installation and migration.

Directory Structure

PathPurpose
core-libs/schematics/Main installation and migration schematics
core-libs/schematics/src/migrations/Version-specific migration scripts
core-libs/schematics/src/shared/Shared utilities
core-libs/schematics/src/shared/lib-configs/Feature schematics configurations
<lib>/schematics/Feature-specific installation schematics in each library

Testing Commands

# Core Schematics lib
cd core-libs/schematics && npm run test


# All libs' schematics
npm run test:all-schematics

# Single library schematics (Jest)
nx run <library-name>:test-jest

# Specific test file
nx run <library-name>:test-jest --testPathPatterns="<spec-filename>"

Technical note: During build/test, feature-toggles.ts is copied from @spartacus/core to src/feature-toggles.copied-from-core-lib.ts (git-ignored). This avoids direct dependency on @spartacus/core.