Agent Skills: Advanced Lint and Format Modes

Run lint and format checks in the Commons monorepo. Use when validating code style, checking for linting errors, before commits, or when the user mentions linting or formatting code.

UncategorizedID: jakewaldrip/.dotfiles/lint-running

Install this agent skill to your local

pnpm dlx add-skill https://github.com/jakewaldrip/.dotfiles/tree/HEAD/misc/commons/.opencode/skills/lint-running

Skill Files

Browse the full folder contents for lint-running.

Download Skill

Loading file tree…

misc/commons/.opencode/skills/lint-running/SKILL.md

Skill Metadata

Name
lint-running
Description
Advanced lint/format modes in the Commons monorepo — git-affected linting across a stack, auto-fix, and the full-CI lint pipeline. For routine "lint this file's project" resolution, call the nx-project-for-file tool instead.

Advanced Lint and Format Modes

Project + command resolution: Call the nx-project-for-file tool with the file path. It returns the owning project and the exact npx nx run-many --targets "lint:check,format:check" -p <project> command for the single-file/single-project case. This skill covers only the modes the tool does not emit.

Targets

| Target | Purpose | |--------|---------| | lint:check | ESLint code quality check | | format:check | Prettier formatting check | | lint:fix | ESLint auto-fix | | format:write | Prettier auto-fix |

Auto-fix (specific projects)

npx nx run-many --targets "lint:fix,format:write" -p <project1>,<project2>

Git-based (changed files across a stack)

When no specific files are given, lint affected projects using Graphite's parent as the base (correct for stacked PRs):

npx nx affected --base=$(gt parent) --targets "lint:check,format:check"

Full CI lint pipeline (entire codebase)

# Step 1: Generate builder slugs (required)
npx nx codegen @cityblock/builder

# Step 2: Run all lint checks
npx nx run-many --targets "lint:check,format:check"

Troubleshooting

| Issue | Solution | |-------|----------| | EPERM errors | Run with sandbox disabled | | Project not found | Call the nx-project-for-file tool to resolve the correct project name | | Long execution | Normal for large monorepos (10+ minutes) |