Expert assistant for the CPG (Code Property Graph) project ecosystem. Supports multi-language code analysis platform with Kotlin/Spring Boot backend, Svelte 5 frontend, and various language-specific frontends.
This skill has safety concerns that you should review before use. Some patterns were detected that may pose a risk.Safety score: 60/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
Expert assistant for the CPG (Code Property Graph) project ecosystem, providing guidance on code analysis platform development with Kotlin backends, Svelte 5 frontends, and language-specific analysis modules.
The CPG project is a comprehensive platform for code analysis and security compliance consisting of multiple modules:
1. **Always use `pnpm` for Node.js/JavaScript/TypeScript projects**
- Use `pnpm install` instead of `npm install`
- Use `pnpm add` instead of `npm install <package>`
- Use `pnpm run` for running scripts
- Execute pnpm commands from the `codyze-console/src/main/webapp` directory
2. **Technology Stack Awareness**
- Backend: Kotlin with Spring Boot
- Frontend: Svelte 5 with SvelteKit
- Styling: Tailwind CSS
- Package Manager: pnpm
3. **Svelte 5 Runes Syntax (Critical)**
- Use `let variableName = $state(initialValue)` for reactive state
- Use `const derivedValue = $derived(expression)` for computed values
- Use `$effect(() => { ... })` for side effects
- Use `let { prop1, prop2 }: Props = $props()` for component props
- Use modern event syntax: `onclick` instead of `on:click`
4. **SvelteKit Load Pattern with Runes**
Define data loading in `+page.ts`:
```ts
import type { PageLoad } from './$types';
export const load: PageLoad = async ({ fetch }) => {
const response = await fetch('/api/endpoint');
const data = await response.json();
return { data };
};
```
Access loaded data in `+page.svelte`:
```svelte
<script lang="ts">
import type { PageProps } from './$types';
let { data }: PageProps = $props();
const items = $derived(data.items || []);
</script>
```
5. **Component Design Principles**
- Use clean separation of components with reusable, modular structure
- Apply clean, minimal design with limited shadows
- Use Tailwind CSS for styling
- Follow accessibility best practices (semantic HTML, proper ARIA roles)
- Use proper `<button>` elements for interactive content instead of clickable divs
6. **Building and Testing Console**
- Check Kotlin compilation: `./gradlew :codyze-console:compileKotlin --console=plain` from root project directory
- Run pnpm commands from `codyze-console/src/main/webapp` directory
- For backend startup, ask the user to handle it directly
7. **Known Issues**
- `svelte-highlight` package doesn't support Svelte 5 runes mode; consider alternatives or workarounds
8. **Technology Stack**
- Language: Kotlin
- Build Tool: Gradle with Kotlin DSL
- Testing: JUnit 5 (using `kotlin.test` wrapper), Mockk
- Documentation: KDoc
9. **Kotlin Code Style**
- Follow Kotlin coding conventions
- Use meaningful variable and function names
- Write comprehensive KDoc comments for public APIs
- Prefer immutable data structures where possible
- Use sealed classes for representing state and results
10. **Testing Standards**
- Write unit tests for all public APIs
- Use descriptive test method names
- Follow AAA pattern (Arrange, Act, Assert)
- Mock external dependencies appropriately with Mockk
11. **CLI Design Principles**
- Language: Kotlin
- CLI Framework: Clikt
- Configuration: YAML/JSON
- Provide clear help messages and examples
- Use consistent command naming
- Support both short and long option names
- Validate input parameters early with meaningful error messages
12. **Git Workflow**
- Use conventional commit messages
- Create feature branches for new functionality
- Write descriptive commit messages
- Include relevant issue numbers in commits
13. **Documentation**
- Keep README files up to date
- Document API changes in appropriate files
- Use clear examples in documentation
- Include troubleshooting sections where relevant
14. **Error Handling**
- Provide meaningful error messages
- Log appropriate information for debugging
- Handle edge cases gracefully
- Use appropriate exception types
15. **Prompt Output**
- Keep summaries brief; detailed change explanations are not required
```svelte
<script lang="ts">
import type { PageProps } from './$types';
let { data }: PageProps = $props();
let count = $state(0);
const doubled = $derived(count * 2);
$effect(() => {
console.log('Count changed:', count);
});
</script>
<button onclick={() => count++}>
Count: {count}, Doubled: {doubled}
</button>
```
```kotlin
import kotlin.test.Test
import kotlin.test.assertEquals
import io.mockk.mockk
class AnalysisTest {
@Test
fun `should analyze code correctly`() {
// Arrange
val analyzer = CodeAnalyzer()
val input = mockk<CodeInput>()
// Act
val result = analyzer.analyze(input)
// Assert
assertEquals(expected, result)
}
}
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/cpg-copilot-assistant/raw