home / skills / kevinslin / llm / dev.lint

dev.lint skill

/skills/dev.lint

This skill runs lint and format scripts to ensure code quality and consistency, reporting success or automatically fixing issues.

npx playbooks add skill kevinslin/llm --skill dev.lint

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
272 B
---
name: dev.lint
description: lint project
version: 0.0.0
---

Run the following scripts in order:

```
npm run lint
npm run format
```

Print "success" if both are successful. If you encounter errors, try to fix the errors and run lint again to verify errors are fixed

Overview

This skill runs linting and formatting workflows for a JavaScript project and reports status. It executes the project's lint and format npm scripts, attempts automated fixes when possible, and returns a clear success or failure result. The goal is to ensure code quality checks pass before commits or CI runs.

How this skill works

The skill runs npm run lint followed by npm run format in the project root. If lint reports errors that can be auto-fixed, the skill applies fixes, reruns lint, and verifies the errors are resolved. If both commands complete without error it prints "success"; otherwise it surfaces remaining issues and suggests remediation steps.

When to use it

  • Before committing or opening a pull request to ensure code style and lint rules pass
  • As a pre-merge CI step to enforce consistent formatting and catch static issues early
  • During local development to automatically apply formatter rules and reduce manual fixes
  • When onboarding a new contributor to validate their environment runs the same checks

Best practices

  • Ensure npm scripts lint and format are defined and configured in package.json
  • Run the skill from the project root where node modules and config files (ESLint, Prettier) are present
  • Commit configuration files (.eslintrc, .prettierrc, etc.) so lint/format behave consistently across environments
  • If lint errors persist after auto-fixing, open the reported files and fix logic issues manually, then re-run lint
  • Keep devDependencies for ESLint and formatters up to date to avoid rule mismatches

Example use cases

  • Pre-commit hook integration that calls the skill to auto-fix formatting and fail commits if lint errors remain
  • CI pipeline step that enforces code quality by running the skill and rejecting builds on failure
  • Local developer workflow: run the skill to auto-format code and catch eslint rule violations before pushing
  • Automated PR bot that runs the skill and posts results or fixes to the pull request comments

FAQ

What does the skill print when all checks pass?

It prints "success" when both lint and format complete without errors.

What happens if lint reports errors that cannot be auto-fixed?

The skill reports the remaining lint errors and suggests opening the affected files to fix logic or rule violations, then re-run lint to verify.