/cap-cds-reference
Topic: entities, services, annotations, queries, or types
$ npx -y skills add secondsky/sap-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cap-cds-reference
Context preview
What this command does when you run it.
Topic: entities, services, annotations, queries, or types
Command definition
cap-cds-reference.mdname: cap-cds-reference
description: Quick CDS syntax reference for entities, services, annotations, and queries
allowed-tools:
- Read
- Grep
- Glob
argument-hint: "[topic]"
arguments:
- name: topic
description: "Topic: entities, services, annotations, queries, or types"
required: falseShell Snippet Notes
- Shell snippets assume Bash on Linux/macOS, WSL2, or Git Bash.
- Install the command-specific tooling shown near each snippet before running it.
- Confirm before running commands that delete files, change ownership, deploy, or modify remote systems.
Output Contract
Return the requested CDS reference, version-sensitive caveats, minimal examples, and related CAP commands or references. Default to read-only guidance and mark runtime or activation checks as pending unless project evidence is available.
CAP CDS Quick Reference
Comprehensive CDS (Core Data Services) syntax reference for SAP Cloud Application Programming Model.
Entities
Basic Entity
entity Books {
key ID : UUID;
title : String(100);
price : Decimal(10,2);
stock : Integer;
}Entity with Aspects
using { cuid, managed } from '@sap/cds/common';
entity Books : cuid, managed {
title : String(100);
price : Decimal(10,2);
}
// cuid adds: ID : UUID
// managed adds: createdAt, createdBy, modifiedAt, modifiedByAssociations
entity Books {
key ID : UUID;
title : String(100);
author : Association to Authors; // to-one
reviews : Composition of many Reviews on reviews.book = $self; // to-many
}Services
Basic Service
service CatalogService {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
}Service with Actions
service OrdersService {
entity Orders as projection on my.Orders actions {
action cancel() returns String;
};
}Annotations
Basic Annotations
entity Books {
title : String(100) @title: 'Book Title';
price : Decimal(10,2) @title: 'Price';
stock : Integer @assert.range: [0, 9999];
}UI Annotations (Fiori)
annotate CatalogService.Books with @(
UI.LineItem: [
{ Value: title, Label: 'Title' },
{ Value: author.name, Label: 'Author' }
]
);CQL Queries
SELECT
const books = await SELECT.from(Books);
const book = await SELECT.one.from(Books).where({ ID: bookID });INSERT
await INSERT.into(Books).entries({ title: 'CAP Guide', price: 29.99 });UPDATE
await UPDATE(Books).set({ stock: stock + 10 }).where({ ID: bookID });DELETE
await DELETE.from(Books).where({ ID: bookID });Complete Reference
For comprehensive documentation, see:
- [CDL Syntax Reference](../skills/sap-cap-capire/references/cdl-syntax.md)
- [Annotations Reference](../skills/sap-cap-capire/references/annotations-reference.md)
- [CQL Queries Reference](../skills/sap-cap-capire/references/cql-queries.md)
Read more
name: cap-cds-reference
description: Quick CDS syntax reference for entities, services, annotations, and queries
allowed-tools:
- Read
- Grep
- Glob
argument-hint: "[topic]"
arguments:
- name: topic
description: "Topic: entities, services, annotations, queries, or types"
required: falseShell Snippet Notes
- Shell snippets assume Bash on Linux/macOS, WSL2, or Git Bash.
- Install the command-specific tooling shown near each snippet before running it.
- Confirm before running commands that delete files, change ownership, deploy, or modify remote systems.
Output Contract
Return the requested CDS reference, version-sensitive caveats, minimal examples, and related CAP commands or references. Default to read-only guidance and mark runtime or activation checks as pending unless project evidence is available.
CAP CDS Quick Reference
Comprehensive CDS (Core Data Services) syntax reference for SAP Cloud Application Programming Model.
Entities
Basic Entity
entity Books {
key ID : UUID;
title : String(100);
price : Decimal(10,2);
stock : Integer;
}Entity with Aspects
using { cuid, managed } from '@sap/cds/common';
entity Books : cuid, managed {
title : String(100);
price : Decimal(10,2);
}
// cuid adds: ID : UUID
// managed adds: createdAt, createdBy, modifiedAt, modifiedByAssociations
entity Books {
key ID : UUID;
title : String(100);
author : Association to Authors; // to-one
reviews : Composition of many Reviews on reviews.book = $self; // to-many
}Services
Basic Service
service CatalogService {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
}Service with Actions
service OrdersService {
entity Orders as projection on my.Orders actions {
action cancel() returns String;
};
}Annotations
Basic Annotations
entity Books {
title : String(100) @title: 'Book Title';
price : Decimal(10,2) @title: 'Price';
stock : Integer @assert.range: [0, 9999];
}UI Annotations (Fiori)
annotate CatalogService.Books with @(
UI.LineItem: [
{ Value: title, Label: 'Title' },
{ Value: author.name, Label: 'Author' }
]
);CQL Queries
SELECT
const books = await SELECT.from(Books);
const book = await SELECT.one.from(Books).where({ ID: bookID });INSERT
await INSERT.into(Books).entries({ title: 'CAP Guide', price: 29.99 });UPDATE
await UPDATE(Books).set({ stock: stock + 10 }).where({ ID: bookID });DELETE
await DELETE.from(Books).where({ ID: bookID });Complete Reference
For comprehensive documentation, see:
- [CDL Syntax Reference](../skills/sap-cap-capire/references/cdl-syntax.md)
- [Annotations Reference](../skills/sap-cap-capire/references/annotations-reference.md)
- [CQL Queries Reference](../skills/sap-cap-capire/references/cql-queries.md)
40 SAP development plugins with evidence-tracked verification SAP development plugins for AI coding assistants, with public-source or package-registry verification tracked where available.
Repo: secondsky/sap-skills
Other commands on sap-skills.
- /abap-cds-model-check
Optional intended usage such as analytical, transactional, reuse, value-help, or extraction
Open command - /abap-cloud-review
Optional target ABAP platform or SAP BTP ABAP Environment release
Open command - /ai-core-deployment-check
Optional runtime or scenario name, such as orchestration, serving, training, or batch
Open command - /api-style-review
Optional API style lens such as REST, OData, OpenAPI, or SDK
Open command - /btp-architecture-review
Optional scenario lens such as extension, integration, analytics, or AI
Open command - /work-zone-content-check
Optional Work Zone edition or content type
Open command

