SAP Cloud Application Programming Model (CAP) development skill using Capire documentation. Use when: building CAP applications, defining CDS models, implementing services, working with SAP HANA/SQLite/PostgreSQL databases, deploying to SAP BTP Cloud Foundry or Kyma, implementing Fiori UIs, handling authorization, multitenancy, or messaging. Covers CDL/CQL/CSN syntax, Node.js and Java runtimes, event handlers, OData services, and CAP plugins.
/plugin marketplace add secondsky/sap-skills/plugin install sap-cap-capire@sap-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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.md# Install CAP development kit
npm i -g @sap/cds-dk
# 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/This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.