best-practices
SkillDev toolsCode Quality Best Practices
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the best-practices skill
What this skill tells your AI
The instructions your AI receives, as published by caido-community/shift in .agents/skills/best-practices/SKILL.md and read by ahel’s review.
TypeScript and Code Quality
- Use TypeScript for all files.
- Only use types, not interfaces.
- Do not use
anytype. - Use
undefinedovernull. - Do not add any comments to the code that you generate.
- Don’t cast to
any. - Don’t unnecessarily add
try/catch. - Use
computedfor derived state instead of reactive variables when possible. - Use
knipto remove unused code if making large changes. - When refactoring, avoid creating alias types like this:
export type Options = ScanConfig;
Instead, actually rename the type and fix all occurrences if needed.
Structure, Naming, and Organization
- Follow consistent naming conventions:
- Folders: camelCase (
intercept,replay,httpHistory). - Component folders: PascalCase (
PassiveFormCreate,PassiveTable). - All other files: camelCase (
useForm.ts,assistant.graphql).
- Folders: camelCase (
- Avoid massive template blocks; compose smaller components.
- Colocate code that changes together.
- Declare variables close to their usage:
- Avoid declaring all variables at the top of functions/files.
- Place variable declarations as close as possible to where they are first used.
- Group related variables together (e.g., event bus declarations next to their corresponding listeners).
Simplicity and Readability
- Only create an abstraction if it is actually needed.
- Prefer clear function and variable names over inline comments.
- Avoid helper functions when a simple inline expression would suffice.
- Use built-in Tailwind values, occasionally allow dynamic values, rarely globals.
- Try to use utils like
isPresentwhere possible
Result Types
- Use existing Result types from the codebase (
ToolResult,ActionResult,Result) instead of creating custom ones. - Return
ToolResult.ok({ message, ...data })orToolResult.err(message, detail?)for agent tools. - Return
ActionResult.ok(message)orActionResult.err(message, detail?)for float actions. - Return
Result.ok(value)orResult.err(error)for normal functions that need proper safe error handling. - Never throw exceptions in tool/action implementations; always return Result types.
Signals
- GitHub stars
- 57
- Forks
- 13
- Last commit
- Jul 2026
Advanced
- Catalog kind
- skill
- Gateway key
best-practices-caido-community- Source
- github.com/caido-community/shift