Install
$ agentstack add skill-cboone-agent-harness-plugins-lint-and-fix ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Lint and Fix
Detect project linters and formatters, run them with auto-fix, and resolve remaining issues.
Options
The user may provide these options inline:
- --no-commit: Skip committing and pushing (default: commit and push after fixing)
- --no-push: Commit but leave push to the caller or user (default: push after committing)
- --tool : Run only a specific tool (e.g.,
--tool eslint,--tool prettier) - --check: Run in check-only mode (report issues without fixing)
Parent Continuation Contract
When another skill invokes lint-and-fix, that parent skill may provide an explicit continuation block immediately after the command:
Parent continuation:
- Caller:
- Resume target:
- On lint success:
- On lint failure or skipped required lint work:
Honor this block as part of the lint-and-fix invocation.
--no-pushmeans "commit fixes, but leave push to the caller or user." It is not a terminal stop when a parent continuation block is supplied.- Do not ask the user whether to proceed when the continuation block says the parent should continue.
- Do not end with a vague handoff as the terminal outcome. Report the structured result and the caller resume target instead.
- On lint success, no tools detected, or no file changes needed, report the result and allow the parent to continue immediately according to
On lint success. - On unresolved lint issues, skipped required lint work, missing required tools, or tool execution failures, report a workflow failure result and list the unresolved items so the parent can follow
On lint failure or skipped required lint work.
Final output for a parent invocation must include:
Lint status:
Commit:
Unresolved or skipped:
Caller resume target:
Workflow
1. Detect Available Tools
Check for linter and formatter configuration in the project. Use Glob and Read to find config files and check for installed tools. Run detection checks in parallel where possible.
Detection Table
| Config file(s) | Tool | Fix command | Check command | | --------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------- | -------------------------------------------------------------- | | eslint.config.*, .eslintrc.* | eslint | npx eslint --fix . | npx eslint . | | .prettierrc*, prettier.config.* | prettier | npx prettier --write . | npx prettier --check . | | .markdownlint.json, .markdownlint.jsonc, .markdownlint.yaml | markdownlint | npx markdownlint-cli2 --fix "**/*.md" | npx markdownlint-cli2 "**/*.md" | | .markdownlint-cli2.* | markdownlint-cli2 | npx markdownlint-cli2 --fix "**/*.md" | npx markdownlint-cli2 "**/*.md" | | Shell scripts in project | shellcheck | (no auto-fix) | shellcheck | | Shell scripts in project | shfmt | shfmt -w | shfmt -d | | knip.json, knip.config.*, knip.ts | knip | (no auto-fix) | npx knip | | cspell.json, cspell.jsonc, .cspell.json, .cspell.jsonc, cspell.config.* | cspell | (no auto-fix) | npx cspell --dot . | | package.json has lint script | npm lint | Try npm run lint -- --fix, fall back to npm run lint | npm run lint | | package.json has format script | npm format | npm run format | Try npm run format -- --check, fall back to npm run format | | bin/lint, scripts/lint, script/lint | Project script | Try --fix first | ` | | .github/workflows/.yml, .github/workflows/.yaml run:` steps | CI workflow script | Run detected command | Run detected command |
Detection Steps
- Config files: Use Glob to check for each config pattern in the project root.
- Package.json scripts: Read
package.jsonand check forlint,format, orcheckscripts. - Shell scripts: Use Glob to find
**/*.sh,bin/*,scripts/*,script/*. If shell scripts are present, shellcheck and shfmt apply. - Project lint scripts: Check for
bin/lint,scripts/lint,script/lint. - CI workflow scripts: Scan CI workflow files for repo-specific linting and validation steps not already covered by other detection methods. See [CI Workflow Detection](#ci-workflow-detection) below.
- Tool availability: Verify detected tools are installed (check
npx,which, orpackage.jsondevDependencies).
CI Workflow Detection
Scan .github/workflows/*.yml and .github/workflows/*.yaml files to discover repo-specific linting and validation steps that go beyond standard tooling.
- Find workflow files: Use Glob to find
.github/workflows/*.ymland.github/workflows/*.yaml. - Identify lint/validation jobs: Read each workflow file. Look for jobs or steps whose
namesuggests linting, validation, or code quality (keywords: "lint", "check", "validate", "format", "style", "quality", "verify"). - Extract
run:commands: From matching jobs and steps, collect allrun:values. - Skip reusable workflow calls: If a job uses
uses: org/repo/.github/workflows/workflow.yml@ref(a reusable workflow call, e.g.,cboone/gh-actions/.github/workflows/run-go-ci.yml@v3.0.0,cboone/gh-actions/.github/workflows/run-rust-ci.yml@v3.0.0,cboone/gh-actions/.github/workflows/run-zig-ci.yml@v3.0.0), skip it entirely. Reusable workflows run in CI only and cannot be executed locally. They are not a source of locally-runnable lint commands. - Filter for repo-specific scripts: Keep commands that invoke project scripts (paths starting with
bin/,scripts/,script/,./bin/,./scripts/, or./script/). These are repo-specific validation tools. Also keep commands that invoke standalone tools not already covered by the detection table (e.g.,actionlint,taplo check). - Deduplicate: Exclude any commands already covered by earlier detection steps. For example, if
shellcheckwas already detected from shell scripts in the project, do not add a duplicate entry from the CI workflow. Similarly, ifbin/lintwas already detected as a project lint script, skip it. - Add as tools: Register each remaining command as a CI workflow script in the detected tools list. Use the script's basename or the tool name as the tool identifier. If two scripts share the same basename (e.g.,
bin/checkandscripts/check), use the relative path as the identifier to avoid collisions. These scripts typically have no auto-fix mode, so use the same command for both fix and check.
Example: A CI workflow containing these steps:
- name: Validate JSON syntax
run: bin/validate-json
- name: Validate plugin structure
run: bin/validate-plugins
Would produce two additional detected tools:
| Tool | Config | Command | | ---------------- | ---------------------------- | ---------------------- | | validate-json | CI workflow (ci.yml, step 6) | bin/validate-json | | validate-plugins | CI workflow (ci.yml, step 7) | bin/validate-plugins |
If --tool was specified, filter the detected list to only that tool. If the specified tool was not detected, report that and stop.
If no tools are detected, report that no linters or formatters were found. If a parent continuation block was supplied, report Lint status: no-tools, include the caller resume target, and allow the parent workflow to continue according to its continuation block. Otherwise stop.
2. Present Detected Tools
Before running, display the detected tools:
## Detected Linters and Formatters
| Tool | Config | Command |
|------|--------|---------|
| eslint | eslint.config.js | npx eslint --fix . |
| prettier | .prettierrc.json | npx prettier --write . |
| shellcheck | (shell scripts found) | shellcheck bin/* |
If running in --check mode, show check commands instead of fix commands.
3. Run Each Tool
Run each detected tool sequentially. For each tool:
3a. Run the Command
Run the fix command (or check command if --check was specified). Capture stdout, stderr, and exit code.
Tool-specific notes:
- eslint: Exit code 0 = clean, 1 = issues found. Parse output for remaining error/warning counts.
- prettier: Exit code 0 = all clean, 1 = unformatted files found (check mode) or write errors.
- markdownlint-cli2: Exit code 0 = clean, 1 = issues found. With
--fix, some issues auto-fix and others remain. - shellcheck: No auto-fix. All issues reported for manual resolution.
- shfmt: With
-w, formats in place silently. With-d, shows diffs. - knip: No auto-fix. Reports unused files, dependencies, and exports.
- cspell: No auto-fix. Runs with
--dotso dotfiles and dot-directories match CI spell-check behavior. Users fix typos in the source or add words tocspell.json(wordsarray) or a project word list file. In git worktrees,--dotcan expose the.gitfile; if that happens, add.gitas well as.git/to the project's cspell ignore paths. - npm scripts: Exit codes depend on the underlying tool.
- Project scripts: Try with
--fixfirst. If the script does not recognize--fix, run without it. - CI workflow scripts: Run exactly as specified in the workflow. These are typically check-only (no auto-fix). Exit code 0 = pass, non-zero = issues found.
3b. Record Results
For each tool, record:
- Tool: Name
- Exit code: 0 (success) or non-zero
- Files fixed: Count from output (if available)
- Remaining issues: Count and summary of what auto-fix could not resolve
- Output: Full output for reference
4. Report Results
After all tools run, display a summary:
## Lint and Fix Results
| Tool | Status | Fixed | Remaining |
|------|--------|-------|-----------|
| eslint | Ran with fixes | 3 files | 2 errors |
| prettier | All formatted | 5 files | 0 |
| shellcheck | Check only | — | 4 warnings |
If --check was specified, show results and stop here.
If all tools passed with zero remaining issues (auto-fix resolved everything), skip step 5 and go directly to step 6. Auto-fix commands modify files on disk even when they resolve all issues. You must still verify in step 6 and commit in step 7.
5. Fix Remaining Issues
For each remaining issue that auto-fix could not resolve:
- Read the tool output to identify the specific error, file, and line number.
- Read the relevant file at the indicated location.
- Apply the fix based on the error type:
- ESLint: Read the rule from the error code (e.g.,
no-unused-vars), edit the code to comply. - ShellCheck: Read the SC code (e.g., SC2086), apply the recommended fix (quoting variables, using arrays, etc.).
- Markdownlint: Fix heading levels, line lengths, trailing whitespace, etc.
- Knip: Remove unused exports or dependencies after confirming they are truly unused.
- Re-run the tool on the specific file to verify the fix.
If a remaining issue is ambiguous or risky to fix automatically (e.g., removing a dependency that might be used dynamically, or a lint rule that conflicts with project intent), skip it and report:
Skipped: : — —
6. Final Verification
Re-run all detected tools one final time in check mode to confirm a clean state:
## Final Verification
| Tool | Status |
|------|--------|
| eslint | Pass |
| prettier | Pass |
| shellcheck | Pass (1 advisory skipped) |
After verification, always proceed to step 7. Tools that auto-fixed files will have modified files on disk that need to be committed.
7. Commit and Push
This step is required unless --no-commit or --check was specified. Linters and formatters modify files on disk when they auto-fix. Those changes must be committed even if every tool now reports a clean state.
Skip this step only if:
- --no-commit was specified, OR
- --check was specified (no changes were made)
Check for file changes and commit:
- Run
git status --porcelainand check whether its output is empty. - If no files were modified (i.e.,
git status --porcelainproduced no output): Report "No changes needed, all files were already clean." If a parent continuation block was supplied, include the final output required by [Parent Continuation Contract](#parent-continuation-contract) and allow the parent workflow to continue according to its continuation block. Otherwise stop. - If files were modified (i.e.,
git status --porcelainproduced any output): Stage all modified files and commit them. - Generate a conventional commit message:
- Use
style:for pure formatting and linting fixes. - Use
fix:if linting changes corrected actual bugs (e.g., unused variables removed, error handling added). - Include which tools ran and a brief summary of manual fixes in the commit body.
After committing, push to the remote:
- If --no-push was specified without a parent continuation block: Report the final lint status and commit SHA, then stop.
- If --no-push was specified with a parent continuation block: Report the final output required by [Parent Continuation Contract](#parent-continuation-contract), including the caller resume target. The parent workflow should then continue according to its continuation block without asking the user for confirmation.
- Push to the current branch's upstream remote.
- If no upstream is set, push with
-uto set it.
Error Handling
- No tools detected: Report that no linters or formatters were found. Suggest common config files the user could add.
- Tool not installed: If a config file exists but the tool is not available, report which tool is missing and suggest installation (e.g.,
npm install -D eslint). - Execution failure: Report the error output, then continue with the next tool rather than aborting.
- Permission errors on project scripts: Report the error, suggest
chmod +x. - Conflicting tools: If both a
package.jsonlint script and a standalone config (e.g., eslint) are detected, prefer thepackage.jsonscript (it may have project-specific flags). Note the overlap to the user. - CI workflow tool requires setup: Some CI workflow steps depend on GitHub Actions that install a tool (e.g.,
mfinelli/setup-shfmt). If the tool is not locally available, report the missing tool and suggest install
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: cboone
- Source: cboone/agent-harness-plugins
- License: MIT
- Homepage: https://github.com/cboone/agent-harness-plugins
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.