lambda-inspect
v0.0.3
Published
Identify bad practices in AWS Lambda TypeScript code and let AI Agent to fix issues
Downloads
320
Readme
Lambda Inspect
A tool to inspect AWS Lambda functions for bad practices and unused files. It specifically detects issues like re-used libraries instantiated inside handler functions and uses Knip to find unused files.
Made with Google Antigravity.
Features
- Bad Practice Detection: Identifies libraries instantiated inside the handler that should be in the global scope for better performance (e.g., AWS SDK clients, database connections).
- Unused File Detection: Integrates with Knip to find files that are not being used in your project.
Install
npx lambda-inspect@latest <path-to-handler>Install Agent Skill
curl -fsSL https://raw.githubusercontent.com/rajikaimal/lambda-inspect/main/install-skill.sh | bashUsage
After building the project, you can run the CLI using:
$ lambda-inspect <path-to-handler>
$ lambda-inspect <path-to-handler> --skip-unused-filesOptions
--skip-unused-files: Skip unused files detection (default:false).
Development
Prerequisites
- Node.js (>= 22)
- pnpm
Getting Started
Install dependencies:
pnpm installCommands
| Command | Description |
| -------------- | ---------------------------------- |
| pnpm build | Build the project |
| pnpm dev | Run in development mode with watch |
| pnpm test | Run tests |
| pnpm lint | Run linting (using oxlint) |
| pnpm format | Format code (using oxfmt) |
| pnpm knip | Run Knip analysis |
| pnpm publish | Publish to NPM |
License
MIT
