AI-powered incident response automation for DevOps teams. Provides coding standards, build commands, and architectural guidance for the Triage monorepo project.
AI assistant for developing and maintaining Triage, an incident response automation platform. Provides project-specific coding standards, build workflows, and architectural guidance.
This skill helps you work with the Triage codebase by:
When building or testing the project:
1. **Root level operations:**
- Build: Run `pnpm build`
- Lint and fix: Run `pnpm lint:fix`
2. **Desktop app operations:**
- Build: Run `pnpm build`
- Lint and fix: Run `pnpm lint:fix`
- Start: Run `pnpm start`
#### General TypeScript & JavaScript
1. **Formatting:**
- Follow Prettier config: double quotes, semicolons, ES5 trailing commas
- 100 character line length
- 2 space indentation
2. **TypeScript:**
- Use strict typing (no `any` without justification)
- Provide explicit return types on functions
- Use proper type imports where applicable
3. **Imports:**
- Group imports: external libraries first, then internal modules
- Sort alphabetically within each group
- Use NodeNext import statements with `.js` extensions (files are TypeScript but import transpiled versions)
- Avoid dynamic imports unless necessary
- Import from top-level directories or packages rather than deep subdirectories when possible
4. **Naming Conventions:**
- Variables and functions: `camelCase`
- Classes, components, and types: `PascalCase`
- Filenames: `PascalCase` or `camelCase`
5. **Error Handling:**
- Use try/catch blocks with typed Error objects
- When throwing errors, nest information in objects to preserve stack traces:
```typescript
throw new Error("Error message", { param: value });
```
- Prefer throwing errors over calling `process.exit(1)`
6. **Logging:**
- Test code: Use `console.info` (never `console.log`)
- Application code: Use structured logging via `@triage/common`:
```typescript
import { logger } from '@triage/common';
logger.info("message");
logger.warn("message");
logger.error("message");
```
7. **Architecture:**
- Follow modular design patterns within the monorepo structure
- Use closures and scoped variables instead of module-level singletons when appropriate
- Avoid "drive-by" changes unrelated to the user's request
8. **Scripts:**
- Parse command-line arguments with `commander`
9. **Installing Dependencies:**
- NEVER add dependencies to the workspace root `package.json`
- Always add to the specific app or package that needs it
10. **Consistency:**
- Before making changes, search the codebase for related files and patterns
- Follow existing structure and conventions
- Avoid duplicating code that already exists elsewhere
#### UI Development (React, Tailwind, ShadCN, Radix)
1. **React Components:**
- Use functional components only
- Properly type all props
- Avoid `useEffect` except for external interactions or cleanup (subscriptions, etc.)
- Keep user interaction logic in event handlers
- Use inline calculations or `useMemo` for derived values
2. **State Management:**
- Prefer Zustand for state shared across many components
- Use React Query for data fetching
3. **Styling:**
- Avoid `!important` in CSS where possible
- Use Tailwind utility classes over custom CSS
- Group related utilities (layout, typography, colors)
- Use `className` prop for styling
- Extract repeated patterns into components or use `@apply` in CSS files
- Build responsive designs with Tailwind breakpoints
4. **ShadCN UI:**
- Import components from `@/components/ui`
- Use provided variants and API
- Customize via variant props when possible
- Extend with Tailwind classes when needed
5. **Radix UI:**
- Use for unstyled primitive components
- Follow Radix composition patterns
- Implement proper ARIA attributes and keyboard navigation
- Style with Tailwind CSS
- Ensure proper event handling
6. **Icons:**
- Use `lucide-react` for all icons
When working with this skill:
1. **Chain-of-Thought:** Explain reasoning before implementing solutions
2. **Concise Answers:** Be direct and technical; avoid unnecessary prose
3. **Alternative Solutions:** Suggest multiple approaches when appropriate
4. **Technical Focus:** Prioritize technical accuracy and explanations
5. **Context Loading:**
- Use [gitingest.com](https://gitingest.com) to load config and relevant files as one AI-readable page
- Use [context7.com](https://context7.com) for latest documentation
**User:** "Add a new API endpoint for incident alerts"
**Assistant:**
1. First, I'll check existing API patterns in `packages/api/src`
2. Review error handling and logging conventions
3. Create the endpoint following TypeScript strict typing
4. Import `logger` from `@triage/common` for structured logging
5. Add dependency to the `api` package's `package.json` (not workspace root)
6. Use proper error nesting: `throw new Error("message", { context })`
7. Run `pnpm lint:fix` to ensure formatting compliance
**User:** "Build a React component for displaying incident timeline"
**Assistant:**
1. Check existing components in `apps/desktop/src/components` for patterns
2. Create functional component with proper TypeScript prop types
3. Use ShadCN UI components from `@/components/ui`
4. Style with Tailwind utilities (layout, then typography, then colors)
5. Use Radix primitives for complex interactions (with ARIA support)
6. Import icons from `lucide-react`
7. Avoid `useEffect`; keep logic in event handlers
8. Run `pnpm build` and `pnpm start` to test
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/triage-incident-response-agent/raw