From sap-cap-capire
Guides SAP CAP development using Capire: CDS models/services, HANA/SQLite/PostgreSQL databases, Node.js/Java runtimes, Fiori UIs, BTP Cloud Foundry/Kyma deployment, auth/multitenancy, OData.
npx claudepluginhub secondsky/sap-skills --plugin sap-cap-capireThis skill uses the workspace's default tool permissions.
- **sap-fiori-tools**: Use for UI layer development, Fiori Elements integration, and frontend application generation
README.mdSKILL.md.backupreferences/annotations-reference.mdreferences/cdl-syntax.mdreferences/cli-complete.mdreferences/consuming-services-deployment.mdreferences/cql-patterns.mdreferences/cql-queries.mdreferences/csn-cqn-cxn.mdreferences/data-privacy-security.mdreferences/databases.mdreferences/deployment-cf.mdreferences/event-handlers-nodejs.mdreferences/event-handlers-patterns.mdreferences/extensibility-multitenancy.mdreferences/fiori-integration.mdreferences/java-runtime.mdreferences/localization-temporal.mdreferences/mcp-integration.mdreferences/mcp-use-cases.mdGenerates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
# Install CAP development kit
npm i -g @sap/cds-dk @sap/cds-lsp
# Create new project
cds init <project-name>
cds init <project-name> --add sample,hana
# Start development server with live reload
cds watch
# Add capabilities
cds add hana # SAP HANA database
cds add sqlite # SQLite for development
cds add xsuaa # Authentication
cds add mta # Cloud Foundry deployment
cds add multitenancy # SaaS multitenancy
cds add typescript # TypeScript support
using { cuid, managed } from '@sap/cds/common';
namespace my.bookshop;
entity Books : cuid, managed {
title : String(111) not null;
author : Association to Authors;
stock : Integer;
price : Decimal(9,2);
}
entity Authors : cuid, managed {
name : String(111);
books : Association to many Books on books.author = $self;
}
using { my.bookshop as my } from '../db/schema';
service CatalogService @(path: '/browse') {
@readonly entity Books as projection on my.Books;
@readonly entity Authors as projection on my.Authors;
@requires: 'authenticated-user'
action submitOrder(book: Books:ID, quantity: Integer) returns String;
}
This skill integrates with the official CAP MCP (Model Context Protocol) server, providing AI agents with live access to your project's compiled CDS model and CAP documentation.
Available MCP Tools:
search_model - Fuzzy search for CDS entities, services, actions, and relationships in your compiled CSN modelsearch_docs - Semantic search through CAP documentation for syntax, patterns, and best practicesKey Benefits:
Setup: See MCP Integration Guide for configuration with Claude Code, opencode, or GitHub Copilot.
Use Cases: See MCP Use Cases for real-world examples with quantified ROI (~$131K/developer/year time savings).
Agent Integration: The specialized agents (cap-cds-modeler, cap-service-developer, cap-project-architect, cap-performance-debugger) automatically use these MCP tools as part of their workflows.
project/
├── app/ # UI content (Fiori, UI5)
├── srv/ # Service definitions (.cds, .js/.ts)
├── db/ # Data models and schema
│ ├── schema.cds # Entity definitions
│ └── data/ # CSV seed data
├── package.json # Dependencies and CDS config
└── .cdsrc.json # CDS configuration (optional)
| CDS Type | SQL Mapping | Common Use |
|---|---|---|
UUID | NVARCHAR(36) | Primary keys |
String(n) | NVARCHAR(n) | Text fields |
Integer | INTEGER | Whole numbers |
Decimal(p,s) | DECIMAL(p,s) | Monetary values |
Boolean | BOOLEAN | True/false |
Date | DATE | Calendar dates |
Timestamp | TIMESTAMP | Date/time |
using { cuid, managed, temporal } from '@sap/cds/common';
// cuid = UUID key
// managed = createdAt, createdBy, modifiedAt, modifiedBy
// temporal = validFrom, validTo
// srv/cat-service.js
module.exports = class CatalogService extends cds.ApplicationService {
init() {
const { Books } = this.entities;
// Before handlers - validation
this.before('CREATE', Books, req => {
if (!req.data.title) req.error(400, 'Title required');
});
// On handlers - custom logic
this.on('submitOrder', async req => {
const { book, quantity } = req.data;
// Custom business logic
return { success: true };
});
return super.init();
}
}
const { Books } = cds.entities;
// SELECT with conditions
const books = await SELECT.from(Books)
.where({ stock: { '>': 0 } })
.orderBy('title');
// INSERT
await INSERT.into(Books)
.entries({ title: 'New Book', stock: 10 });
// UPDATE
await UPDATE(Books, bookId)
.set({ stock: { '-=': 1 } });
// package.json
{
"cds": {
"requires": {
"db": {
"[development]": {
"kind": "sqlite",
"credentials": { "url": ":memory:" }
},
"[production]": { "kind": "hana" }
}
}
}
}
cds add hana
cds deploy --to hana
db/data/my.bookshop-Books.csv<namespace>-<EntityName>.csv# Add CF deployment support
cds add hana,xsuaa,mta,approuter
# Build and deploy
npm install --package-lock-only
mbt build
cf deploy mta_archives/<project>_<version>.mtar
cds add multitenancy
Configuration:
{
"cds": {
"requires": {
"multitenancy": true
}
}
}
// Service-level
@requires: 'authenticated-user'
service CatalogService { ... }
// Entity-level
@restrict: [
{ grant: 'READ' },
{ grant: 'WRITE', to: 'admin' }
]
entity Books { ... }
cds init [name] # Create project
cds add <feature> # Add capability
cds watch # Dev server with live reload
cds serve # Start server
cds compile <model> # Compile CDS to CSN/SQL/EDMX
cds deploy --to hana # Deploy to HANA
cds build # Build for deployment
cds env # Show configuration
cds repl # Interactive REPL
cds version # Show version info
cuid and managed aspects from @sap/cds/commondb/, services in srv/, UI in app/