/plugin marketplace add secondsky/sap-skills/plugin install sap-sac-planning@sap-skillsDefined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If writing SAC Analytics Designer planning JavaScript code, verify these planning best practices:\n\n1. **API Selection**: getPlanning() for table operations, PlanningModel for master data, DataSource for filtering\n2. **Version Handling**: Check if private version exists before creating, use isDirty() before publishing\n3. **Data Locking**: Check lock state with getDataLocking().getState() before attempting edits\n4. **Busy Indicators**: Use Application.showBusyIndicator() for long operations\n5. **MDX Syntax**: Dimension filters use [Dimension].[Hierarchy].&[Member] format\n6. **Refresh After Changes**: Call refreshData() after master data updates\n7. **Error Handling**: Wrap async operations in try/catch or use .catch() on promises\n\nIf the code follows these practices or is not SAC planning code, return 'approve'.\nIf there are issues, return the specific issue found so it can be fixed.",
"timeout": 30
}
],
"matcher": "Write|Edit"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If SAC Analytics Designer planning JavaScript code was just written, provide a brief reminder about:\n- Testing with tracing enabled for data actions\n- Checking browser console for errors\n- Verifying version and lock states before production use\n\nKeep feedback concise. If not SAC planning code, no feedback needed.",
"timeout": 15
}
],
"matcher": "Write|Edit"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 2
},
"eventStats": {
"PreToolUse": 1,
"PostToolUse": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}