n-lint

Runs delta lint on changed files versus origin and fixes violations until exit code zero.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/nitra/7n-test --skill n-lint-nitra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-lint
Source: https://github.com/nitra/7n-test/tree/main/.cursor/skills/n-lint
Command: npx skills add https://github.com/nitra/7n-test --skill n-lint-nitra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @7n/rules, @7n/mt.

What problem does it solve? Linting an entire repository on every task is slow and noisy. This Skill runs a delta lint with npx @7n/rules lint that checks only files changed versus origin, then guides the agent through fixing violations until the command exits cleanly with code 0. ## Core Features & Use Cases - Delta Lint Workflow: Runs npx @7n/rules lint on changed files only, iterating auto-fixes and manual refactors until a clean exit code 0. - Worktree Isolation: Executes exclusively in a dedicated git worktree (.worktrees/<branch>-lint/) created via a mandatory preflight, keeping the main tree untouched. - Interactive Exception Policy: Blocks silent edits to ignore configs (jscpd, cspell, knip, oxlint) and requires asking the user before adding any lint exception. - Use Case: After modifying several TypeScript files on a feature branch, invoke this Skill to lint only your changes, refactor a jscpd duplicate and a cognitive-complexity warning, and confirm a clean final run. ## Quick Start Run the n-lint skill to lint my changed files against origin and fix all violations until the lint passes cleanly.

Frequently Asked Questions about n-lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lint only changed files in a git repository?

Run npx @7n/rules lint, which performs delta linting on files changed versus origin rather than scanning the whole repository. Repeat the run after fixes until it exits with code 0.

How to fix jscpd duplicate code violations?

Refactor the duplicated code into a shared function by default, since jscpd has no auto-fix. Adding entries to .jscpd.json ignore or minLines requires explicit user approval through an interactive question first.

Can I add eslint-disable comments to silence cognitive-complexity warnings?

No, eslint-disable comments on sonarjs/cognitive-complexity are prohibited. You must refactor the code to reduce complexity, and verify behavior with existing or newly added tests before and after refactoring.

Why does this lint workflow require a git worktree?

The skill is worktree-only: a preflight step creates .worktrees/<branch>-lint/ via npx @7n/mt worktree create and runs bun install there. This isolates lint fixes from the main working tree and allows only one instance at a time.

When should I run lint --full instead of delta lint?

lint --full is a CI-mode command that scans the entire repository regardless of changes and should not be run during a task. It uses a global queue allowing one full run per machine, with a 45-minute fail-closed timeout.